In genral, BASICs were not extendable like that. It is
very difficult to
add new keywords ot a BASIC interpretter, and the way to do it is not
often docuemnted.
MICROS~1 BASIC typically has a somewhat awkward DEFUSR function in the
language to let you create and call machine language code. If you can
Sure. Most BASICs had some way to call machine language routines. But
doing so was totally differnet to using built-in fucntions (or using
BASIC subroutines) and requried you gerneally to remember th rright
addresses. Better tnan nothing, but a kludge.
That's not quite right. If you knew your stuff, for example, you could
put USR() to very good, er, use. One of my earliest hacks was something
that looked at the RAM under ROM on a C64. I wrote a USR routine that got
its argument from FAC#1, turned it into an integer, banked out ROM, copied out
a value, turned it back into a float and stuffed it in FAC#1, so I could
either PEEK() or USR() an address.
Even SYS/CALL/etc. could be made more useful if you knew the BASIC routines
to get and grab parameters. jsr $aefd:jsr $ad9e:jsr $b7f7 is burned in my
brain (check for and skip a comma, call BASIC FRMEVL to get an expression
and then turn it into a 16-bit integer at $0014-5) allowing stuff like
SYS49152,3+35*X to work.
My current idiom on the C64 is BASIC for stuff that isn't speed critical and
assembly for the rest. Such stuff benefits from simple tools like that.
--
------------------------------------ personal:
http://www.cameronkaiser.com/ --
Cameron Kaiser * Floodgap Systems *
www.floodgap.com * ckaiser at
floodgap.com
-- "Garbage in -- gospel out" -------------------------------------------------