home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.apple2
- Path: sparky!uunet!comp.vuw.ac.nz!actrix!David.Empson
- From: David.Empson@bbs.actrix.gen.nz
- Subject: Re: 65802 problem
- Organization: Actrix Information Exchange
- Date: Tue, 26 Jan 1993 22:07:43 GMT
- Message-ID: <1993Jan26.220743.8313@actrix.gen.nz>
- Keywords: 65802
- References: <22JAN199310075283@rigel.tamu.edu> <1993Jan26.090243.29670@actrix.gen.nz>
- Sender: David.Empson@actrix.gen.nz (David Empson)
- Lines: 43
-
- Further to my previous posting on this topic: one possible
- compatibility problem with a 65802 is interrupts.
-
- The 6502 and 65C02 have three interrupt vectors: NMI ($FFFA), RESET
- ($FFFC) and BRK/IRQ ($FFFE).
-
- The 65802 supports the same interrupt vectors when running in
- 'emulation' mode, but has one extra vector for the COP instruction,
- which is at $FFF4. If an $02 byte is fetched as an instruction, the
- computer will fetch an interrupt vector from $FFF4, resulting in a
- jump to a strange location, and probably a crash.
-
- Even worse, if the 65802 is running in 'native' mode, there are
- completely separate vectors: COP ($FFE4), BRK ($FFE6), NMI ($FFEA) and
- IRQ ($FFEE). These vectors will also point to invalid code (they are
- part of the monitor's command lookup table).
-
- This means that if you're writing code that runs in 65802 native mode
- on a IIe (or IIc), you must have interrupts disabled, and make sure
- you don't execute any BRK or COP instructions. Interrupts should not
- be enabled again until you return to emulation mode.
-
- The only exception to this is if you're using the language card
- yourself (maybe under DOS 3.3, but not ProDOS) - you can then set up
- the vectors yourself.
-
-
- The IIgs has legal values in all vectors, so it supports emulation mode
- and native mode interrupts. The IIgs always fetches interrupt vectors
- from the ROM, so there is no problem with native mode interrupts under
- ProDOS or Pascal.
-
-
-
- Another possibile cause of the problem is if the RANA drive's
- interface card is executing an illegal 6502 opcode. Most of these
- result in a 'no operation' on the 65C02, have peculiar effects on the
- 6502, but are valid instructions on the 65802.
- --
- David Empson
-
- Internet: David.Empson@bbs.actrix.gen.nz EMPSON_D@kosmos.wcc.govt.nz
- Snail mail: P.O. Box 27-103, Wellington, New Zealand
-