flat assembler
Message board for the users of flat assembler.
Index
> Main > about the operating mode the fasm works |
Author |
|
revolution 08 Jun 2010, 13:24
|
|||
08 Jun 2010, 13:24 |
|
canmeng 08 Jun 2010, 13:52
Thank you,revolution.I immediately see the link but i am still confused.since in real mode all the 4GB memory can be accessed,why there is a switch_real16? switch_real32 procedure is enough.
Last edited by canmeng on 08 Jun 2010, 13:56; edited 1 time in total |
|||
08 Jun 2010, 13:52 |
|
revolution 08 Jun 2010, 13:55
DOS and BIOS only work in 16-bit mode. So any interrupts (both hardware and software) must be processed in 16-bit mode, and then return back to 32-bit mode to continue assembling.
|
|||
08 Jun 2010, 13:55 |
|
canmeng 08 Jun 2010, 14:05
Ah,let me think for a while.As if i understand a little.
Both in the switch_real32 and switch_real16, the program will convert to protected mode and after some instructions,convert back to real mode.The switch_real32 and switch_real16 procedures function the same.So what is the difference between them? |
|||
08 Jun 2010, 14:05 |
|
canmeng 08 Jun 2010, 14:21
Also,in the modes.inc ,there exists two GDTs.One is real32_GDT,the other is real16_GDT.The program is as follows :
label real32_GDTR pword real32_GDT_limit dw 3*8-1 ; limit of GDT real32_GDT_address dd real32_GDT ; linear address of GDT real32_GDT rw 4 ; null descriptor dw 0FFFFh,0,9A00h,0CFh ; 32-bit code descriptor dw 0FFFFh,0,9200h,08Fh ; 4 GB data descriptor label real16_GDTR pword real16_GDT_limit dw 2*8-1 ; limit of GDT real16_GDT_address dd real16_GDT ; linear address of GDT real16_GDT rw 4 ; null descriptor dw 0FFFFh,0,9A00h,0 ; 16-bit code descriptor But the intel manual said that there is only one GDT,here are two.Why?confused. Last edited by canmeng on 08 Jun 2010, 14:53; edited 1 time in total |
|||
08 Jun 2010, 14:21 |
|
baldr 08 Jun 2010, 14:43
canmeng,
CPU also has only one eax register, yet eax can contain different values. Read about lgdt instruction. |
|||
08 Jun 2010, 14:43 |
|
canmeng 09 Jun 2010, 02:12
Thank you,baldr.May be what i have learned is too limited.Now i will search some articles about gdt.
|
|||
09 Jun 2010, 02:12 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.