Re: [cc65] discarded if statement

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2004-07-15 22:57:41
On Thu, Jul 15, 2004 at 07:16:51PM +0200, carlos wrote:
> 00001Ar 1  A9 01         lda     #$01
> 00001Cr 1  4C rr rr      jmp     L001A; Here opcode $2c(bit absolute) could be usedby the compiler
> 00001Fr 1  A9 02        L000E: lda     #$02

Using .byte $2C is a bad idea for a general purpose compiler. Using this
opcode will read from a memory location unknown to the compiler. This memory
location may contain a hardware register that is reset by the read or similar,
which is not acceptable.

Using .byte $2C is ok if you're programming in assembler, and if you know the
platform well enough to be make sure nothing bad will happen by the additional
read.

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 Thu Jul 15 22:57:46 2004

This archive was generated by hypermail 2.1.8 : 2004-07-15 22:57:55 CEST