delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/03/21/00:28:25

Date: Sun, 20 Mar 1994 20:33:55 -0800 (PST)
From: GLEN HEIN <ghein AT nevada DOT edu>
Subject: asm {} problems
To: ListServ for DJGPP <djgpp AT sun DOT soe DOT clarkson DOT edu>

I am new to using gcc on my 486.  I have been working on some programs that
work with the high end performance of my graphics card.  All of those 
programs were compiled using BorlandC++ ver 3.1.  Now I'm attempting to 
convert them for use on gcc.  I use quite a bit of assembly for speed, 
but I am having problems.

This is piece of sample code:

main()
{
  asm {
    mov %ax, 0x4F02
    mov %bx, 0x0112
    int 0x10 
   }  
   return 0;
}

It should set the video display to VESA mode 112h.  But it doesn't.  It 
compiler at all.  I keep getting a parse error on line 3, which is 
"asm {".  To me there doesn't appear to be any problems.  But there is.
I do not have any include files.  That is the full code.

If someone can, please tell me why this does not work.  Also, can someone 
please send me some sample gas programs or code fragments.  It helps me 
when I can look at someone else's work while I do my own.

Thanks,
Glen Hein
ghein AT nevada DOT edu


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019