[Coco] mamou syntax question.

Willard Goosey goosey at virgo.sdc.org
Fri Jul 1 18:33:03 EDT 2011


On Fri, Jul 01, 2011 at 09:59:30PM +0100, Phill Harvey-Smith wrote:
[..]
> ; Command routine pointers
> CommandDispatchTable
> 	FDB	Cmd1
> 	FDB	Cmd2
> 	FDB	Cmd3
> 
> CmdCount	EQU		(*-CommandDispatchTable) / 2
> 
> However no matter how I define CmdCount, it gets set to the number of 
> bytes in the table not the number of words.
> 
> So what is the correct syntax ?

Lines prefixed with LIST: are from a mamou list file

The version of mamou I have is:
LIST:The Mamou Assembler Version 01.00

I played with this for a bit, and it seems that mathematical expressions
in mamou are fussy and spaces are NOT allowed...

This worked.... (mamou -l table.asm)

; table.asm
CommandDispatchTable
        FDB     321
        FDB     732
        FDB     16

CmdCount        EQU             (*-CommandDispatchTable)/2
;end of table.asm

works, the result is....
LIST:00007    0003            CmdCount equ   (*-CommandDispatchTable)/2



but (*-CommandDispatchTable) /2 doesn't work... (fails silently)
LIST:00007    0006            CmdCount equ   (*-CommandDispatchTable) /2



neither does (*-CommandDispatchTable)/ 2
LIST: ***** Error: Unbalanced expression
LIST: 00007  E 0006            CmdCount equ   (*-CommandDispatchTable)/ 2



nor does (*-CommandDispatchTable) / 2
LIST:***** Error: Mismatched brace
LIST:00007    0006            CmdCount equ   (*-CommandDispatchTable) / 2


So, yeah. Picky, picky, picky.  Parens around the equation didn't help
either.  Whitespace ends the equation.

Good luck,
Willard
-- 
Willard Goosey  goosey at sdc.org
Socorro, New Mexico, USA
I search my heart and find Cimmeria, land of Darkness and the Night.
  -- R.E. Howard



More information about the Coco mailing list