Modifying Location
This commit is contained in:
parent
763eb17e23
commit
3a3be79bae
BIN
Part2/A4/.DS_Store
vendored
BIN
Part2/A4/.DS_Store
vendored
Binary file not shown.
@ -9,11 +9,11 @@ void _start() {
|
||||
position = position << 8; /* high byte */
|
||||
|
||||
port_byte_out(0x3d4, 15); /* requesting low byte */
|
||||
position += port_byte_in(0x3d5) + 10;
|
||||
position += port_byte_in(0x3d5);
|
||||
|
||||
/* VGA 'cells' consist of the character and its control data
|
||||
* e.g. 'white on black background', 'red text on white bg', etc */
|
||||
int offset_from_vga = position * 2;
|
||||
int offset_from_vga = position * 2.3;
|
||||
|
||||
/* Now you can examine both variables using gdb, since we still
|
||||
* don't know how to print strings on screen. Run 'make debug' and
|
||||
@ -27,6 +27,6 @@ void _start() {
|
||||
/* Let's write on the current cursor position, we already know how
|
||||
* to do that */
|
||||
char *vga = (char *) 0xb8000;
|
||||
vga[offset_from_vga] = 'X';
|
||||
vga[offset_from_vga+1] = 0x0f; /* White text on black background */
|
||||
vga[offset_from_vga+10] = 'X';
|
||||
vga[offset_from_vga+11] = 0x0f; /* White text on black background */
|
||||
}
|
||||
|
BIN
Part2/A4/05_basic_int/.DS_Store
vendored
Normal file
BIN
Part2/A4/05_basic_int/.DS_Store
vendored
Normal file
Binary file not shown.
BIN
Part2/A4/06_irq/.DS_Store
vendored
Normal file
BIN
Part2/A4/06_irq/.DS_Store
vendored
Normal file
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user