Jump to sector 3

This commit is contained in:
Alex Kotov 2022-01-27 06:28:33 +05:00
parent 969201e229
commit b1c943c245
Signed by: kotovalexarian
GPG Key ID: 553C0EBBEB5D5F08
1 changed files with 13 additions and 6 deletions

View File

@ -32,19 +32,17 @@ _start:
.align 2
size: .word _end - _start
hello: .string "Hello from stage 2!\r\n"
hello2: .string "Hello from stage 2!\r\n"
hello3: .string "Hello from sector 3!\r\n"
main:
mov $STAGE2_ADDR(hello), %si
mov $STAGE2_ADDR(hello2), %si
call print_str
mov $STAGE2_ADDR(teststr), %si
call print_str
hang:
cli
hlt
jmp hang
ljmp $0, $STAGE2_ADDR(additional)
do_ret:
ret
@ -68,4 +66,13 @@ print_str:
teststr: .string "Test string\r\n"
additional:
mov $STAGE2_ADDR(hello3), %si
call print_str
hang:
cli
hlt
jmp hang
_end: