dosbox

Writing to a file in assembler

两盒软妹~` 提交于 2019-12-01 07:01:36
问题 I'm tasked with creating a program that would write some string to a file. So far, I came up with this: org 100h mov dx, text mov bx, filename mov cx, 5 mov ah, 40h int 21h mov ax, 4c00h int 21h text db "Adam$" filename db "name.txt",0 but it doesn't do anything. I'm using nasm and dosbox. 回答1: You have to create the file first (or open it if it already exists), then write the string, and finally close the file. Next code is MASM and made with EMU8086, I post it because it may help you to

DOSBox闪退问题

耗尽温柔 提交于 2019-11-30 04:23:23
最近学习王爽的《汇编语言》,里面提到了用debug操作寄存器,但是64位系统没有debug命令了,解决办法是下载DOSBox,这个网上有很多教程。 按照网上教程安装好后,双击 DOSBox 0.74.exe 启动后出现如下界面一会就闪退。 自己试了好几次之后终于发现了门道,解决办法很神奇,哈哈。就是在上面那个界面还没有闪退时点一下后面那个大的窗口,让大窗口在前面,像下面这样。后面大窗口把小窗口覆盖了,所以看不到小窗口了。 点了之后,这样过一会,就启动成功了,出现如下界面。 输入 debug 命令玩起来吧! 来源: https://www.cnblogs.com/zzjBlog/p/11559629.html

Print numbers diagonally in assembly

梦想与她 提交于 2019-11-29 18:40:15
I'm trying to display 0-9 diagonally in assembly, but the output puts my diagonally printed numbers in the middle of the window. Here is the code: start: mov ah, 02h mov cl, 0Ah ;counter (10) mov dx, 02h ;mov bx, 02h mov dl, 30h ;start printing 0-9 mov dh, 02h ;start row mov al, 02h int 21h again: int 10h int 21h ;add dx, 01h inc dh inc dx inc al loop again mov ax, 4c00h int 21h The output should be: 0 1 2 3 4 5 6 7 8 9 The current output prints that, but on the middle of the window. I've tried adding a new register bh and use it to put my cursor on my current position when I execute the file.

DOSBox: debug.exe reads file - processes commands incorrectly

ε祈祈猫儿з 提交于 2019-11-29 18:16:35
I'm trying to use DOSBox with debug.exe on a 64-bit system. It works perfectly fine if I enter the commands manually. When I redirect input from a file with: debug < [file] it doesn't work. On every line except for the first it displays an error similar to this: DOSBox will eventually hang and crash. Is there any way to fix this? The input file I am trying to process as commands is: a 100 jmp 145 db 'Hello, World!', 0D, 0A, 'Press any key to continue . . .$' a 145 mov ah, 09 mov dx, 102 int 21 mov ah, 08 int 21 int 20 rcx 100 n hello.com w q Michael Petch I can reproduce the behavior you are

《汇编语言》(王爽)学习笔记---Windows10下搭建汇编语言开发环境

别说谁变了你拦得住时间么 提交于 2019-11-29 17:19:58
工具准备 下载DOSBox:https://www.dosbox.com/download.php?main=1 下载masm 上述工具笔者已经打包放在网址下:https://download.csdn.net/my/uploads/3/1 安装搭建环境 双击DOSBox默认完成安装即可。 把下载的masm包解压,把里面所有文件拷贝到某磁盘文件夹下,如D:\masm。 双击DOSBox安装目录下的DOSBox 0.74-3 Options.bat,做如下修改: 如下打开DOSBox运行: 测试(汇编程序输出Hello,World!) 在上面的黑框框中输入 edit hello.asm 命令,输入如下汇编程序: datas segment buf db'Hello, World!$' datas ends stacks segment stack db 200 dup(0) stacks ends codes segment assume cs:codes,ds:datas,ss:stacks start: mov ax,datas mov ds,ax mov dx,seg buf lea dx,buf mov ah,09h int 21h mov ah,4ch int 21h codes ends end start 退出编辑页面,然后依次输入命令 masm hello.asm ,

如何在64位操作系统下使用debug

冷暖自知 提交于 2019-11-29 15:47:50
安装两个程序:一个是debug.exe程序,另一个就是DOSBox程序,链接 Debug+DOSBox 密码:si7u 1、安装DOSBox程序 2 、 将debug.exe文件保存在磁盘的根目录,如果是保存在C盘。 3、 打开已经安装好的DOSBox,输入以下命令: mount c c:\ →回车 此命令的作用为将 c:\挂载为 C 盘 c: →回车 debug →回车 来源: CSDN 作者: erica_wbz 链接: https://blog.csdn.net/w1424734498/article/details/80369550

win7 64位系统下 安装debug.exe

六月ゝ 毕业季﹏ 提交于 2019-11-29 15:46:20
下实现Debug汇编的方法。 使用32位的Win7同志就不用看了 直接搜索C盘 debug就找到了 XP也一样 若要使用DOS下masm的更多功能,请下载emu 8086 v4.08或 Masm for windows 2012, win7 64位系统下 安装debug.exe 主要说一下64位Win7使用debug程序的方法 首先你要下载一个DOSBOX程序 这个程序是一个dos模拟器 这个程序的制作目的是运行经典的DOS游戏 -。- 下载地址: http://www.dosbox.com/download.php?main=1 其次下载一个Win732位的debug程序 下载地址: http://u.115.com/file/b3mmegwu Win7 64位的孩子你们伤不起啊,木有debug,汇编实验做得好痛苦。 好在现在寻到一个方法,不用装虚拟机,废话不多说,上教程。 第一步,下载要用到的工具, http://download.csdn.net/detail/hnjb5873/9165215 DOSbox 0.74。 第二步,双击DOSbox安装 第三步,把Debug.exe拷贝到D盘或者E盘或者F盘根目录下,记住,是根目录,这里我以放在D盘为例。 第四步,打开安装好的DOSBox, 然后输入 mount c d: 回车 c: 回车 debug 回车

汇编程序设计DOSBox模拟环境配置

守給你的承諾、 提交于 2019-11-29 08:27:13
# 汇编程序设计DOSBox模拟环境配置 ##### 最近在学习汇编语言设计,然后上网找关于汇编程序的编译软件。不负有心人,终于找到了我需要的软件,值得庆幸。 ##### 关于配置方法以及步骤,以下详情。 --- 首先,我们需要一个环境,该环境称为:DOSBox环境,该环境是一个仿真器环境,仿真真实的DOS环境,可重新创建 MS-DOS 兼容环境(包括声音、输入、图形甚至基本网络)。然后我们在这个环境下面进行汇编语言设计。有能力者可以直接网上下载真实的DOS环境,从而从实体机上运行并编写调试汇编程序。 DOSBox下载连接为: ---->这是下载链接<----- 当然要是不嫌弃,也可以到我的百度云盘中下载: ----->这是我的百度网盘链接<----- (提取码:tlow) --- 下载了之后,便是以下安装。习惯安装在 D 盘,所以我设置成了 D:\Program..... 如下图: 经过一系列的努力,你终于把环境配好了,好棒(๑•̀ㅂ•́)و✧ 然后,我们首先在D盘中新建一个文件夹,称作 "MASM" 为什么呢? 因为待会要使用,笨蛋( ╯□╰ ) >哦~(●ˇ∀ˇ●) 接下来,我们进行masm配置,首先,你得把那几个程序找到 edit.exe, edit.com ( 编辑软件 ) debug.exe ( 是一种计算机程序,用于测试和调试MS-DOS可执行文件 ) masm

Detect/receive multiple key-presses at the same time in DOS?

可紊 提交于 2019-11-28 14:43:11
I'm in the middle of writing air hockey in tasm and I have encounter a problem which is how I get two keys/clicks at once because I need to get both click at once to move both players in one time and Im trying a lot but I don't think I have a way to doing it. I heard that I need to read from the buffer directory and see what keys are there and read each one individually but I don't really know how to do this. Do you mind working with scancodes? I know this is not the simple, drop-in, solution you were looking for but I'm afraid there is none. So I'm writing this in the hope that, if not you,

Assembler can't locate existing files

三世轮回 提交于 2019-11-28 14:11:56
My TASM is mounted to the folder where my my TASM, TLINK, and files are. Specifically it is at C:/TASM/BIN . I have no problems when running a single .asm file but when I include an another file so that my code would look modular, there comes this problem. I have included 6 files as of now which includes printMzpos1.kt . (File extension doesn't matter in assembly file inclusion.) The name of my main file is c.asm . The image shows that printMzpos1.kt is in the folder where my TASM is mounted: Here is the snapshot of my code. I included printMzpos1.kt after main endp and before end main .