flat assembler
Message board for the users of flat assembler.

Index > OS Construction > ureal mode

Author
Thread Post new topic Reply to topic
amitkumartiwari29



Joined: 25 Sep 2005
Posts: 2
Location: India
amitkumartiwari29 26 Sep 2005, 22:41
Can you tell me a program in ASM to check if my system is in Unreal mode or not or a program to create an array of 3 GB.

Thanks and regards

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

Please help!
Post 26 Sep 2005, 22:41
View user's profile Send private message Yahoo Messenger Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 27 Sep 2005, 07:27
you have computer with 3gb RAM?
Post 27 Sep 2005, 07:27
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20338
Location: In your JS exploiting you and your system
revolution 27 Sep 2005, 08:07
Try this:
Code:
use32
smsw eax
shr eax,1 ;test for PE
jc SystemIsInPortectedMode
or eax,-1
shr eax,16
jz SystemIsInRealMode
use32
;code for unreal mode goes here
ret
SystemIsInRealMode:
use16
;code for real mode goes here
ret
SystemIsInPortectedMode:
use32
;code for protected mode goes here
ret    
If you need it in C then you can probably use inline assembly.

Assemble for 32 bit run mode (use32). If the code is running in 16 bit mode (real mode) at run time then it will still run but using AX instead of EAX.
Post 27 Sep 2005, 08:07
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.