flat assembler
Message board for the users of flat assembler.

Index > OS Construction > unreal mode

Author
Thread Post new topic Reply to topic
amitkumartiwari29



Joined: 25 Sep 2005
Posts: 2
Location: India
amitkumartiwari29 25 Sep 2005, 23:01
can u plz send me the code for unreal mode. I do not know how to avail all the memory of unreal mode. Idea
If possible plz provide the code in C.

Thanx

_________________
How to test that the system is in real flat 4gb mode through a C program.

Please help!
Post 25 Sep 2005, 23:01
View user's profile Send private message Yahoo Messenger Reply with quote
smiddy



Joined: 31 Oct 2004
Posts: 557
smiddy 26 Sep 2005, 00:25
I'm sorry, I have to laugh, bwa-hahahahahahaha! You want what? C from an assembly forum, are you kidding?

Things you should research:

1) GDT how to setup, the specifics for all permutations of models.
2) How to go to protected mode.
3) How to return from protected mode.
4) How to make certain registers will work with 32-bit memory access.

Sorry, no code, I only know ASM, so I can not provide what I don't have. But, with the knowledge from the above list, you should be able to do it yourself in a short matter of time.

Enjoy your research!
Post 26 Sep 2005, 00:25
View user's profile Send private message Reply with quote
Chewy509



Joined: 19 Jun 2003
Posts: 297
Location: Bris-vegas, Australia
Chewy509 26 Sep 2005, 06:00
Umm, you do realise that C abstracts the hardware to a point, that the control you are after is not possible? The only way, is to use assembler.

And to quote smiddy: "I'm sorry, I have to laugh, bwa-hahahahahahaha!"

For last years "512 Byte OS Comp" I wrote a machine monitor that ran from the bootsector, but also used unreal mode in it's operation. You can get it here: http://chewy509.atspace.com/256.html . You will need fasm to assemble, and then use one of the many utilities on the Internet to load it onto the first sector of your floppy, (or bootable USB stick, or harddrive). Since it's a bootsector, or just 355 lines of code, it shoudn't be too hard to understand.
Post 26 Sep 2005, 06:00
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.