X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=bootsplash;a=blobdiff_plain;f=bootsplash.asm;fp=bootsplash.asm;h=e8c4cc7c44bd3f44786887b77471802c3cd95534;hp=26f557acb8f2c36ee4ece51967e7053e59e60f02;hb=2438014abcc5a367e917a8be9210eb393a676ccb;hpb=8a2e90cd377e7177f32ffc3ffc30a508e3f5f474 diff --git a/bootsplash.asm b/bootsplash.asm index 26f557a..e8c4cc7 100644 --- a/bootsplash.asm +++ b/bootsplash.asm @@ -37,9 +37,9 @@ start: ; expects string ptr in ax printstr: - mov bx, ax -.loop: mov al, [bx] - inc bx + mov si, ax +.loop: mov al, [si] + inc si test al, al jz .done mov ah, 0eh @@ -49,7 +49,7 @@ printstr: .done: ret str_load_fail db "Failed to load second stage!",0 -str_foo db "Loaded 2nd stage boot loader",0 +str_booting db "Booting ...",0 times 510-($-$$) db 0 @@ -57,6 +57,19 @@ str_foo db "Loaded 2nd stage boot loader",0 ; start of the second stage stage2_start: + call splash + + xor ax, ax + mov es, ax + + mov ax, str_booting + call printstr + + cli +.hang: hlt + jmp .hang + +splash: mov ax, 13h int 10h @@ -72,16 +85,6 @@ stage2_start: mov ax, 3 int 10h - xor ax, ax - mov es, ax - - mov ax, str_foo - call printstr - -.hang: cli - hlt - jmp .hang - waitkey: in al, 64h test al, 1