flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > PMODE PROBLEM |
Author |
|
revolution 20 Apr 2011, 15:16
Remove the "+ 1".
Code: push JUMP_POINT - START1 ;+ 1 |
|||
20 Apr 2011, 15:16 |
|
BOTOKILLER 20 Apr 2011, 15:56
revolution wrote: Remove the "+ 1". no, its allright there but the thing which doesnt work is pmode jump |
|||
20 Apr 2011, 15:56 |
|
revolution 20 Apr 2011, 16:23
Remove the "+ 1" from all places:
Code: mov si, DAP - START1 ;+ 1 ;loading si to point to the DAP ;... jmp pword 08h:THEMODEP-START1+9FA00h ;9fa00 |
|||
20 Apr 2011, 16:23 |
|
BOTOKILLER 20 Apr 2011, 16:33
revolution wrote: Remove the "+ 1" from all places: omg, its +1h because it loads to 9fa0h:0001h problem is only with PMODEjump(i even tried 9fa00h instead of 9fa01h) there is no problems with the rest of code |
|||
20 Apr 2011, 16:33 |
|
revolution 20 Apr 2011, 17:01
Did you update the linear address of the GDT?
Code: dd GDT_STARTS ;17h |
|||
20 Apr 2011, 17:01 |
|
revolution 20 Apr 2011, 17:17
By using the offset of + 1 everywhere all your alignments will be out-of-alignment. I would suggest to make your coding job easier to simply remove all the + 1 offsets, then you don't have to worry about things failing later due to some forgotten place where you need + 1 and also having aligned data moving out of alignment.
Surely you don't want to make you job even harder with all the unneeded + 1 stuff, right? I see I missed one place also: Code: mov bp, $ ;7BFFh |
|||
20 Apr 2011, 17:17 |
|
BOTOKILLER 21 Apr 2011, 10:56
revolution wrote: Did you update the linear address of the GDT? yes, thats it(didnt tried yet but that is what can be wrong) |
|||
21 Apr 2011, 10:56 |
|
egos 21 Apr 2011, 14:27
BOTOKILLER, sorry, but you have done bad work again.
Don't destroy EBDA. Initialize the stack. Use "movs" instruction. Don't allow interrupts until you have done interrupt initialization in PM. And so on. Try this sample: Code: relseg equ 60h org 7C00h xor ax,ax cli mov ss,ax mov sp,$$ sti mov ds,ax mov si,relbase mov ax,relseg mov es,ax xor di,di push es push di mov cx,(relsize+1)/2 cld rep movsw retf align 2 relbase: org 0 ... jmp fword 8:Startup32 org 16*relseg+$ use32 Startup32: ... jmp $ label relsize at $-16*relseg org relbase+relsize rb 7DFEh-$ dw 0AA55h |
|||
21 Apr 2011, 14:27 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.