我試圖編譯this OS有64位OS X計算機上NASM。但是,彙編是給我的,似乎是從事實來,它並沒有意識到,這個代碼是64位,而不是32位的錯誤。我怎樣才能解決這個問題,而不修改代碼?如何讓nasm認識到這個代碼是64位的?
的錯誤:
$ nasm kernel64.asm -o kernel64.sys
init_64.asm:153: error: symbol `lodsq' redefined
init_net.asm:38: error: symbol `stosq' redefined
init_net.asm:40: error: symbol `stosq' redefined
init_net.asm:42: error: symbol `stosq' redefined
init_net.asm:49: error: symbol `stosq' redefined
init_net.asm:51: error: symbol `stosq' redefined
init_net.asm:53: error: symbol `stosq' redefined
syscalls/string.asm:363: error: parser: instruction expected
syscalls/screen.asm:264: error: symbol `jrcxz' redefined
syscalls/screen.asm:264: error: parser: instruction expected
syscalls/debug.asm:23: error: symbol `pushfq' redefined
syscalls/misc.asm:119: error: symbol `jrcxz' redefined
syscalls/misc.asm:119: error: parser: instruction expected
syscalls/misc.asm:126: error: symbol `jrcxz' redefined
syscalls/misc.asm:126: error: parser: instruction expected
syscalls/misc.asm:132: error: symbol `jrcxz' redefined
syscalls/misc.asm:132: error: parser: instruction expected
syscalls/misc.asm:326: warning: numeric constant 0x23D8AD1401DE7383 does not fit in 32 bits
syscalls/smp.asm:121: error: symbol `stosq' redefined
syscalls/smp.asm:123: error: symbol `stosq' redefined
syscalls/smp.asm:179: error: symbol `lodsq' redefined
syscalls/smp.asm:181: error: symbol `lodsq' redefined
drivers/net/rtl8169.asm:219: error: symbol `stosq' redefined
drivers/net/i8254x.asm:195: error: symbol `stosq' redefined
drivers/net/i8254x.asm:200: error: symbol `stosq' redefined
interrupt.asm:102: error: symbol `iretq' redefined
interrupt.asm:116: error: symbol `iretq' redefined
interrupt.asm:166: error: symbol `iretq' redefined
interrupt.asm:239: error: symbol `iretq' redefined
interrupt.asm:307: error: symbol `iretq' redefined
interrupt.asm:322: error: symbol `iretq' redefined
interrupt.asm:537: error: symbol `lodsq' redefined
cli.asm:22: error: symbol `jrcxz' redefined
cli.asm:22: error: parser: instruction expected
cli.asm:26: error: symbol `jrcxz' redefined
cli.asm:26: error: parser: instruction expected
什麼是錯誤 – phoxis
什麼是你'nasm'版本? – phoxis
@phoxis:'NASM版本0.98.40' – Adrian