RISC OS Asm / BASIC Fun : BasC

HOME NEWS DOCS FILES LINKS
BasC

BasC

This is a BBC BASIC V compiler for RISC OS that I have been slowly working on. It is intended to compile BASIC programs to machine language, without requiring any external runtime modules, thus making it possible and reasonable to write system modules in BASIC.

I am now maiking some good progress towards getting this to a usable point. What began as a cleanup effort has turned into making steady progress towards a usable compiler. I am anticipating getting a usable version released by the end of the year.

The lists below will be updated as the compiler becomes more complete.

Things that are working, and in good order include:

  • All integer expresion evaluation.
  • Indirection of integers and bytes.
  • Operators: += -= +p -p NOT ? ! $ ^ * / DIV MOD + - = <> < > <= >= << >> >>> AND OR EOR
  • The simple forms of PRINT, for string, floating point, and integer expressions.
  • The simple keyboard input statements.
  • The SYS statement is now completely working (including name lookup, flags, and A% through H% into R0 through R8).
  • Keywords: ABS AND ASC CALL CHR$ CLG CLS DEF DIM DIV ELSE END ENDIF ENDPROC ENDWHILE EOR FALSE FN FOR GET IF INKEY INKEY$ LEN LET LOCAL MOD MOUSE NEXT NOT OR OSCLI PRINT PROC REM REPEAT RND STEP SWAP SYS THEN TIME TO TRUE UNTIL USR WHILE

Things that are working, though not up to release include:

  • VFP for Floating Point. The difference between this and the normal 5 byte float type could be a trouble area in some programs.

Things that are never going into the compiler (with explination):

  • Eval : Dynamic expression parsing does not fit into a compiled language.
  • BBC BASIC Style Assembly : Not ideal for compilation, an alternative is provided for compiled case only.
  • GOTO and GOSUB : Not needed, not useful, and the compiler ignores line numbers, except when giving an error message.


This site created on RISC OS using !Zap.
Hosting for this site provided by David F
This page viewable with Any Browser
LAST UPDATED: Sept 22nd 2021