error: unrecognised directive [ORG]

人盡茶涼 提交于 2019-12-24 10:57:26

问题


I was trying to write a boot-loader to use in dos-box I wrote the following code

[BITS 16]   ;tell the assembler that its a 16 bit code
[ORG 0x7C00]    ;Origin, tell the assembler that where the code will
;be in memory after it is been loaded

JMP $       ;infinite loop

TIMES 510 - ($ - $$) db 0   ;fill the rest of sector with 0
DW 0xAA55           ; add boot signature at the end of bootloader

I was trying to assemble it using nasm by the following command

nasm -f elf myfile.asm

Then I see that error

error: unrecognised directive [ORG]

I'm using ubuntu 14.04 LTS and the version of nasm is 2.10.09

来源:https://stackoverflow.com/questions/42720481/error-unrecognised-directive-org

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!