mirror of https://github.com/tailix/loadwarka.git
Add func "print_size"
This commit is contained in:
parent
ec0901265e
commit
3fae8c41af
|
@ -62,25 +62,13 @@ main:
|
||||||
mov $STAGE2_BASE, %bx /* Address */
|
mov $STAGE2_BASE, %bx /* Address */
|
||||||
int $0x13
|
int $0x13
|
||||||
|
|
||||||
mov $STAGE1_ADDR(stage1_size_str), %si
|
|
||||||
call print_str
|
|
||||||
|
|
||||||
mov $STAGE1_ADDR(size), %bx
|
mov $STAGE1_ADDR(size), %bx
|
||||||
mov (%bx), %ax
|
mov (%bx), %ax
|
||||||
call print_number
|
call print_size
|
||||||
|
|
||||||
mov $STAGE1_ADDR(newline), %si
|
|
||||||
call print_str
|
|
||||||
|
|
||||||
mov $STAGE1_ADDR(stage2_size_str), %si
|
|
||||||
call print_str
|
|
||||||
|
|
||||||
mov $STAGE2_ADDR(size), %bx
|
mov $STAGE2_ADDR(size), %bx
|
||||||
mov (%bx), %ax
|
mov (%bx), %ax
|
||||||
call print_number
|
call print_size
|
||||||
|
|
||||||
mov $STAGE1_ADDR(newline), %si
|
|
||||||
call print_str
|
|
||||||
|
|
||||||
ljmp $0, $STAGE2_BASE
|
ljmp $0, $STAGE2_BASE
|
||||||
|
|
||||||
|
@ -141,4 +129,19 @@ print_number_notnull:
|
||||||
|
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
// AX - size
|
||||||
|
print_size:
|
||||||
|
push %ax
|
||||||
|
|
||||||
|
mov $STAGE1_ADDR(stage1_size_str), %si
|
||||||
|
call print_str
|
||||||
|
|
||||||
|
pop %ax
|
||||||
|
call print_number
|
||||||
|
|
||||||
|
mov $STAGE1_ADDR(newline), %si
|
||||||
|
call print_str
|
||||||
|
|
||||||
|
ret
|
||||||
|
|
||||||
_end:
|
_end:
|
||||||
|
|
Loading…
Reference in New Issue