Should be working, but function call fails.
This commit is contained in:
parent
ad43ca56b1
commit
3f35a78c07
2
Makefile
2
Makefile
@ -17,7 +17,7 @@ os-image: boot/boot_sect.bin kernel/kernel.bin
|
||||
kernel/kernel.bin: $(OBJ)
|
||||
$(LD) $(LDFLAGS) $^ -o $@
|
||||
|
||||
%.o: %.c ${HEADERS}
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
%.o: %.asm
|
||||
|
@ -32,6 +32,7 @@ void set_cursor(int offset) {
|
||||
port_byte_out(REG_SCREEN_CTRL, 14);
|
||||
port_byte_out(REG_SCREEN_DATA, (unsigned char)(offset >> 8));
|
||||
port_byte_out(REG_SCREEN_CTRL, 15);
|
||||
port_byte_out(REG_SCREEN_DATA, (unsigned char)offset);
|
||||
}
|
||||
|
||||
int handle_scrolling(int cursor_offset) {
|
||||
@ -76,14 +77,10 @@ void print_char(char c, int col, int row, char attr_byte) {
|
||||
* as an offset
|
||||
*/
|
||||
if(col >= 0 && row >= 0)
|
||||
{
|
||||
offset = get_screen_offset(col, row);
|
||||
}
|
||||
/* otherwise use the cursor's current location */
|
||||
else
|
||||
{
|
||||
offset = get_cursor();
|
||||
}
|
||||
|
||||
/* handle a newline */
|
||||
if(c == '\n')
|
||||
|
@ -9,6 +9,7 @@
|
||||
#define REG_SCREEN_CTRL 0x3d4
|
||||
#define REG_SCREEN_DATA 0x3d5
|
||||
|
||||
void print_char(char c, int col, int row, char attr_byte);
|
||||
void print_at(const char *msg, int col, int row);
|
||||
void print(const char *msg);
|
||||
void clear_screen();
|
||||
|
@ -1,6 +1,5 @@
|
||||
#include "../drivers/screen.h"
|
||||
|
||||
void main() {
|
||||
/*clear_screen();
|
||||
print_at("This is a test.", 0, 0);*/
|
||||
clear_screen();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user