[cc65] question about assignment statement

From: PH <shackman1alpinecom.net>
Date: 2006-01-17 21:36:32
Just a quick question about how the compiler works.  When I do a simple 
assignment statement like:

a = 9;

the resulting assembly code is something like:

ldx     #$00
lda     #$09
ldy     #$05
sta     (sp),y

Why is the x register always cleared before the assignment?  Will the 
optimizer switch remove it?  (I'm asking because I still can't use the 
optimize switch for my code)

Thanks,
Paul
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Tue Jan 17 21:35:25 2006

This archive was generated by hypermail 2.1.8 : 2006-01-17 21:35:29 CET