当反汇编从这样的代码编译的旧 .com 可执行文件时:
.model tiny ; com program
.code ; code segment
org 100h ; code starts at offset 100h
main proc near
mov ah,09h ; function to display a string
mov dx,offset message ; offset ofMessage string terminating with $
int 21h ; dos interrupt
mov ah,4ch ; function to terminate
mov al,00
int 21h ; Dos Interrupt
endp
message db "Hello World $" ; Message to be displayed terminating with a $
end main
在十六进制它看起来像这样:
B4 09 BA 0D 01 CD 21 B4 4C B0 00 CD 21 48 65 6C 6C 6F 20 57 6F 72 6C 64 20 24
反汇编程序如何知道代码在哪里结束以及字符串“Hello world”从哪里开始?