Import backup from 2005-08-25

This commit is contained in:
josh committed 2017-07-25 22:23:50 -04:00
1 parent 345ef6c9f3
commit 83a5b032f8
15 files changed
+244 -92

No files matched your search

+25 -19
View File
@@ -11,6 +11,13 @@
%endmacro
;returns the value in the CR0 register
;extern dword read_cr0();
[global _read_cr0]
_read_cr0:
mov eax, cr0;
ret
;stores the parameter to the CR0 register
;extern dword write_cr0(dword cr0);
[global _write_cr0]
@@ -22,25 +29,6 @@ _write_cr0:
pop ebp
ret
;returns the value in the CR0 register
;extern dword read_cr0();
[global _read_cr0]
_read_cr0:
mov eax, cr0;
ret
;stores the parameter to the CR3 register
;extern dword write_cr3(dword cr3);
[global _write_cr3]
_write_cr3:
push ebp
mov ebp, esp
mov eax, [ebp+8]
mov cr3, eax
pop ebp
ret
;returns the value in the CR2 register
;extern dword read_cr2();
[global _read_cr2]
@@ -58,6 +46,24 @@ _read_cr3:
ret
;stores the parameter to the CR3 register
;extern dword write_cr3(dword cr3);
[global _write_cr3]
_write_cr3:
push ebp
mov ebp, esp
mov eax, [ebp+8]
mov cr3, eax
pop ebp
ret
; read ss register
[global _read_ss]
_read_ss:
mov ax, ss
ret
;copies a string from the source to the destination parameter
;extern void strcpy(char *dest, char *src);
+3 -2
View File
@@ -9,11 +9,12 @@
#include "hos_defines.h"
/* lang.asm */
u32_t write_cr0(u32_t cr0);
u32_t read_cr0();
u32_t write_cr3(u32_t cr3);
u32_t write_cr0(u32_t cr0);
u32_t read_cr2();
u32_t read_cr3();
u32_t write_cr3(u32_t cr3);
u32_t read_ss();
void writeCursorPosition(u32_t pos);
u32_t getCursorPosition();
void strcpy(char *dest, const char *src);