3 ms·
Hm, is there a reason why you've not declared something like "const VGABUF: int = 0xb8000;" (like I assume VGA_WIDTH is defined?)? pub unsafe fn putchar(x:
by e12e 13y ago
Hm, is there a reason why you've not declared something like "const VGABUF: int = 0xb8000;" (like I assume VGA_WIDTH is defined?)?
pub unsafe fn putchar(x: u16, y: u16, c: u8) {
let idx : uint = (y * VGA_WIDTH * 2 + x * 2) as uint;
// 0xb8000 is the VGA buffer
*((0xb8000 + idx) as *mut u16) = make_vgaentry(c, Black, Yellow);
}