mirror of https://github.com/tailix/loadwarka.git
Move hang func to separate module
This commit is contained in:
parent
e8b31fa661
commit
7a53abea22
6
build.sh
6
build.sh
|
@ -9,13 +9,13 @@ CROSS="$BIN/i386-elf-"
|
|||
STAGE1_LDFLAGS='--defsym=program_start=0x7c00'
|
||||
STAGE2_LDFLAGS='--defsym=program_start=0x7e00'
|
||||
|
||||
STAGE1_OBJS="$SRC/header.o $SRC/print.o $SRC/stage1.o"
|
||||
STAGE2_OBJS="$SRC/header.o $SRC/print.o $SRC/stage2.o"
|
||||
STAGE1_OBJS="$SRC/header.o $SRC/common.o $SRC/stage1.o"
|
||||
STAGE2_OBJS="$SRC/header.o $SRC/common.o $SRC/stage2.o"
|
||||
|
||||
./clean.sh
|
||||
|
||||
${CROSS}gcc -c $SRC/header.S -o $SRC/header.o
|
||||
${CROSS}gcc -c $SRC/print.S -o $SRC/print.o
|
||||
${CROSS}gcc -c $SRC/common.S -o $SRC/common.o
|
||||
${CROSS}gcc -c $SRC/stage1.S -o $SRC/stage1.o
|
||||
${CROSS}gcc -c $SRC/stage2.S -o $SRC/stage2.o
|
||||
|
||||
|
|
|
@ -3,10 +3,16 @@
|
|||
#endif
|
||||
|
||||
.code16
|
||||
.global hang
|
||||
.global print_char
|
||||
.global print_str
|
||||
|
||||
.section .text
|
||||
hang:
|
||||
cli
|
||||
hlt
|
||||
jmp hang
|
||||
|
||||
do_ret:
|
||||
ret
|
||||
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
.code16
|
||||
.global _start
|
||||
.extern hang
|
||||
.extern print_str
|
||||
|
||||
.section .rodata
|
||||
|
@ -117,11 +118,7 @@ read_loop:
|
|||
|
||||
finish:
|
||||
ljmp $0, $STAGE2_BASE
|
||||
|
||||
hang:
|
||||
cli
|
||||
hlt
|
||||
jmp hang
|
||||
ljmp $0, $hang
|
||||
|
||||
do_ret:
|
||||
ret
|
||||
|
|
|
@ -41,8 +41,4 @@ teststr4: .string "Test string from sector 4\r\n"
|
|||
sector4:
|
||||
mov $hello4, %si
|
||||
call print_str
|
||||
|
||||
hang:
|
||||
cli
|
||||
hlt
|
||||
jmp hang
|
||||
ljmp $0, $hang
|
||||
|
|
Loading…
Reference in New Issue