Initial Commit of files

This commit is contained in:
2023-07-10 03:05:34 -07:00
parent c726a44299
commit 0821823a68
18 changed files with 417 additions and 1 deletions

View 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, &regs, &regs);
}
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, &regs, &regs);
regs.h.ah = 0x00;
regs.h.al = 0x07;
int86(0x10, &regs, &regs);
}

View 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