X-Git-Url: https://git.wirehaze.ovh/BOS.git/blobdiff_plain/e7307fb715b46f4ac09ae7781fad9dbefa1090a7..63a43d51d088c206975b642c77c2928a04044de9:/kernel/shell/clock.asm diff --git a/kernel/shell/clock.asm b/kernel/shell/clock.asm index ba211ac..53685d3 100755 --- a/kernel/shell/clock.asm +++ b/kernel/shell/clock.asm @@ -9,8 +9,8 @@ ;------------------; ; variables ; ;------------------; - msg_time db 13,10,' Time: ',0 - msg_date db 13,10,' Date: ',0 + msg_time db 13,10,' Time: ',0 + msg_date db 13,10,' Date: ',0 ;------------------------------------------------------; @@ -18,62 +18,62 @@ ; prompt. swedish i.e. normal :) format ; ;------------------------------------------------------; print_date: - push eax - push ebx - push esi - - mov esi, msg_date - mov bl, 0x07 - call print ; text.inc - call get_cmos_data ; cmos.inc - - mov al, [century] ; cmos.inc - call BCD2ascii - push eax - mov bh, 0x07 - mov bl, al - call print_char - pop eax - mov bl, ah - call print_char - - mov al, [year] - call BCD2ascii - push eax - mov bl, al - call print_char - pop eax - mov bl, ah - call print_char - - mov bl, ':' - call print_char - - mov al, [month] - call BCD2ascii - push eax - mov bl, al - call print_char - pop eax - mov bl, ah - call print_char - - mov bl, ':' - call print_char - - mov al, [day] - call BCD2ascii - push eax - mov bl, al - call print_char - pop eax - mov bl, ah - call print_char - - pop esi - pop ebx - pop eax - ret + push eax + push ebx + push esi + + mov esi, msg_date + mov bl, 0x07 + call print ; text.inc + call get_cmos_data ; cmos.inc + + mov al, [century] ; cmos.inc + call BCD2ascii + push eax + mov bh, 0x07 + mov bl, al + call print_char + pop eax + mov bl, ah + call print_char + + mov al, [year] + call BCD2ascii + push eax + mov bl, al + call print_char + pop eax + mov bl, ah + call print_char + + mov bl, ':' + call print_char + + mov al, [month] + call BCD2ascii + push eax + mov bl, al + call print_char + pop eax + mov bl, ah + call print_char + + mov bl, ':' + call print_char + + mov al, [day] + call BCD2ascii + push eax + mov bl, al + call print_char + pop eax + mov bl, ah + call print_char + + pop esi + pop ebx + pop eax + ret ;------------------------------------------------------; @@ -81,49 +81,49 @@ print_date: ; prompt. ; ;------------------------------------------------------; print_time: - push eax - push ebx - push esi - - mov esi, msg_time - mov bl, 0x07 - call print ; text.inc - call get_cmos_data ; cmos.inc - mov al, [hour] ; cmos.inc - call BCD2ascii - push eax - mov bh, 0x07 - mov bl, al - call print_char - pop eax - mov bl, ah - call print_char - - mov bl, ':' - call print_char - - mov al, [minute] - call BCD2ascii - push eax - mov bl, al - call print_char - pop eax - mov bl, ah - call print_char - - mov bl, ':' - call print_char - - mov al, [second] - call BCD2ascii - push eax - mov bl, al - call print_char - pop eax - mov bl, ah - call print_char - - pop esi - pop ebx - pop eax - ret \ No newline at end of file + push eax + push ebx + push esi + + mov esi, msg_time + mov bl, 0x07 + call print ; text.inc + call get_cmos_data ; cmos.inc + mov al, [hour] ; cmos.inc + call BCD2ascii + push eax + mov bh, 0x07 + mov bl, al + call print_char + pop eax + mov bl, ah + call print_char + + mov bl, ':' + call print_char + + mov al, [minute] + call BCD2ascii + push eax + mov bl, al + call print_char + pop eax + mov bl, ah + call print_char + + mov bl, ':' + call print_char + + mov al, [second] + call BCD2ascii + push eax + mov bl, al + call print_char + pop eax + mov bl, ah + call print_char + + pop esi + pop ebx + pop eax + ret \ No newline at end of file