Page 1 of 1

Micro-Soft BASIC

Posted: 10 Nov 2019, 11:44
by marcelk
I believe Micro-Soft BASIC is now fully integrated on the Gigatron, so I split off this thread from the v6502 thread. You can find it in the GitHub repo under Apps/MSBASIC/.

  • Relocated version of "BASIC2" for the Commodore PET, with many thanks to Michael Steil
  • 3,839 bytes free on the standard system. That's 256 bytes more than on the VIC-20 :D
  • Simple line editing and a blinking cursor
  • Break with Ctrl-C works
  • 9-digit floating point, COS(), TAN(), RND() etcetera all work
  • Pi symbol and constant: use backtick key (`) or CHR$(255)
  • Strings including LEFT$(), MID$() and such.
  • Multidimensional arrays
  • INPUT and GET work as expected
  • TIME$ and TIME variables work, and wrap around after 23:59:59.
  • We made POS() and TAB() work as well. This wasn't obvious for a pixel display.
  • Support for 64K systems, giving 36,351 bytes free (MS BASIC can't go all the way to the top of memory).
  • SAVE sends the program into BabelFish. (To my big surprise, this also WORKS in David's emulator! Very well done!)
  • The infamous WAIT6502,1 Easter Egg works...
  • Ctrl-G a.k.a. "BELL" makes a sound. Also as PRINT CHR$(7)
  • 11 text rows instead of 15, also on 64K
  • Small stack. That limits the GOSUB depth to about 8 levels and FOR-TO-NEXT nesting to three levels.
  • For loading a program back into MSBASIC from Pluggy McPlugface, you need to update its BabelFish to get an adjusted typing rate (MSBASIC needs time for tokenising)
  • No file commands (OPEN, CLOSE, PRINT#, INPUT#, GET#, CMD, ...), no SYS command
  • Needs ROM v4 or later
In the faster video mode 3, v6502/MSBASIC is just up to 6 times slower than the original 6502 (see this thread in the 6502 forum). That's much faster than I ever anticipated.