繁体   English   中英

为什么这个为NASM编写的“hello world”x86引导加载程序代码在没有[BITS 16]和[ORG 0x7C00]指令的情况下工作?

[英]Why does this 'hello world' x86 bootloader code written for NASM work without the [BITS 16] and [ORG 0x7C00] directives?

push word 0b800h
pop es
xor di, di
mov [es:di], word 441h
jmp $
times 510 - ($-$$) db 0
db 55h
db 0AAh

因为您正在编写没有标签的平面二进制文件。 NASM应默认为16位。 与此相关的是您没有寻址或标签 - 因此无需提供[ORG ...]指令。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM