I I'm trying to create an application in real mode that uses the flags to store the results of calculations and other stuff. I'm trying to do this to take up less memory. So can someone please give me some example code or tell me how to do this. I hear it has something to do with eflags or something were they are stored. I already know how eflags is formatted but how do I get to it, and modify it?
ThatGuy2244
0
Light Poster
Recommended Answers
Jump to PostYou don't want to screw around with eflags like that -- you are misusing that flag. What you want to do is declare a variable to hold all the bit-mapped flags then you can set and clear the individual bits to your heart's content.
Jump to PostLets assume all you need are 8 or fewer flags which can be store in one byte of data
flags db 0 ; allocate memory for the 8 flags ; set the 2d bit mov al,flags or al,00000010h mov flags,al
All 6 Replies
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
ThatGuy2244
0
Light Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
ThatGuy2244
0
Light Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
ThatGuy2244
0
Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.