<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Fri, 02 Sep 1994 16:10:55 +0100 (BST)
From   : John Sullivan <js10039@...>
Subject: Re: UNDEFINED 6502 OPCODES

On Fri, 2 Sep 1994, Tim Morley wrote:
> dyates@... writes ("Re: UNDEFINED 6502 OPCODES"):
> > As I said to him, I've read an article somewhere documenting all
> > of the 'undefined' codes, and warning that they didn't work on all
> > CPUs - only certain models, or certain batches or something like that.

The plain 6502 used in BBC Bs is fairly reliable as far as the function 
of undefined op-codes goes. As has been mentioned some of the nastier 
games use these for their own purposes. I recommend you find a copy of 
Zalaga and try to disassemble the loader program. This is a straight MC 
file whose exec address equals its load address, so you load it in, run 
your disassembler, and hey! The first thing in the file is a message "(c) 
Orlando" or "Written by Orlando in 198x" or whatever. The joke is that 
most of the bytes in this message are undefined opcodes, and the ones 
that aren't are just simple loads or whatever, and after the message 
block I think is a series of BRKs. So somewhere in this block is a jump 
or branch...

> 
> Or even the one that implemented HCF (Halt and Catch Fire) I believe
> it was an early run of 6502s that had an undocumented opcode that
> would cause them to basically short circuit the power supply through
> the cpu and then catch fire...

This is opcode &02 on all standard 6502s. It isn't a proper HCF as such, 
is just freezes the processor engine completely - even NMIs don't work 
(not sure about RSTs, but a power cycle will sort it).

> 
> 8-)))
> 
> Tim M
> 

John

PS: I've lost the control address for this list, so can the guy in charge 
please change me to @hermes.cam rather than @cus.cam.
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>