Ethan Dicks wrote:
I wrote at lot of hybrid BASIC/6502-machine-code
programs
back in the day. In the Commodore world (PET BASIC all the
way through the C-128), you had the USR() function, which was
handy if you wanted to pass one floating-point arg to your
program and/or wanted your routine to pass you back a value
In the C64 (and maybe VIC20), someone at Commodore hacked the Microsoft
BASIC to have RAM hooks that could be used to add statements or modify
expression processing. The work was clearly done by someone who wasn't
really all that familiar with the internals of Microsoft 6502 BASIC,
because the hooks were installed in suboptimal places in the ROM code,
making it slightly trickier to add those extensions than it needed to be.
In early 1982, I wrote a program that added structured programming
statements, hexadecimal constants, and various other useful stuff, but
the company that was going to sell it flaked out. I had been using
their Commodore equipment, which I had to send back to them, and I
didn't have the money to buy a C64 (then $595) and 1541 (then around
$400) to continue development. I suppose I should have found another
company to sell the software, or just given it away. Hindsight is 20/20.