summaryrefslogtreecommitdiff
path: root/src/as
diff options
context:
space:
mode:
Diffstat (limited to 'src/as')
-rw-r--r--src/as/Makefile2
-rw-r--r--src/as/paging.s21
2 files changed, 22 insertions, 1 deletions
diff --git a/src/as/Makefile b/src/as/Makefile
index e2c476d..bd5664b 100644
--- a/src/as/Makefile
+++ b/src/as/Makefile
@@ -1,5 +1,5 @@
.PHONY: all
all: $(AS_OBJECTS)
-$(BUILD_DIR)/%.o: %.s
+$(AS_OBJECT_DIR)/%.o: %.s
$(AS) $< -o $@
diff --git a/src/as/paging.s b/src/as/paging.s
new file mode 100644
index 0000000..2dd52d3
--- /dev/null
+++ b/src/as/paging.s
@@ -0,0 +1,21 @@
+.globl loadPageDirectory
+loadPageDirectory:
+ push %ebp
+ mov %esp, %ebp
+ mov 8(%esp), %eax
+ mov %eax, %cr3
+ mov %ebp, %esp
+ pop %ebp
+ ret
+
+.text
+.globl enablePaging
+enablePaging:
+ push %ebp
+ mov %esp, %ebp
+ mov %cr0, %eax
+ or $0x80000000, %eax
+ mov %eax, %cr0
+ mov %ebp, %esp
+ pop %ebp
+ ret