Thread: hpl me plzzzz
View Single Post
Old Oct 27th, 2005, 7:12 PM   #1
ASMvsC++
Newbie
 
Join Date: Oct 2005
Posts: 12
Rep Power: 0 ASMvsC++ is on a distinguished road
hpl me plzzzz

Hi guys

I got some ques but it seems to be noone in Vietnamese forum can solve for me,So I decided to move here for my ques cuz I know most of European and American they know much bout system

Im using BC 5.5 compiler .I have written a simple code like this

#include <conio.h>
#include <iostream.h>
void main()
{
       asm{ mov eax,100
               add eax,200
             }
     cout<<"Hi!"<<"\n";
     getch();
}


I compiled to exe file and run in Dos Box command line(dos box console in Window) and it worked

So let me ask some ques
did BC 5.5 complile that source to 32 bit opcode Or 16 bit opcode??(me wanna make sure)
and did it run in Protect Mode???
I think it compiled source to 32 bit code coz it didnt cause error while compiling (my source have some 32bit code ,see???)

So if it was 32 bitcode why it could run in Dos Box ,coz Dos Box using
VM86 Mode

If I write another source


#include <conio.h>
#include <iostream.h>
void main()
{
     cout<<"Hi!"
    getch();
}  /// No 32 bit asm code
if I compile it --> will Compiler generate 32 bit code??
And in this case wil it run in Protect mode??/

Thx plzz help me coz I still have bunch of ques after this
Every ans is apreciated

Last edited by ASMvsC++; Oct 27th, 2005 at 7:40 PM.
ASMvsC++ is offline   Reply With Quote