Removed old negative behavior in putchar
This commit is contained in:
parent
bdfb10e3a6
commit
2b13f87f62
|
@ -76,7 +76,7 @@ skip_bpb:
|
|||
; base pointer to a location that's far
|
||||
; enough from where the code for the BIOS
|
||||
; is located
|
||||
mov sp, 0x7c00
|
||||
mov sp, 0x9000
|
||||
mov bp, sp
|
||||
sti
|
||||
call bios_cls
|
||||
|
|
|
@ -122,7 +122,7 @@ u16 putchar(char ch, u8 row, u8 col, char attr) {
|
|||
if (row >= MAX_ROWS) {
|
||||
return -2;
|
||||
}
|
||||
u16 offset = (col >= 0 && row >= 0)? getOffset(row, col): getCursorOffset();
|
||||
u16 offset = getOffset(row, col);
|
||||
switch (ch) {
|
||||
// Note the difference between a carriage return (which
|
||||
// only brings the write head back at 0 without changing
|
||||
|
@ -186,7 +186,7 @@ u16 getCursorOffset(void) {
|
|||
u16 offset = readByte(REG_SCREEN_DATA);
|
||||
// Since we requested the high byte
|
||||
// (i.e. the 8 most significant bits)
|
||||
// we now want to move them by 8 places.
|
||||
// we now want to move them up by 8 places.
|
||||
// Conveniently, that's exactly what a
|
||||
// left shift is for :)
|
||||
offset <<= 8;
|
||||
|
|
|
@ -27,7 +27,8 @@ i32 kmain(void) {
|
|||
|
||||
|
||||
clearScreen();
|
||||
kprint("0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000");
|
||||
kprint("00000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000");
|
||||
kprint("X");
|
||||
// TODO...
|
||||
return 0x202172; // :D
|
||||
|
|
Loading…
Reference in New Issue