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

Print both sizes

This commit is contained in:
Alex Kotov 2022-01-27 05:28:39 +05:00
parent 53d35a317f
commit b71f68194b
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08

View file

@ -35,7 +35,8 @@ size: .word _end - _start
disk: .byte 0
newline: .string "\r\n"
hello: .string "Hello stage 1!\r\n"
size_str: .string "Size: "
stage1_size_str: .string "Stage 1 size: "
stage2_size_str: .string "Stage 2 size: "
main:
cli
@ -61,7 +62,17 @@ main:
mov $STAGE2_BASE, %bx /* Address */
int $0x13
mov $STAGE1_ADDR(size_str), %si
mov $STAGE1_ADDR(stage1_size_str), %si
call print_str
mov $STAGE1_ADDR(size), %bx
mov (%bx), %ax
call print_number
mov $STAGE1_ADDR(newline), %si
call print_str
mov $STAGE1_ADDR(stage2_size_str), %si
call print_str
mov $STAGE2_ADDR(size), %bx