8 |
%else |
%else |
9 |
writechr: |
writechr: |
10 |
%endif |
%endif |
11 |
|
pushfd |
12 |
push ds |
push ds |
13 |
push cs |
push cs |
14 |
pop ds |
pop ds |
15 |
|
test byte [UsingVGA], 08h |
16 |
|
jz .videook |
17 |
|
call vgaclearmode |
18 |
|
.videook: |
19 |
call write_serial ; write to serial port if needed |
call write_serial ; write to serial port if needed |
|
pushfd |
|
20 |
test byte [DisplayCon],01h ; Write to screen? |
test byte [DisplayCon],01h ; Write to screen? |
21 |
jz .nothing |
jz .nothing |
22 |
|
|
48 |
ja .scroll |
ja .scroll |
49 |
.curxyok: mov bh,[BIOS_page] |
.curxyok: mov bh,[BIOS_page] |
50 |
mov ah,02h ; Set cursor position |
mov ah,02h ; Set cursor position |
51 |
int 10h |
int 10h |
52 |
.ret: popad |
.ret: popad |
53 |
.nothing: |
.nothing: |
|
popfd |
|
54 |
pop ds |
pop ds |
55 |
|
popfd |
56 |
ret |
ret |
57 |
.scroll: dec dh |
.scroll: dec dh |
58 |
mov bh,[BIOS_page] |
mov bh,[BIOS_page] |
73 |
jnc .curxyok |
jnc .curxyok |
74 |
xor dh,dh |
xor dh,dh |
75 |
jmp short .curxyok |
jmp short .curxyok |
|
|
|