DragonFly BSD
DragonFly users List (threaded) for 2005-06
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: Historical use of "traps"


From: Oliver Fromme <check+ihtsru00rsqi8pb6@xxxxxxxxxx>
Date: 09 Jun 2005 17:07:57 GMT

Matthew Dillon <dillon@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

-- 



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]