News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Real Mode

Started by OneX, December 14, 2011, 11:39:56 AM

Previous topic - Next topic

dedndave

there is a word in the BIOS data area that tells you how many paragraphs are available
there may also be an INT for this - i forget   :P
consult Ralf Brown's Interrupt List

bomz

#31

This is not 16 bit programming
Quote0
654336

1048576
2145583104

bomz

Can't understand - what happen with EBP under Protected Mode.
Under DOS bp~0 sp~0FFFEh. In P-Mode esp set 0, but EBP not change. Why?

FORTRANS

Quote from: dedndave on December 21, 2011, 03:05:12 PM
there is a word in the BIOS data area that tells you how many paragraphs are available
there may also be an INT for this - i forget   :P
consult Ralf Brown's Interrupt List

Hi,

   BIOS INT 12H returns the memory as the number of 1k blocks
in AX.  (8088 accessible.)

Regards,

Steve N.

bomz

I as always find good tutorial Russian language Determine Memory

E820h INT 15h - most modern and universal
88h   INT 15h - all memory over 1 mb to 16 mb
C7h  INT 15h - under 16 mb (last IBM PS/2) back Memory Map
E801h INT 15h

int12h back memory under 640 kb only.

Now I develop code and want make Memory manager, when DOS expander, and last half-OS. So I need to determine all free memory over 1 mb, and map it, considering area which a busy.

dedndave

ah yes - i remember now   :P

we had a guy in here some time ago playing with that
this thread has 9 pages of info
http://www.masm32.com/board/index.php?topic=13415.0
as i recall, Michael had some nice code in there

bomz



Now I think how allocate memory. Memory under 1 mb may be devided to some part, and prog must distribute it for progs 10 mb 16 mb ....

bomz

#37
Quote from: bomz on December 22, 2011, 12:02:39 PM
Can't understand - what happen with EBP under Protected Mode.
Under DOS bp~0 sp~0FFFEh. In P-Mode esp set 0, but EBP not change. Why?

I always think that EBP (BP) is bottom of stack. But EBP is pointer to LOCAL variables, and it's changes each time when PROC call and LOCAL variables exist from the top of stack. any need to set it in P-MODE, it's works itself

Quotedescriptor_XMS_Memory         DESCRIPTOR <   0ffffh,      0,    10h,   10010010b,  10001111b,      0>
Granularity 1 (4096 bytes); Limit 4G/4096b-1byte(0fffffh); address segment 1 mb (100000h); Data Type P=1, DPL=00b, S=1, Type=001b, A=0

bomz

Is it possible in Protected mode only remap Bios Interrupts Handlers to IDT?
For clock Mouse and keyboard only...

MichaelW

Quote from: bomz on December 23, 2011, 04:58:56 PM
Is it possible in Protected mode only remap Bios Interrupts Handlers to IDT?

Possibly with a protected-mode BIOS, like the IBM PS/2 ABIOS used by OS/2. A normal real-mode BIOS is 16-bit code, that does things that are not allowed in protected mode, such as loading the segment address of the BIOS data area into DS/ES.
eschew obfuscation

bomz

#40
UNREAL MODE, FLAT REAL MODE.... change dos versions, change processors in virtual machine. try on real machine. open-close A20. don't work
http://www.df.lth.se/~john_e/gems/gem0022.html
http://www.assembly.happycodings.com/code54.html
http://devotes.narod.ru/Books/3/ch10_04e.htm
http://wasm.ru/article.php?article=lfbdos

I do it