Re: [cc65] sta zp,y doesn't give an error

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2011-06-24 23:29:14
Hi!

On Fri, Jun 24, 2011 at 09:38:50PM +0200, Daniel Pralle wrote:
>  just found a "bug" in my code I was searching for 1h.
> Instead of writing data to a buffer in the Zero-page it ended up
> somewhere else. I used STA $30,y. The generated opcode was $99 (STA
> abs,y). because STA ZP,y doesn't exist. Shouldn#t that be an error?

Why do you think this is an error? The assembler did exactly what it was told.
If you want zeropage addressing and nothing else, use something like

        sta     z:$33,y

in which case you would have got

        Error: Illegal addressing mode

Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz@musoftware.de
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Fri Jun 24 23:29:26 2011

This archive was generated by hypermail 2.1.8 : 2011-06-24 23:29:29 CEST