xc-basic3
xc-basic3 copied to clipboard
A BASIC cross compiler for MOS 6502-based machines
> XC=BASIC compiler version v3.1.1 (Oct 27 2022) When it comes to the C64/C128 target, XCB3.1 allocates a total of 25 bytes for the following features: - 1 byte for...
``` test = 0.12345 print cint(test) print cint(test) ``` results to ``` 19532 0 ```
> XC=BASIC compiler version v3.1.0-alpha-0 (Sep 11 2022) ``` dim screen1 as BYTE dim for2 as BYTE dim print33 as BYTE dim loop456 as BYTE ``` Any identifier with a...
Most languages support lazy evaluation, i.e. a boolean expression is evaluated from left to right and parts that don't need to be evaluated to know the result are skipped, i.e....
- Tried to opening a serial port with the syntax OPEN 2,2,4,CHR$(8)+CHR$(0): REM 1200 BAUDS But C64 returns "ERROR 240". It seems that serial communication is not supported. Can you...
The code is for basic 4, the comments shows calls for basic 2. working code is "LOAD" sample LDA #FNTABLE.LO ;PLACE POINTER TO FILE NAME IN ($DA) STA $DA LDA...
I was trying to implement joystick reading, but my program crashed. Here is the minimal code that still crashes and can demonstrate the problem. (I cloned the latest xcbasic today)....
This works: ``` SUB Test(Col AS WORD) SHARED STATIC PRINT "Hello World" END SUB CALL Test(1) ``` This does not work: ``` SUB Test(Col AS WORD, Text AS STRING *...
Although it's invalid, the compiler does not complain about the following syntax: ``` DIM x, y AS LONG ``` One would assume that both `x` and `y` are defined as...
e.g. ``` TYPE T FUNCTION f AS BYTE() STATIC POKE @f, 0 END FUNCTION END TYPE ```