From 45ff4e44040787cca21a53fb378bb919c4d0691d Mon Sep 17 00:00:00 2001 From: K Lange Date: Thu, 17 Jun 2021 23:20:09 +0900 Subject: [PATCH] boot: Add a status indicator when loading --- boot/boot.S | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/boot/boot.S b/boot/boot.S index 965b0dd6..c45e7f49 100644 --- a/boot/boot.S +++ b/boot/boot.S @@ -123,6 +123,17 @@ load_one: xor %ecx, %ecx movw drive_params_bps, %cx add %ecx, %ebx + + /* Update spinner */ + movl ind_Spinny, %ecx + inc %ecx + and $0x3FF, %ecx + movl %ecx, ind_Spinny + shr $8, %ecx + movb str_Spinny(%ecx), %ah + mov $str_Loading_end - str_Loading - 2 + 0xb8000, %ecx + movb %ah, (%ecx) + jmp load_one done: @@ -273,9 +284,14 @@ str_Bad: str_Bad_end: str_Loading: - .byte 'L',7,'o',7,'a',7,'d',7,'i',7,'n',7,'g',7,'.',7,'.',7,'.',7 + .byte 'L',7,'o',7,'a',7,'d',7,'i',7,'n',7,'g',7,'.',7,'.',7,'.',7,' ',7,' ',7 str_Loading_end: str_Need_long: .byte 'T',7,'o',7,'a',7,'r',7,'u',7,'O',7,'S',7,' ',7,'2',7,' ',7,'r',7,'e',7,'q',7,'u',7,'i',7,'r',7,'e',7,'s',7,' ',7,'a',7,' ',7,'6',7,'4',7,'-',7,'b',7,'i',7,'t',7,' ',7,'p',7,'r',7,'o',7,'c',7,'e',7,'s',7,'s',7,'o',7,'r',7 str_Need_long_end: + +str_Spinny: + .byte '|','/','-','\\' +ind_Spinny: + .long 0