|
|
@ -35,20 +35,20 @@ printALChar: |
|
|
|
|
|
|
|
dumpax_os: |
|
|
|
pusha ; save registers |
|
|
|
mov bx, ax |
|
|
|
mov dx, ax |
|
|
|
mov ah, 0xE ; Teletype output |
|
|
|
|
|
|
|
mov cx, 4 ; 4 nipples in a 16 bit word |
|
|
|
.loop: |
|
|
|
rol bx, 4 ; rotate to next nipple |
|
|
|
mov al, bl ; we copy to al because we need to mask only the low 4 bits |
|
|
|
rol dx, 4 ; rotate to next nipple |
|
|
|
mov al, dl ; we copy to al because we need to mask only the low 4 bits |
|
|
|
and al, 1111b ; Do the masking |
|
|
|
add al, '0' ; convert to ASCII |
|
|
|
cmp al, '9' ; If we are greater than 9 ascii, we add 7 to make digit 10 be represented as 'A' |
|
|
|
jbe .skip ; -|- |
|
|
|
add al, 7 ; -|- |
|
|
|
.skip: ; -|- |
|
|
|
mov bl, 0x02 ;color |
|
|
|
mov bl, 0xe2 ;color |
|
|
|
int 0x10 ; BIOS call 'output' |
|
|
|
loop .loop |
|
|
|
|
|
|
@ -63,4 +63,4 @@ os_change_screen: |
|
|
|
; and base pointer has to be set. |
|
|
|
mov ah, 0x05 |
|
|
|
int 0x10 |
|
|
|
ret |
|
|
|
ret |