X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Floader.asm;h=f1ef6595f009002341869f9824ce88c7996d8eb1;hb=HEAD;hp=9f0ca30579aaf71d9d9abc06d4ebbe5e54718aff;hpb=0dee027ec48a788ab6d65febfdf9165865ecfc2c;p=metatoy diff --git a/src/loader.asm b/src/loader.asm index 9f0ca30..f1ef659 100644 --- a/src/loader.asm +++ b/src/loader.asm @@ -17,10 +17,12 @@ _start: mov ds, ax mov es, ax mov fs, ax ; this will store the original real mode segment - mov ss, ax ; modify the return to real mode jump segment mov [.jmpcs16 + 3], ax + ; put the stack on the next segment, should be free + add ax, 1000h + mov ss, ax mov ax, 0xfffe mov sp, ax @@ -111,6 +113,7 @@ _start: mov ax, 13h int 10h + cli ; paranoid lgdt [gdt_lim] mov eax, cr0