Skip to content
Snippets Groups Projects
Commit 06e52e44 authored by Jakob Kirsch's avatar Jakob Kirsch
Browse files

push

parent 0b1e184c
No related branches found
No related tags found
No related merge requests found
...@@ -6,17 +6,24 @@ ...@@ -6,17 +6,24 @@
[ORG 0xa200] ; add to offsets [ORG 0xa200] ; add to offsets
start: start:
xor ax, ax ; make it zero xor ax, ax ; make it zero
mov ds, ax ; DS=0 mov ds, ax ; DS=0
mov ss, ax ; stack starts at seg 0 mov ss, ax ; stack starts at seg 0
mov sp, 0x7700 ; 2000h past code start, mov sp, 0x7700 ; 7700h past code start,
; making the stack 7.5k in size ; making the stack 7.5k in size
mov si, 0x7c00 mov si, 0x7c00
mov di, 0xa200 mov di, 0xa200
mov cx, 0x0200 mov cx, 0x0200
rep movsb rep movsb
jmp 0x0000:run
run:
mov al, "?"
int 0x26
mov bx, si
mov di, 0x7c00
int 0x23
jc run
cli ; no interrupts cli ; no interrupts
push ds ; save real mode push ds ; save real mode
...@@ -41,8 +48,7 @@ pmode: ...@@ -41,8 +48,7 @@ pmode:
mov cr0, eax ; by toggling bit again mov cr0, eax ; by toggling bit again
jmp 0x0:huge_unreal jmp 0x0:huge_unreal
huge_unreal: huge_unreal:
jmp 0x0000:0x7c00
int 0x20
gdtinfo: gdtinfo:
dw gdt_end - gdt - 1 ;last byte in table dw gdt_end - gdt - 1 ;last byte in table
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment