Re: [cc65] Question about 65816

Date view Thread view Subject view

From: Ullrich von Bassewitz (uz_at_musoftware.de)
Date: 2001-05-29 18:06:45


On Tue, May 29, 2001 at 11:08:01AM -0400, shubel, paul wrote:
> Question:  How about operations that don't involve registers?
> Can I still do a load accumulator with a 24-bit absolute address?

As far as I know this will not work. But you may switch the 816 into native
mode, and it will execute all existing code with no problems. In this mode,
the additional instructions and addressing modes are available. The only thing
to keep in mind is that if you're switching the registers to 16 bit, interrupt
handlers written for the 6502 will not work, because the registers will be 16
bit wide on entry.

Elite 128 will switch an 816 into native mode if one is found. The only
difference in the code is that the interrupt handler has an additional
instruction like this:

	IRQ816: sep     #$30                    ; Set registers to 8 bit
	IRQ:    pha
		txa
		pha
		lda     $01
		and     #RAMONLY
		ora     #(LORAM | IOEN)
		sta     $01

All other code (except special 816 routines of course) is written for the 6502
but runs on the 816 without problems.

You may have to add additional code to save and restore the bank registers if
you use them, but if your code is located in the first 64K this is not a
problem.

Regards


        Uz
	
	
--
Ullrich von Bassewitz                                  uz_at_musoftware.de
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2001-12-14 22:05:40 CET