Mail Archives: djgpp/1996/09/24/22:45:13
Gidday,
I am trying to get going using inline assembler with DJGPP and I have a
couple of problems/questions.
Firstly, how do I represent HEX and binary numbers. Normally I would do
somthinge like 10h(for hex) and 1011001b(for binary). I also
tried creating a little routine, however it fails to compile :-(
void setvga(unsigned short mode)
{
__asm__ __volatile__(" movw %0, %ax\n
movb $0, %ah\n
int $16 "
:
: "g" (mode)
: "ax" );
}
It comes up complaining about the letter following %. This is a little
confusing for me. Both the AX and AH registers are valid for this chip
and so I tried substituting %1 insead of %0 for the parameter but it
complained about being out of range(which I expected). I am out of ideas
why this is broken. Could someone please shed some light on this for me
please.
Thank you.
Martin.....
- Raw text -