12F675: DEC modifier not accepted
I get a "bad expression" error in Microcode Studio on the SEROUT line below. When I remove the "DEC" modifier all works fine. Is there any reason DEC shouldn't be working here?
I'm using Microcode Studio 2.2.1.1
Thanks!
Jeff
Code:
@ DEVICE INTRC_OSC, WDT_OFF, MCLR_OFF, PWRT_ON
INCLUDE "modedefs.bas"
define OSC 4
result VAR word 'A/D CONVERSION RESULT STORAGE BYTE
ANSEL=%00100001 'SET GP.0 TO ANALOG INPUT, Fosc/32, ALL ELSE = DIGITAL I/O
MAIN:
GOSUB GETADC 'SETUP A/D
PAUSE 1000 'PAUSE FOR 1 SECOND
SEROUT GPIO.1,N2400,[dec result] 'SEND A/D CONVERSION RESULT TO THE PC SERIAL PORT
PAUSE 1000 'PAUSE FOR 1 SECOND
GOTO MAIN
GETADC:
adcin 0,result
return