This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

help needed for bootstrap ..


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
	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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]