dosbox

DosBox is buggy with int 15h ah = 86h

你。 提交于 2021-02-11 08:46:36
问题 I am currently working on an assembly program, but I need to make the program wait every once in a while. So, I have been using int 15h/ah = 86h, but for some reason DosBox is giving me a hard time, and the program either gets confused with pixels (wierd colors) or in the worse case; crash. Can someone please help me? 回答1: I had this issue as well. Based on the answer at Problems with BIOS delay function (INT 15h / AH = 86h), I was able to get it working by making sure to set AL to zero

DosBox is buggy with int 15h ah = 86h

无人久伴 提交于 2021-02-11 08:46:11
问题 I am currently working on an assembly program, but I need to make the program wait every once in a while. So, I have been using int 15h/ah = 86h, but for some reason DosBox is giving me a hard time, and the program either gets confused with pixels (wierd colors) or in the worse case; crash. Can someone please help me? 回答1: I had this issue as well. Based on the answer at Problems with BIOS delay function (INT 15h / AH = 86h), I was able to get it working by making sure to set AL to zero

Program solving expression in assembly

丶灬走出姿态 提交于 2020-12-31 04:43:51
问题 I have a problem with my simple program in assembly. I'm using DOSBox and TASM. The problem is that the operand types don't match in lines 76, 78, and 80. This is after multiplication. I tried to make some changes by using a different variable size. ; -------------------------------------------- ; Equation=(a+c*b)/d-2*c, ; -------------------------------------------- .model small .stack 100h .data a db 0 b db 0 c db 0 d db 0 result1 db ? result2 db ? message1 db "Equation: (a+c*b)/d-2*c a=$"

Program solving expression in assembly

别说谁变了你拦得住时间么 提交于 2020-12-31 04:43:29
问题 I have a problem with my simple program in assembly. I'm using DOSBox and TASM. The problem is that the operand types don't match in lines 76, 78, and 80. This is after multiplication. I tried to make some changes by using a different variable size. ; -------------------------------------------- ; Equation=(a+c*b)/d-2*c, ; -------------------------------------------- .model small .stack 100h .data a db 0 b db 0 c db 0 d db 0 result1 db ? result2 db ? message1 db "Equation: (a+c*b)/d-2*c a=$"

What is causing this bootloader to fail on hardware but not in DOSBOX? It displays all registers

时光毁灭记忆、已成空白 提交于 2020-12-11 08:53:29
问题 I recently wrote an x86 'bootloader' program that shows the values of the hardware registers after the BIOS jumps to my program. For the purpose of testing, I set the AX register to a known value to ensure that the program runs correctly. BITS 16 %macro pad 1-2 0 times %1 - ($ - $$) db %2 %endmacro [org 0x7C00] CLD ; clear direction flag (forward direction) CLI ; clear interrupt flag (disable interrupts, opposite of 65xx) MOV [0x8000], AX ; display all registers, MOV [0x8004], BX ; including

汇编语言环境dos,win32及win64

霸气de小男生 提交于 2020-10-28 18:31:53
win一、计算2^12保存在AX中(王爽汇编语言第二版p100): mov cx,12 ;循环12次 mov ax,1 ;初始化AX s: add ax,ax loop s ;执行完loop后,要显示的数字2^12 已经在寄存器AX 二、AX寄存器以显示说明: 本例中,2^12= 4096,故 AX= 1000H 则输出字符为 4096 。 原理: ax为十六位寄存器,所以输出十进制数范围为0 - 65535,最大五位数,故设置CX=5,LOOP语句实现算法: 4096/10000= 商0 余数 4096 ; 根据十进制书写习惯,不输出前面的0字符 ,需要在输出循环里判断 4096/1000= 商4 余数96 ;输出4 96/100= 商0 余数96 ;输出0 96 /10= 商9 余数6 ;输出9 6 /1= 商6 余数0 ;输出6 把每次所得商加上48即可得到相应数字的ASCII码, 三、完整代码: code segment assume cs:code,ds:data,ss:stack start: mov ax,data mov ds,ax mov cx,12 ;循环12次 mov ax,1 ;初始化AX s: add ax,ax loop s ;执行完loop后,要显示的数字2^12 已经在寄存器AX mov si, offset divisors mov di,