summaryrefslogtreecommitdiff
path: root/src/kernel/stub.asm
diff options
context:
space:
mode:
authorBenji Dial <Benji3.141@gmail.com>2019-12-26 13:06:21 -0500
committerBenji Dial <Benji3.141@gmail.com>2019-12-26 13:06:21 -0500
commit336cfa313d0ebd435690610e8006b90dc8bd0e56 (patch)
treea2c3038462b6edcd13339fd741b34525f50c880e /src/kernel/stub.asm
parent2c542b87ff3dc2eacc036dc296a81f8fc215e6d9 (diff)
downloadportland-os-336cfa313d0ebd435690610e8006b90dc8bd0e56.tar.gz
got multiboot info parsed!
Diffstat (limited to 'src/kernel/stub.asm')
-rw-r--r--src/kernel/stub.asm36
1 files changed, 6 insertions, 30 deletions
diff --git a/src/kernel/stub.asm b/src/kernel/stub.asm
index 84e4523..bad26aa 100644
--- a/src/kernel/stub.asm
+++ b/src/kernel/stub.asm
@@ -15,7 +15,9 @@
;ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
;OF THIS SOFTWARE.
-extern main
+global _start
+extern wrapped_main
+extern tag_pointer
section .mb_header
dd 0xe852_50d6;magic
@@ -34,37 +36,12 @@ mb_end:
section .text
bits 32
-global _start
_start:
- mov dword [info_pointer], ebx
+ add ebx, 8
+ mov dword [tag_pointer], ebx
mov esp, stack
- call main
- mov edx, eax
-
- mov eax, 0x4720_4720
- mov ebx, 0x000b_8000
- mov ecx, 0x000b_8fa0
-clear_screen_loop:
- mov dword [ebx], eax
- add ebx, 4
- test ebx, ecx
- jne clear_screen_loop
-
- mov dword [0x000b_8000], 0x4772_4745
- mov dword [0x000b_8004], 0x476f_4772
- mov dword [0x000b_8008], 0x4720_4772
- mov ebx, 0x000b_8020
- mov ecx, 0x000b_800a
-error_number_loop:
- mov al, dl
- and al, 0x07
- or al, 0x30
- mov byte [ebx], al
- sub ebx, 2
- shr edx, 3
- test ebx, ecx
- jne error_number_loop
+ call wrapped_main
cli
halt:
@@ -72,7 +49,6 @@ halt:
jmp halt
section .bss
-global info_pointer
info_pointer resd 1
resb 0x1000 - $ + $$
stack: \ No newline at end of file