Re: Re: [cc65] How to force a read from a memory mapped register w/o vola=

From: Thomas Giesel <skoe1directbox.com>
Date: 2010-12-08 11:13:14
tile
Date: Wed, 08 Dec 2010 11:13:26 +0100
Message-ID: <0AC407DA0C080A0D1A368@directbox.com>
MIME-Version: 1.0
X-Priority: 3 (Normal)
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
X-PRIORITY: 3
X-MESSAGE-ID: 3262329859


Another workaround:

readreg.s:

_readreg:
    lda the_register
    rts

foo.c:

uint8_t readreg(void);
/* or: void readreg(void); */

void function(void)
{
    readreg();
    /* do the rest */
}

should result in:

    jsr readreg

Yes, still overhead of JSR/RTS.

Thomas


----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Wed Dec 8 11:13:37 2010

This archive was generated by hypermail 2.1.8 : 2010-12-08 11:13:40 CET