Historical use of "traps"
    Oliver Fromme 
    check+ihtsru00rsqi8pb6 at fromme.com
       
    Thu Jun  9 10:07:57 PDT 2005
    
    
  
Matthew Dillon <dillon at xxxxxxxxxxxxxxxxxxxx> wrote:
 > We need a historian.  I do remember that on the 6502 instruction code
 > 00 was a BRK instruction.  People would often use this to insert hooks 
 > into eproms or proms without erasing them.
On the Commodore PET2001 [*], which was a BASIC computer
based on the 6502, the break pointer pointed to a hex
monitor contained on ROM.  So it was possible to enter
the hex monitor by typing the BASIC command "SYS <n>"
where <n> was an address known to contain 0x00.
Typically used as in "POKE1024,0:SYS1024".
In practice you ended up in the hex monitor quite often
(unintentionally), because when a program crashed due to
a bug in an assembly routine, there was a good chance that
the instruction pointer hit 0x00 sooner or later.  (Unless
you managed to create an endless loop, of course.)
So it was really a "trap".  ;-)
Best regards
   Oliver
[*]  http://www.secnetix.de/~olli/fun/pet2001.gif
-- 
    
    
More information about the Users
mailing list