Basic extensions

Back in 1987 I thought I was being clever. I'd done a lot of reading and knew how the BASIC ROM worked. I'd read magazine articles on how to intercept BRK and add new commands to BASIC. I'd read articles on graphical "fill" routines, BASIC manipulation, partial renumbering and the like. And I saw advertised a ROM that extended BASIC along these lines.

I thought I'd put together a "BASIC Extensions" ROM of my own. Maybe I could even sell it. Not that I tried... probably a good thing; some of the code in this ROM was lifted from magazine listings. Sure, I'd rewritten bits of it, and integrated into this ROM, but very possibly a copyright violation!

I was quite proud of the ROM at the time; I even wrote up a manual for it! It added commands such as ARC (to draw circles, or arcs of a circle) and FILL. It allowed graphical transformations (reflections, rotations, sheering, enlargements), it had a turtle...

For example, this would draw ellipses of opposite colours around a center which can then be "animated" by colour redefinition to make something that looks like a rotating tyre:
  370 VDU29,640;512;
  380 CLTRANS
  390 C=1
  400 FOR A=0 TO 64
  410 C=C MOD 2+1:GCOL1,C
  420 ROTATE PI/32
  430 ARC 0,100,-100,200,100
  440 NEXT
  450 C=1
  460 REPEAT
  470 VDU19,C,0,0,0,0
  480 C=C MOD 2+1
  490 VDU19,C,3,0,0,0
  500 REPEAT UNTIL INKEY(9)
  510 UNTIL INKEY(-1)

Downloads

The ROM

The user manual

An example program showing some of the graphics capabilities.

The source was written in the Lancs 65C02 assembler. To fit into memory it consits of files CHN'd together. To assemble it I had a file:

  *BASIC
  *DRIVE 1
  *DELETE EXTROM
  *COMPACT 1
  *ASS. BASIC -OEXTROM -B12
  *SRLOAD EXTROM 8000 F Q

The source files:
  BASIC
  TABLE
  ARC
  EXT2
  EXT2B
  EXT2C
  EXT2D
  EXT2E
  PACK

Everything as a single SSD image


Last modified: Wednesday, 13-Aug-2014 20:50:08 EDT