Hallo allemaal, This one is for the 65816-experts amongst us: questions about programming the 65816: 1- The datasheets say the BRK and COP instruction are 2 bytes long when in native mode. Correct? 2- (Only if answer for 1 = yes) When I look further the only thing related to this second byte is a byte, called Signature, which is read. The only thing I can imagine of this is that this byte can be used for programmers to find out which BRK or COP has caused the SW- interrupt. correct? 3- (Only if answer for 1 = yes) Used in the emulation mode, the BRK instruction only must be 1 byte long. But still PC seems to be increased with 2 after the instruction: Datasheet: Cycle No E=0 E=1 address data description 1 1 PC-2 X Opcode 2 2 PC-1 X Signature 3 S PB write PB to Stack, dec SP 4 3 S PCH write PCH to Stack, dec SP 5 4 S PCL write PCL to Stack, dec SP 6 5 S P write P to Stack 7 6 VL (VL) read vector low, PB := $00 8 7 VH (VH) read vector high I expected to find in the datasheets something like this: Cycle No E=0 E=1 E=0 E=1 address address data description 1 1 PC-2 PC-1 X Opcode 2 PC-1 X Signature 3 S PB write PB to Stack, dec SP 4 2 S S PCH write PCH to Stack, dec SP 5 3 S S PCL write PCL to Stack, dec SP 6 4 S S P write P to Stack 7 5 VL VL (VL) read vector low, PB := $00 8 6 VH VH (VH) read vector high E = Emulationbit Missing in the above diagrams: Cycle: VDA VPA Meaning: 1 1 1 Fetch opcode 2 0 1 Valid program Address, may be used for program Cache control 3..8 1 0 Valid data address I don't know what is meant with "valid program address...." but I have the feeling that a possible misunderstanding of the above diagrams has to do with this line. Then still the 2 bytes and/or PC-2 are not explained. Who has an answer, please? 4- JML = JuMp Long ($..) but the datasheet says it is "absolute indirect". This means it has to be used like this: JML ($1234) causing the 65816 to fetch the three bytes from the address $1234..$1236. Correct? Thanks. Groetjes, Ruud - This message was sent through the cbm-hackers mailing list. To unsubscribe: echo unsubscribe | mail cbm-hackers-request@dot.tcm.hut.fi.
Archive generated by hypermail 2.1.1.