HELP!!!

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Charlie

HELP!!!

Post by Charlie »

use the djgpp compiler and i use

Code: Select all

asm("mov ah,00");
then the compiler gives me a error

c:/djgpp/tmp/ccXmpN7e.s: Assembler messages:
c:/djgpp/tmp/ccXmpN7e.s:153: Error: too many memory references for `mov

and i dont know what i have done wrong can somebody help me??
IRBMe

Re:HELP!!!

Post by IRBMe »

DJGPP uses AT&T style syntax. You seem to be trying to use intel syntax.

Try this:

Code: Select all

asm ("movw $00, %ah")
IRBMe

Re:HELP!!!

Post by IRBMe »

p.s. I found this on google. You might want to have a look at it:

http://www.delorie.com/djgpp/doc/brenna ... djgpp.html
Dreamsmith

Re:HELP!!!

Post by Dreamsmith »

Incidently, in case you're baffled by the meaing of the error: your code is attempting to reference two memory locations, that of a variable named "ah" and memory location 0. Since Intel architecture instructions only reference one memory location in a single instruction (there's no "mov address1, address2" instruction), you get the "too many memory references" error.
Post Reply