c - Pseudo registers in MSVC -


borland c has pseudo-registers _ax,_bx, _flags etc used in 'c' code save registers temp variables.

is there msvc equivalent? tried @ax, @bx, etc, compiler (msvc1.5) gave error ('40' unrecognized symbol).

i'm developing 16-bit pre-boot app , can't use . thanks.

you don't need have pseudo registers if move values between registers , variables. example:

int = 4; int b = 999; __asm {     mov eax, a; // eax equals 4     mov b, eax; // b equals eax } // b equals 4 

edit: copy flags variable , flags again, can use lahf , sahf instructions. example:

int flags = 0; __asm {   lahf;   mov flags, eax; }  flags |= (1 << 3); __asm {   mov eax, flags;   sahf;   // 4th bit of flag set } 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -