1
0
Fork 0
mirror of https://github.com/tailix/loadwarka.git synced 2024-11-11 13:50:54 -05:00

Print disk number

This commit is contained in:
Alex Kotov 2022-01-28 00:32:23 +05:00
parent babf140f16
commit 8d68bc362f
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08
2 changed files with 14 additions and 1 deletions

View file

@ -101,9 +101,10 @@ read_loop:
jmp read_loop
finish:
mov $newline, %si
call print_str
call restore_disk_number
ljmp $0, $STAGE2_BASE
ljmp $0, $hang
// AX - size
print_stage2_size:

View file

@ -6,12 +6,24 @@
.global _start
.section .rodata
disk_number: .string "Disk number: "
hello2: .string "Hello from stage 2!\r\n"
hello3: .string "Hello from sector 3!\r\n"
hello4: .string "Hello from sector 4!\r\n"
.section .text
_start:
mov $disk_number, %si
call print_str
call restore_disk_number
xor %ax, %ax
mov %dl, %al
call print_number
mov $newline, %si
call print_str
mov $hello2, %si
call print_str