PDA

View Full Version : Missing Operator ASM error



retepsnikrep
- 18th June 2012, 06:42
In the below code which is being used to store date in the program code space I get missing operator error (112) in the last three lines of data, the mixed hex and string stuff. Any ideas, sorry i am not familiar with MPASM syntax or conventions.



'-----[The DATA table]--------------------------------------------------------
GOTO OverData ; Make sure data doesn't try to execute
ASM
DataTable
DB "Hello World " ; etc.
DB "This is a test "
DB $00,$02,$12,"WAmps"
DB $01,$02,$11,"VAmps"
DB $02,$02,$10,"UAmps"
endasm

OverData:

retepsnikrep
- 18th June 2012, 06:50
OK sorted it data has to be in decimal!!

Arggh all my data for my large table is in $xx hex format, any way round that without converting it all?

Darrel Taylor
- 18th June 2012, 07:26
It doesn't have to be in decimal.
But since the data is in assembly language, you need to use the assembly language format for hexadecimal numbers.

$ is for PBP.
0x is for ASM

DB 0x00,0x02,0x12,"WAmps"

Just do a search and replace.