hi
This commit is contained in:
parent
55f0657bdd
commit
a5bc53102d
10
sys/drv/vga/Makefile
Normal file
10
sys/drv/vga/Makefile
Normal file
@ -0,0 +1,10 @@
|
||||
CC=cc
|
||||
FLAGS=-Wall -c -g -Wextra -ffreestanding -m32 -nostdlib
|
||||
SRCS=$(wildcard *.c)
|
||||
INCLUDE=include/
|
||||
MAIN_INCLUDE=../../include/
|
||||
BIN=vga.o
|
||||
|
||||
all:
|
||||
$(CC) $(FLAGS) -I $(INCLUDE) -I $(MAIN_INCLUDE) $(SRCS) -o $(BIN)
|
||||
|
@ -1,10 +1,13 @@
|
||||
#ifndef VIDEO_H
|
||||
#define VIDEO_H
|
||||
|
||||
#define VGA_START 0xB8000
|
||||
#include <types.h>
|
||||
|
||||
#define SIZE 4000
|
||||
|
||||
void vga_write(char *, char, short);
|
||||
s8 *vga_vidmem = (s8 *)0xb8000;
|
||||
|
||||
void vga_write(s8 *, s8);
|
||||
void vga_clearscreen();
|
||||
|
||||
#endif
|
||||
|
BIN
sys/drv/vga/vga.o
Normal file
BIN
sys/drv/vga/vga.o
Normal file
Binary file not shown.
@ -1,12 +1,16 @@
|
||||
#define VGA_START 0xB8000
|
||||
#define SIZE 4000
|
||||
#include <types.h>
|
||||
#include <video.h>
|
||||
|
||||
void vga_write(char*, char, short) {
|
||||
void
|
||||
vga_write(s8 *sequence, s8 flags)
|
||||
{
|
||||
u32 i = *vga_vidmem;
|
||||
|
||||
}
|
||||
|
||||
void vga_clearscreen() {
|
||||
for (int i = 0; i <= SIZE; i++) {
|
||||
VGA_START[i] = 0;
|
||||
}
|
||||
}
|
||||
while (*sequence != '\0') {
|
||||
vga_vidmem[i] = *sequence;
|
||||
*sequence++;
|
||||
i++;
|
||||
vga_vidmem[i] = flags;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
4
sys/sysinit.c
Normal file
4
sys/sysinit.c
Normal file
@ -0,0 +1,4 @@
|
||||
void
|
||||
sysinit() {
|
||||
write("Om Smart.", 0x0F, 10);
|
||||
}
|
Loading…
Reference in New Issue
Block a user