Skip to content

Instantly share code, notes, and snippets.

Emulate 16-bit code
>>> Execution begins --- cs:ip is 0x13c8:0x1d (0x13c9d)
>>> Tracing basic block at 0x13c9d, block size = 0xf
--- cs:ip is 0x13c8:0x1d (0x13c9d)
>>> Tracing instruction at 0x13c9d, instruction size = 0x3
--- cs:ip is 0x13c8:0x3c9d (0x1791d)
>>> Tracing instruction at 0x13ca0, instruction size = 0x4
--- cs:ip is 0x13c8:0x3ca0 (0x17920)
>>> Tracing instruction at 0x13ca4, instruction size = 0x2
--- cs:ip is 0x13c8:0x3ca4 (0x17924)
@cseagle
cseagle / output.txt
Created February 1, 2023 08:51
16-bit x86 problem demo
$ ./sample_x86_16 ~/test_exe_bin
Emulate 16-bit code
>>> Execution begins --- cs:ip is 0x13c8:0x1d (0x13c9d)
>>> Tracing basic block at 0x13c9d, block size = 0xf
--- cs:ip is 0x13c8:0x1d (0x13c9d)
>>> Tracing instruction at 0x13c9d, instruction size = 0x3
--- cs:ip is 0x13c8:0x13c9d (0x2791d)
>>> Tracing instruction at 0x13ca0, instruction size = 0x4
--- cs:ip is 0x13c8:0x13ca0 (0x27920)
>>> Tracing instruction at 0x13ca4, instruction size = 0x2