[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Inline asm?

Hi folks,

It's come to my attention that a *lot* of DOS-based low-level graphics
example code I've found (mostly Pascal/C/ASM) has inline assembly of some
kind, and it's usually pretty compiler-specific.  I was wondering if there
was any way to inline assembly code for the Intel architecture using some
combination of say, NASM and gcc/g++? If so, could someone give me a
run-down on how to do it?

And, if it is possible, would there be any way to set up a macro to
allow me to actually "inline" asm code -- that is, embed it in my C++ code
itself? One of the things that impressed me about VC++ was that you could
simply do something like:

...(C++ code)...

__asm {
  asm code....


(C++ code) ...

But I doubt that the gnu assembler chews on the mnemonics the same way, so
I thought NASM would be the way to go (since it's supposed to assemble
code in a similar manner as MASM)...

Also, could someone tell me what the "VGA DAC" is? I ran across the term
in an SVGALib tutorial but haven't been able to track down what it is. My
guess is that the DAC is a collection of registers for holding color
values, but that guess was only obtained from the context of the tutorial
Thanks in advance,


Joel R. Stanley                   *  jstanley@up.edu       
http://rainier.up.edu/~jstanley   *  #include <std_disclaimer.h>