this code compiled fine for an older version of GCBASIC. I have recently updated to the latest and greatest, and I now get this error during compile:
Missing argument on ASM line 87, 91. Error[128]
My code:
#chip 16F690, 8
#config FCMEN = OFF 'Fail-Safe Clock Monitor Enabled bit
#config IESO = OFF 'IESO: Internal External Switchover bit
#config BOR = OFF 'Brown-out Reset Selection bits
#config CPD = OFF 'Data Code Protection bit
#config CP = OFF 'Code Protection bit
#config MCLRE = On 'MCLR Pin Function Select bit
#config PWRTE = OFF 'Power-up Timer Enable bit
#config WDT = OFF 'Watchdog Timer Enable bit
#config Osc = INTOSC 'Oscillator Selection bits
sub main()
print "voltage test"
wait 1 s
cls
do
print "voltage:"
'get actual voltage
'voltage/bit 20mV/bit
ADvalue = readAD(an3)
'wait 1 s
ADvalue = ADvalue * 4 * 19 'bits converted to millivolts. then divide be 1000 to convert to volts
locate 1, 0
lcdword ADvalue
wait 1 s
cls
loop
end sub
in ASM: (part where there is a problem):
;Start of the main program
banksel TRISA
bsf TRISA,4
movf ,W
movwf
banksel STATUS
call MAIN
movf ,W
movwf
BASPROGRAMEND
sleep
goto $
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
this code compiled fine for an older version of GCBASIC. I have recently updated to the latest and greatest, and I now get this error during compile:
Missing argument on ASM line 87, 91. Error[128]
My code:
#chip 16F690, 8
#config FCMEN = OFF 'Fail-Safe Clock Monitor Enabled bit
#config IESO = OFF 'IESO: Internal External Switchover bit
#config BOR = OFF 'Brown-out Reset Selection bits
#config CPD = OFF 'Data Code Protection bit
#config CP = OFF 'Code Protection bit
#config MCLRE = On 'MCLR Pin Function Select bit
#config PWRTE = OFF 'Power-up Timer Enable bit
#config WDT = OFF 'Watchdog Timer Enable bit
#config Osc = INTOSC 'Oscillator Selection bits
'LCD constants:
#define LCD_IO 4 '4 bit
#define LCD_RS PORTC.1
#define LCD_RW PORTC.0
#define LCD_Enable PORTA.2
#define LCD_DB4 PORTC.2
#define LCD_DB5 PORTB.4
#define LCD_DB6 PORTB.5
#define LCD_DB7 PORTB.6
'end of LCD constants
dir porta.4 in
dim ADvalue as word
main
sub main()
print "voltage test"
wait 1 s
cls
do
print "voltage:"
'get actual voltage
'voltage/bit 20mV/bit
ADvalue = readAD(an3)
'wait 1 s
ADvalue = ADvalue * 4 * 19 'bits converted to millivolts. then divide be 1000 to convert to volts
locate 1, 0
lcdword ADvalue
wait 1 s
cls
loop
end sub
in ASM: (part where there is a problem):
;Start of the main program
banksel TRISA
bsf TRISA,4
movf ,W
movwf
banksel STATUS
call MAIN
movf ,W
movwf
BASPROGRAMEND
sleep
goto $
Note: the problem seems to be directly associated with the "main" subroutine being called in the beginning.
GCBASIC wasn't liking the () in "sub main()". I've fixed this now, you can get the update from http://gcbasic.sourceforge.net/newfiles/update.zip as usual.