Beginner's Questions
Posted: Wed Oct 25, 2006 12:25 pm
I tried one of the examples from
http://www.osdev.org/osfaq2/index.php/AsmExample
.code16
.text
mov $0x07C0, %ax
mov %ax, %ds
mov $msg, %si
1: lodsb
or %al,%al # zero=end of str
jz 2f # get out
mov $0x0E, %ah
int $0x10
jmp 1b
2:
jmp 2b
msg: .asciz "Welcome to Macintosh\n"
.org 510
.word 0xAA55
ld --oformat binary --Ttext 0x7C00 -o temp.bin temp.o
it shows me the following error while linking it using the above ld command:(
ld: cannot perform PE operations on non PE output file
http://www.osdev.org/osfaq2/index.php/AsmExample
.code16
.text
mov $0x07C0, %ax
mov %ax, %ds
mov $msg, %si
1: lodsb
or %al,%al # zero=end of str
jz 2f # get out
mov $0x0E, %ah
int $0x10
jmp 1b
2:
jmp 2b
msg: .asciz "Welcome to Macintosh\n"
.org 510
.word 0xAA55
ld --oformat binary --Ttext 0x7C00 -o temp.bin temp.o
it shows me the following error while linking it using the above ld command:(
ld: cannot perform PE operations on non PE output file