Ethan Dicks schrieb:
On 5/23/06, Chris M <chrism3667 at yahoo.com>
wrote:
--- Tony Duell <ard at p850ug1.demon.co.uk>
wrote:
Sure a machine code monitor would have been even
nicer, but...
Agreed. One of the dandiest features of puters like
the C64. But come to think of it maybe that was on a
separate cartridge. It's been a while...
You must have had it on a cartridge. The TIM monitor _did_ come in
ROM on the BASIC 2 and BASIC 4 PETs - I was so happy when I discovered
it on my 2001-32K (sold as a 3032 in Europe) - the instructions I had
included loading TIM off of tape, but they were the instructions for
BASIC 1 (8K static) PETs.
Even more interesting, I found that several software on
tape for the PET
8K had
a TIM prepended. I remember my surprise when I found that Peter Jennings'
Microchess for the PET had some obscure SYS call. Apparently,
this was machine code, but what was there behind theBASIC SYS call? So I
peeked
at the addresses after the BASIC code to find a jump instruction leading
to about
0x800, but what was it in between? There was some fragment of pulling
registers with
PLA and PLP into some zero page memory, just looking like an interrupt
service routine
(IIRC, it was the single step BRK vector, actually).
I managed to replace the three bytes with what I thought to be required
there, something like
CLD, CLI, PLP or alike, and entered RUN - and found myself in a working
complete
TIM monitor. Using itself to adjust its memory boundaries and storing
itself on a
tape, I got a monitor program for free.
I wrote a Scott Adams game engine using TIM - I did all the work on
paper and typed it all
in, one subroutine at a time, in hex. Eventually, I got a nicer ML
monitor with a line-at-a-time assembler/disassembler. My productivity
soared!
I _wish_ the C-64 had come with a monitor, with or without an
assembler/disassembler. It was annoying to have stuff crash to the
blue screen when I forgot to load the monitor (or there wasn't room).
A common
location for monitors surviving a reset (sure one has added a RESET
button to the user port or the serial IEC port) was of course 0xc000.
This helped a lot
when hacking machine code on the C64. TIM relocated to 49152 was rather
common
for work then.
--
Holger Veit