From: John Tsiombikas Date: Mon, 14 Dec 2020 21:51:55 +0000 (+0200) Subject: let's start on the splash effect X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=commitdiff_plain;ds=sidebyside;h=2438014abcc5a367e917a8be9210eb393a676ccb;hp=8a2e90cd377e7177f32ffc3ffc30a508e3f5f474;p=bootsplash let's start on the splash effect --- 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