Skip to content

Commit

Permalink
regonize files
Browse files Browse the repository at this point in the history
  • Loading branch information
zeyu committed Apr 22, 2021
1 parent fa84b54 commit 69db9cf
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 14 deletions.
Binary file added boot/boot.bin
Binary file not shown.
Binary file added boot/loader.bin
Binary file not shown.
13 changes: 13 additions & 0 deletions include/global.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/* EXTERN is defined as extern except in global.c */
#ifdef GLOBAL_VARIABLES_HERE
#undef EXTERN
#define EXTERN
#else
#define EXTERN extern
#endif

EXTERN int disp_pos;
EXTERN unsigned char gdt_ptr[6]; /* 0~15:Limit 16~47:Base */
EXTERN DESCRIPTOR gdt[GDT_SIZE];
EXTERN unsigned char idt_ptr[6]; /* 0~15:Limit 16~47:Base */
EXTERN GATE idt[IDT_SIZE];
1 change: 1 addition & 0 deletions kernel/global.c
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#define GLOBAL_VARIABLES_HERE
#include "protect.h"
#include "global.h"
Binary file added kernel/kernel.bin
Binary file not shown.
1 change: 1 addition & 0 deletions kernel/protect.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "protect.h"
#include "functions.h"
#include "global.h"
#include "i8259.h"

void init_protect_mode() {
Expand Down
14 changes: 0 additions & 14 deletions kernel/protect.h
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
/* EXTERN is defined as extern except in global.c */
#ifdef GLOBAL_VARIABLES_HERE
#undef EXTERN
#define EXTERN
#else
#define EXTERN extern
#endif

EXTERN int disp_pos;
EXTERN unsigned char gdt_ptr[6]; /* 0~15:Limit 16~47:Base */
EXTERN DESCRIPTOR gdt[GDT_SIZE];
EXTERN unsigned char idt_ptr[6]; /* 0~15:Limit 16~47:Base */
EXTERN GATE idt[IDT_SIZE];

#ifndef _TECHLOGOS_PROTECT_H_
#define _TECHLOGOS_PROTECT_H_

Expand Down

0 comments on commit 69db9cf

Please sign in to comment.