On Jun 10, 2009, at 9:26 AM, Cameron Kaiser wrote:
(The BASIC
implementation is also incredibly buggy, mostly due to
poor argument checking... see
http://www.pisi.com.pl/piotr433/
mk85mc1e.htm for a cool example of exploiting a bug in INPUT to do
machine-language coding, in a way only a contortionist could
love...)
Gah, one of the home micro BASICs did something similar, so you
could throw MC in there as a character string and 'trick' the BASIC
into executing it by tripping the parser up - but my brain's
refusing to tell me which one it was now.
This is a pretty common trick on the ZX81/TS-1000. You'd embed
machine code into a REM statement at the top of a program, as a
string of characters. It was a real bitch to enter that stuff from
magazines. :-)
Right, you could do this on a C64 also and probably many machines,
but this
was just a convenient means of storage -- execution of arbitrary ML
was
still permitted by the interpreter. The MK-85 hack is noteworthy
because it
allows you to run stuff on the CPU even though the BASIC supposedly
doesn't
let you (no CALL, SYS, USR(), etc).
OH! Oh yes, I see what you mean. Different trick entirely. Very
cool.
-Dave
--
Dave McGuire
Port Charlotte, FL