mirror of
https://github.com/gbowne1/ClassicOS.git
synced 2025-12-04 05:05:25 -08:00
Initial Commit of files
This commit is contained in:
27
src/drivers/screen/screen.c
Normal file
27
src/drivers/screen/screen.c
Normal file
@@ -0,0 +1,27 @@
|
||||
#include "screen.h"
|
||||
#include <dos.h>
|
||||
|
||||
void screen_init() {
|
||||
// Initialize the screen driver
|
||||
// Add any necessary initialization code here
|
||||
}
|
||||
|
||||
void set_40_column_mode() {
|
||||
// Set the screen mode to 40 columns
|
||||
union REGS regs;
|
||||
regs.h.ah = 0x00;
|
||||
regs.h.al = 0x03;
|
||||
int86(0x10, ®s, ®s);
|
||||
}
|
||||
|
||||
void set_80_column_mode() {
|
||||
// Set the screen mode to 80 columns
|
||||
union REGS regs;
|
||||
regs.h.ah = 0x00;
|
||||
regs.h.al = 0x03;
|
||||
int86(0x10, ®s, ®s);
|
||||
|
||||
regs.h.ah = 0x00;
|
||||
regs.h.al = 0x07;
|
||||
int86(0x10, ®s, ®s);
|
||||
}
|
||||
13
src/drivers/screen/screen.h
Normal file
13
src/drivers/screen/screen.h
Normal file
@@ -0,0 +1,13 @@
|
||||
#ifndef SCREEN_H
|
||||
#define SCREEN_H
|
||||
|
||||
// Function to initialize the screen driver
|
||||
void screen_init();
|
||||
|
||||
// Function to set the screen mode to 40 columns
|
||||
void set_40_column_mode();
|
||||
|
||||
// Function to set the screen mode to 80 columns
|
||||
void set_80_column_mode();
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user