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:
parent
babf140f16
commit
8d68bc362f
2 changed files with 14 additions and 1 deletions
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue