Re: [cc65] zpsave in data segment?

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2005-04-11 12:24:56
Hi!

On Mon, Apr 11, 2005 at 12:15:01PM +0200, Sidney Cadot wrote:
> Indeed, most platforms declare "spsave" (which saves the S register)
> inside the BSS segment already; I can think of no good reason why there
> would be a difference between spsave and zpsave in this respect.

The bss segment is cleared *after* saving the zeropage registers into zpsave.
Placing zpsave into bss would effectively destroy its contents when zerobss is
called. The stack pointer on the other side is saved after clearing bss, so it
is save to place spsave there.

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 Mon Apr 11 12:25:42 2005

This archive was generated by hypermail 2.1.8 : 2005-04-11 12:25:44 CEST