cmuratori / computer_enhance

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bad size prefix for moving segment reg to memory

mmozeiko opened this issue · comments

Input bytes 8C 40 3B decodes & prints to mov byte [bx+si+59], es which is nonsense. Cannot move byte from segment register. There should be no byte prefix. Just mov [bx+si+59], es assembles back to 8C 40 3B correctly.

byte_seg_move.binary.txt

$ sim86.exe byte_seg_move.binary.txt
; byte_seg_move.binary.txt disassembly:
bits 16
mov byte [bx+si+59], es
$ ndisasm.exe -b 16 byte_seg_move.binary.txt
00000000  8C403B            mov [bx+si+0x3b],es

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

- Casey