0

emu8086 不会在我的第二个 org 指令中放置代码。如果这是 emu8086 的怪癖或者是我的组装错误。链接是 emu8086 的屏幕截图,其中包含有问题的代码。

谢谢你。

http://postimg.org/image/kcgu5ndw5/

#make_bin#

#LOAD_SEGMENT=0F000h#
#LOAD_OFFSET=0000h#

#CS=0F000h#
#IP=00000h#

#DS=04567h#
#ES=00000h#

#SS=04567h#
#SP=01110h#

#AX=0000h#
#BX=0000h#
#CX=0000h#
#DX=0000h#
#SI=0000h#
#DI=0000h#
#BP=0000h#

org 0f000h

mov ax,01211h   ;0150-[11,12,13,ab,cb,22,34,16,33]
mov [0150h],ax

mov ax,013ABh
mov [0152h],ax

mov ax,022CBh
mov [0154h],ax

mov ax,01634h
mov [0156h],ax


mov al,33h
mov [0158h],al              

jmp 0f100h 


org 0f100h

mov ax, 0abh    
add ax, 0abh    ;156h
pop bx          ;??
mov bx, ax      ;156h
mov cx, [bx]    ;1634h
push cx         ;
jmp cx          ;??
mov al, 10h     ;execution not determined   



HLT
4

1 回答 1

0

汇编器不加载代码。你必须这样做。"org" 告诉汇编器你将在哪里加载代码。如果你有多个 org 指令,你是在告诉汇编器你将把它加载到多个部分中。我认为您想要而不是第二个组织是添加填充,例如:

rb  0f100h - $
于 2013-07-22T23:34:59.210 回答