dosbox

Win7搭建intel X86汇编环境

可紊 提交于 2020-01-30 00:04:00
最近一直在折腾怎么搞汇编,一直想有个平台能验证一下汇编的代码。 可能你会觉得,好像很麻烦的样子,但是静下心一步一步做,你还是会觉得很简单的 以下面这hello word代码为例,搭建一个汇编运行环境验证。 data segment ; 数据段 hello db 'Hello,World!$' , 0 data ends code segment ; 代码段 assume cs : code , ds : data start : ; 入口 mov ax , data mov ds , ax lea dx , hello mov ah , 9 h int 21 h mov ah , 4 ch int 21 h code ends end start ; 标志入口点 系统环境:windows7 64bit 所需软件地址如下: DOSBOX https : / / download . csdn . net / download / qq_33479881 / 11994391 汇编工具包 https : / / download . csdn . net / download / qq_33479881 / 11994395 一、安装 安装成功后,双击该目录下DOSBox 0.74 Options.bat文件,弹出配置选项文本文档, 找到[autoexec]选项,在下面添加如下字段:

在win10 64位下搭建汇编环境

China☆狼群 提交于 2020-01-21 23:55:16
好像是因为64位WIN10并不自带debug,所以需要自己搭建汇编环境 首先是下载DosBox和MASM,下载地址: 下载解压后: 将DOSBOX安装到C盘以外的位置,防止对系统造成影响 安装好DOSBOX后再将C盘挂载映射到MASK文件中工具所在目录,这里我将MASK文件中的文件复制粘贴在E:\huibianhuanjing\DosBox: 所以需要在DOSBOX中进行挂载映射:c是指dosbox的c盘,e:\huibianhuanjing\DosBox是本机上工作目录dos的位置 输入挂载命令后即可使用debug命令进入debug模式: 来源: https://www.cnblogs.com/roscangjie/p/12227278.html

How to subtract two 64 bit integers in 8086 assembly

寵の児 提交于 2020-01-14 14:01:48
问题 Write a program called SUB64 to subtract the 64-bit integer in memory locations 0x0150 and 0x0154 from the 64-bit integer in 0x0160 and 0x0164. Store the result in memory location 0x0170 and 0x0174. I understand the logic behind separating it into smaller pieces since we can't fit 64 bits into the registers. And I know we subtract the least significant pieces first. I'm struggling with actually coding it. Does it matter which GPIO we use? This is my example, so maybe you can see how I'm

How to use local labels in procedures 8086 assembler?

╄→尐↘猪︶ㄣ 提交于 2020-01-07 07:47:17
问题 I wrote simple .MODEL small .STACK 100h .DATA liczba dw 0h licznik dw 0 potega dw 1 liczbaString dw ? buff db 26 .CODE Program: mov ax, @DATA mov ds, ax call PobierzString call PetlaIteracjiZnaku ;zwraca do ax pobraną liczbę PetlaIteracjiZnaku PROC mov si, liczbaString call ZnajdzDlugoscString mov si, liczbaString add si, 2 mov bl, 1 petla: xor ax, ax mov al, [si] cmp al, 24h; sprawdza czy nie jest koniec wprowadzanej liczby '$' je return sub al, 30h ; odejmuję 30 żeby zamienić znak na liczbę

Automating old DOS application using Python

对着背影说爱祢 提交于 2020-01-04 04:00:51
问题 Is there a way to automate an old DOS application (16-bit, probably needs an emulator such as DOSBox) from Python (on Windows)? I would like to send keys and strings to the application, detect updates to the DOS "screen" and get the application output. It would be even better if the DOS application could run "hidden", i.e., not showing in the taskbar. Note: It is not a game, it is one of those old application where you are given menus with press 1 for something, press 2 for something else,

Trying to understand asm interrupts, specifically 16h func 01H

烈酒焚心 提交于 2020-01-04 02:43:11
问题 THIS IS FOR HOMEWORK, I don't expect you to resolve my problem, just need some understanding... I have to work with ASM and C in a dosbox. My first problem is I don't really understand how to use bios interrupts (any good tutorial with code samples would be really appreciated), ok, I get there's interrupts, and each one has its own functions and parameters... Anyway I've tried...What I need to do is, theoretically, simple, I just need to get a character from keyboard and if it is a 1 or 0 key

DosBox how to fix character attribute?

安稳与你 提交于 2020-01-02 09:43:10
问题 I wrote my assembly code just to write a character with a blue background and white foreground. It works in emu8086's emulator but when I open it on DosBox it does not show the background color. With Emu8086: With DosBox: mov ax,0012h int 10h mov ah,9 mov al,31h mov bl,1fh int 10h 回答1: In the graphics video modes, the BL parameter for BIOS function 09h only defines the foreground color. It is always applied to a black background. Below is my implementation of an extension of the functionality

error: unrecognised directive [ORG]

人盡茶涼 提交于 2019-12-24 10:57:26
问题 I was trying to write a boot-loader to use in dos-box I wrote the following code [BITS 16] ;tell the assembler that its a 16 bit code [ORG 0x7C00] ;Origin, tell the assembler that where the code will ;be in memory after it is been loaded JMP $ ;infinite loop TIMES 510 - ($ - $$) db 0 ;fill the rest of sector with 0 DW 0xAA55 ; add boot signature at the end of bootloader I was trying to assemble it using nasm by the following command nasm -f elf myfile.asm Then I see that error error:

how can i clear string [dos asm]

风流意气都作罢 提交于 2019-12-24 00:49:44
问题 when i'm reading and getting file's data and than trying to read and get another text file's data, it's writing the new data on the used string for example, string contains "oh yeah!", after getting another file's data "heyyeah!". (obviously the second file i was reading contained the word hey in it). i want to clear the string from the data it got from the 1st file when reading the second file/after displaying the data of the 1st file. Full code: IDEAL MODEL small STACK 100h DATASEG szMsg1

WIN10下运行汇编语言编写的Hello World

对着背影说爱祢 提交于 2019-12-20 13:48:03
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 我们在这里需要DOSBox软件,这里提供MASM和DOSBox下载链接: MASM:https://pan.baidu.com/s/1T-UAPk57iNL-NtvSj-IShA 提取码g3y1 DOSBox:https://pan.baidu.com/s/1wxr9HN51jFqEtYaUcZFIdA 提取码g2fx 下载好了第一个文件会看到里面有debug.exe,LINK.EXE,MASM.EXE三个程序,我们需要把它们和我们写好的hello.asm(用txt创建后改名为hello.asm)文件放在一个文件夹下面,假设这里放在了D盘的MASM文件夹下。 assume cs:code,ds:datas datas segment str db 'helloWorld!','$' datas ends code segment mov ax,datas mov ds,ax lea dx,str ; 获取str的偏移地址 mov ah,9 ; 调用9号功能输出字符串 int 21h mov ah,4ch int 21h code ends end 下载好第二个文件发现里面有DOSBox…的程序,点击正常安装完就好。安装完成后打开桌面上的DOSBox0.74 我们来到红色圈圈包起来的路径下C:\Users\hp