Re: Question about 65816

From: Ruud Baltissen (g.j.p.a.a.baltissen_at_kader.hobby.nl)
Date: 1998-07-10 06:09:25

Hallo Stephen,

Thank you for answering the questions. But....

> > 1-    The datasheets say the BRK and COP instruction are 2 bytes long when
> >       in native mode. Correct?
> 
> Yup!
>........
> > 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:
> 
> Hey, this one was pretty easy -- three Yups and two sentences :)

... in fact I hoped for a 'No' to the first question. The BRK
instruction of the original 6502 is one byte long (At least I think).
This means that in the emulation mode it must be one byte long as well.
As it is two bytes long in the native mode it simply means that a
assembler listing must look like this:

.P6502	.....		; for original 6502s
	BRK
	.....

.P65C02	.....		; for 65C02 and 65SC02
	BRK
	.....

.P816/E	.....		; for 65SC816 in emulation mode
	BRK	
	.....

.P816/8	.....		; for 65SC816 in native mode, 8 bits
	BRK $xx	
	.....

.P816/16 .....		; for 65SC816 in native mode, 16 bits
	BRK $xx	
	.....

Correct?

This also means that a RTI causes the CPU to return to the address
represented by the dots in the first line after the BRK ($xx)
instruction.
Correct?

For the others, I read your mail but as long I have problems with the
above, I'll save them for another time in the future to reread them and
apriciate them.
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.