TASM 程序挂了

问题描述

我有以下 TASM 程序 它从地址 0x8f77fff4 读取一个整数值

它不会向屏幕打印字符并挂断(不会终止)...为什么?

即使我激活了 jmp char1 指令,它也不会终止并返回到 C:\ prompt

我更正了添加 eax,ds:[si] 以包含 ':' 的行

.MODEL SMALL
.STACK 100h
.DATA
.CODE
.386P

start:
   cld
   pushf
   push ax
   push bx
   push cx
   push dx
   push ds
   push es
   push si

; jmp char1
   mov cx,08f7h
   mov es,cx

   mov eax,es
   shl eax,15h    ;left shift 21 decimal bits

   mov ax,7000h
   mov ds,ax

   mov ax,0fff4h
   mov si,ax

   add eax,ds:[si]

   mov al,[eax]

   mov ah,9h
   mov bh,0h
   mov bl,0h
   mov cx,0h
   int 10h     ;print character to screen

;char1:

   pop si
   pop es
   pop ds
   pop dx
   pop cx
   pop bx
   pop ax
   popf

   mov ah,4ch
   mov al,0h
   int 21h      ;terminate the program

end start 

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)