help needed for bootstrap
YU Tang
squalls_tang@263.net
Sun Jan 21 18:31:00 GMT 2001
hi,
i met some problems when i tried to make a simple PC
bootstrap program with gas,i believe someone here can help
me ;-)
and here is the code:
.globl start
start: jmp main
.org 0x4,0x90
main:
movb $0x4c,%al ; char 'L'
movb $0xe,%ah ; vedio fucntion
movb $0x4c,%al ; char 'L'
movb $0xe,%ah ; vedio fucntion
movw $0x7,%bx ; color
int $0x10 ; go
hang:
jmp hang ; hang here
.org 0x1FE,0x90 ; fill up
.word 0xAA55 ; magic
[END OF FILE]
and run
#as hello.s -o hello.o
#ld -nostdlib -static -N -e start -Ttext 0x7C00 hello.o -o hello.out
#objcopy -S -O binary hello.out hello.bin
#dd if=./hello.bin of=/dev/fd0 bs=512 count=1
and reboot with floppy injected.
but it just hang here,and no output!!
(It should output 'L' first)
BTW, I did it under FreeBSD
Thanks!
Tang YU
_____________________________________________
263CommailãìÃÂóÃÂõõÃÂõçÃÂÃÂÃÂÃÂüþÃÂèüàhttp://mail.263.net
More information about the Binutils
mailing list