Re: [cc65] Renaming imported zeropage variables in ca65

Date view Thread view Subject view

From: Ullrich von Bassewitz (uz_at_musoftware.de)
Date: 2003-03-12 11:57:43


Hi!

On Tue, Mar 11, 2003 at 06:28:44PM +0100, Marc 'BlackJack' Rintsch wrote:
> Is there any way to declare a label explicitly as zeropage address?
>
> I want to rename some imported zeropage labels within the scope of a
> .proc but the assembler creates absolute adressing.

Which assembler version are you using? Your program works here as it should:

-----------------------------------------------------------------------------
ca65 V2.9.0 - (C) Copyright 1998-2000 Ullrich von Bassewitz
Main file   : test.s
Current file: test.s

000000r 1               .importzp       tmp1
000000r 1               .proc
000000r 1               .zeropage
000000r 1                       tmp2    = tmp1
000000r 1               .code
000000r 1  A5 rr                lda     tmp2
000002r 1               .endproc
000002r 1
-----------------------------------------------------------------------------

Besides that, using the zeropage segment just for the assignment is not
necessary. A segment is only used if code is output, so your code can be
simplified as follows:

> ;-----
> .importzp z1
>
> .proc foo
> 	a_name = zp1
> 	lda a_name
> .endproc
> ;-----

Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz_at_musoftware.de
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2003-03-12 11:58:04 CET