[cc65] 16-bit writes on 65816

From: Scott Goldman <scottjg1umich.edu>
Date: 2009-01-05 07:30:22
Hi.

I've been trying to setup cc65 as a toolchain for super nintendo (65816) 
development but I've run into a small problem. consider the following code:
    *(unsigned short *)0x2116 = 0x41a9;
I'm trying to write a value to the register at that address. This 
results in the code:
    ldx     #$41
    lda     #$A9
    sta     $2116
    stx     $2116+1
This code is a problem because while it is a 16-bit register, the 
register isn't mapped to both addresses. The code I would expect would 
look like:
.a16
    ldx     #$41a9
    stx     $2116

Am I doing something wrong? Is there a way to generate the code I would 
expect?

Thanks,
Scott
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Mon Jan 5 07:30:28 2009

This archive was generated by hypermail 2.1.8 : 2009-01-05 07:30:30 CET