汇编 org

来源:互联网 发布:mac命令行终端 颜色 编辑:程序博客网 时间:2024/05/21 06:29

看了几篇博客不知道 org 到底有什么用,实际测试下就了解了~

x.asm

start:    mov ax ,labellabel:    nop 

nasm x.asm -o x

b804 0090 

ndisasm -o 0x0 x > dx.asm

00000000  B80400            mov ax,0x400000003  90                nop

y.asm

org 0x02start:    mov ax ,labellabel:    nop 

nasm y.asm -o y

b805 0090 

ndisasm -o 0x02 y > dy.asm

00000002  B80500            mov ax,0x500000005  90                nop

看出 org 会影响 相对偏移量

0 0
原创粉丝点击