There was a bug that caused trouble when ++, --, += or -= was on the same line as any other command, including if ... then. This is fixed now and as usual, http://gcbasic.sourceforge.net/newfiles/update.zip
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Did I see you make mention of porting GCBasic to the Atmel AVR? That would would be great. I could procrastinate on learning 'C' some more, and use GCBasic for the STK500 kit.
Kent
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, one of the things I'm currently working on is AVR support. All of the chip data files have been created, and the Goto, Set, Dir, Pulseout and Wait commands have now been adapted to support AVRs.
At the moment I'm making some major changes to the calculation handling code in GCBASIC to enable it to support AVRs and eventually more data types (Integer and Single, as in QB/VB). There are still quite a few other things that will need work:
- Conditions (If/Do/Wait While)
- Strings / arrays
- Device specific header files such as a-d.h, eeprom.h, etc
- Built in assembler
I've successfully compiled a LED blinking program, which seemed to run fine (albeit very slowly) in AVR Studio.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Very interesting, sounds like you are trying to use the same command set. Is the AVR going to be a seperate GPL'd sourceforge project, proprietary project, or just an extension/addon to the currrent Pic project? Best of Luck, either way.
Also, you are welcome to use any of my meager contributions with your graphical GCBasic. Just hope that any header files of interest, would also hit the GCBasic manual documents.
Kent
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The AVR support will be an extension of the existing project. I'm hoping to keep the language for PICs and AVRs identical so that porting programs across is just a matter of changing the #chip line, as should be the case with 16F <> 18F conversions currently.
Anything in GCBASIC that has been tested will end up in the documentation (eventually). Certainly anything in Great Cow Graphical BASIC will be documented before GCGB is released, both in the documentation for GCGB and GCBASIC.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Looks like using Word size maths broke?
.....
.....
Dim LCDTest as Word
Main:
LCDTest = 2999
For count = 1 to 4
LCDTest = LCDTest*2 + 100
cls
LCDWord(LCDTest)
wait 1 sec
Next
Goto Main
---------- Capture Output ----------
> "C:\Program Files\GCBasic\Compile.bat" C:\PROGRA~1\CRIMSO~1\16F1B6~1
Great Cow BASIC (0.9 18/6/2007)
Compiling C:\PROGRA~1\CRIMSO~1\16F1B6~1 ...
Errors have been found:
system.h (638): END IF without IF
system.h (638): Syntax Error
system.h (638): Syntax Error
The message has been logged to the file C:\PROGRA~1\GCBASIC\ERRORS.txt.
Press any key to continue
SYSMULTSUB16
movf SYSCALCTEMPA,W
movwf SYSDIVMULTA
movf SYSCALCTEMPA_H,W
movwf SYSDIVMULTA_H
movf SYSCALCTEMPB,W
movwf SYSDIVMULTB
movf SYSCALCTEMPB_H,W
movwf SYSDIVMULTB_H
clrf SYSDIVMULTX_H
clrf SYSDIVMULTX
MUL16LOOP
btfss SYSDIVMULTB,0
goto ENDIF15
bcf ,0
btfsc IFSYSDIVMULTB,1
bsf ,0
;?F12L638S79I16?
SYSDIVMULTX + SYSDIVMULTA ;?F12L638S79I16?
ENDIF15
END IF
bcf STATUS,C
rrf SYSDIVMULTB_H,F
rrf SYSDIVMULTB,F
bcf STATUS,C
rlf SYSDIVMULTA,F
rlf SYSDIVMULTA_H,F
movf SYSDIVMULTB,W
movwf SysCalcTempA_H
movf SYSDIVMULTB_H,W
movwf SysCalcTempA
clrf SysCalcTempB_H
clrf SysCalcTempB
call SysCompMoreThan16
movf SysCalcTempX,W
movwf SysIFTemp
btfss STATUS, Z
goto MUL16LOOP
movf SYSDIVMULTX,W
movwf SYSCALCTEMPX
movf SYSDIVMULTX_H,W
movwf SYSCALCTEMPX_H
return
There was a bug that caused trouble when ++, --, += or -= was on the same line as any other command, including if ... then. This is fixed now and as usual, http://gcbasic.sourceforge.net/newfiles/update.zip
Hugh, the word maths look good now, Thanks!!
Did I see you make mention of porting GCBasic to the Atmel AVR? That would would be great. I could procrastinate on learning 'C' some more, and use GCBasic for the STK500 kit.
Kent
Yes, one of the things I'm currently working on is AVR support. All of the chip data files have been created, and the Goto, Set, Dir, Pulseout and Wait commands have now been adapted to support AVRs.
At the moment I'm making some major changes to the calculation handling code in GCBASIC to enable it to support AVRs and eventually more data types (Integer and Single, as in QB/VB). There are still quite a few other things that will need work:
- Conditions (If/Do/Wait While)
- Strings / arrays
- Device specific header files such as a-d.h, eeprom.h, etc
- Built in assembler
I've successfully compiled a LED blinking program, which seemed to run fine (albeit very slowly) in AVR Studio.
Very interesting, sounds like you are trying to use the same command set. Is the AVR going to be a seperate GPL'd sourceforge project, proprietary project, or just an extension/addon to the currrent Pic project? Best of Luck, either way.
Also, you are welcome to use any of my meager contributions with your graphical GCBasic. Just hope that any header files of interest, would also hit the GCBasic manual documents.
Kent
The AVR support will be an extension of the existing project. I'm hoping to keep the language for PICs and AVRs identical so that porting programs across is just a matter of changing the #chip line, as should be the case with 16F <> 18F conversions currently.
Anything in GCBASIC that has been tested will end up in the documentation (eventually). Certainly anything in Great Cow Graphical BASIC will be documented before GCGB is released, both in the documentation for GCGB and GCBASIC.