flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > PM32: CPL0 > CPL3 > INT xx !> incorrext |
Author |
|
nop 17 Jul 2013, 05:49
welcome to fasm board omegicus sory i dont know bout pm ring stuf but im sure somebody wil help u soon
|
|||
17 Jul 2013, 05:49 |
|
cod3b453 17 Jul 2013, 16:54
When you say "incorrect data" what is incorrect? i.e. which registers or memory regions?
It may be worth looking at the hardware task switching/task management sections in the Intel/AMD system programming manuals, if you haven't already. |
|||
17 Jul 2013, 16:54 |
|
omegicus 17 Jul 2013, 18:28
i mean: in R0 to R0 state i getting IRQ1 (keyboard) key in AL register. all works fine.
But when R0 INT to R3 code: al contains some incorrect data, not key state.... It is not so important question, some way i will do it))), but it's a time.......((( I thought may be someone have relat. problems... and have an answer... |
|||
17 Jul 2013, 18:28 |
|
baldr 17 Jul 2013, 18:42
omegicus,
It should be guesswork? Show some relevant code/data. |
|||
17 Jul 2013, 18:42 |
|
omegicus 17 Jul 2013, 18:58
terminal.exe:
.char: mov eax, OM_F_GETC int 0x27 or al, al jz .char mov bl, al int27.inc: ; this code get byte from keyboard and put result in AL... in CPL0 -> CPL0 all works fine ALIGN 4 I_27: CLI .... STI IRETD IRQ1.inc: ; keyboard handler ALIGN 4 IRQ1: CLI PUSHAD PUSH DS ES FS GS CLD MOV AX, CORE_DS MOV DS, AX ... IN AL, 0x61 ; give finishing information OUT 0x61, AL ; to keyboard... EINTRM POP GS FS ES DS POPAD STI IRETD i don't know what to show... there are lot of code... while i not turn on Ring3 mode all worked super fine! Fact1: standart INT works correctly while not needed to return some data to Ring3 back (for example, PrintString via INT works correctly) Fact2: IRQ0 (Scheduler) works correct anyway: it's switch tasks (Ring0 and Ring3) and working in Ring0 too... all ok. I have only one idea: maybe INT (R0) must detect from what CPL was interrupt called... and if it was not R0 modify return stack from just EIP/CS/EFLAGS to EIP/CS/EFLAGS/ESP/SS... before IRET call... such as in Scheduler... i'll try this soon and if it IS i'll write about... |
|||
17 Jul 2013, 18:58 |
|
omegicus 18 Jul 2013, 07:11
ohohoh!!!
cool... i understood! thats was becouse i forot about my mouse driver... it was loaded as mice.exe (such a program resident, it detects mice and install's IRQ12). Becouse I turned on Ring3 -> this code now in Ring3 -> IRQ not in CPL0... so when i disabled mice.exe loading my code starts working fine. it's my fault to do something and then modify core... i should have to make Ring3 code and just then make drivers and so.... |
|||
18 Jul 2013, 07:11 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.