cmuratori / computer_enhance

Source code for the https://computerenhance.com programming series

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Calls lose far for intra-segment addresses

mmozeiko opened this issue · comments

Both FF 52 C6 and FF 5A C6 prints to call word [bp+si-58]

But it for FF 5A C6 it should be call far word [bp+si-58] to indicate it is inter-segment call.

Similar for jumps:
FF 25 and FF 2D give jmp word [di]
But second one should be jmp far word [di] as inter-segment jump.

call_jump_far.binary.txt

$ sim86.exe call_jump_far.binary.txt
; call_jump_far.binary.txt disassembly:
bits 16
call word [bp+si-58]
call word [bp+si-58]
jmp word [di]
jmp word [di]
$ disasm.exe -b 16 call_jump_far.binary.txt
00000000  FF52C6            call [bp+si-0x3a]
00000003  FF5AC6            call far [bp+si-0x3a]
00000006  FF25              jmp [di]
00000008  FF2D              jmp far [di]

Should be fixed now! Let me know if for some reason it isn't...

- Casey