From: Keates, Mark (Mark.Keates_at_dendrite.com)
Date: 2002-05-22 10:52:29
However, looking at the code produced,
pCheck isn't used directly so there wouldn't
be any advantage to this mothod :-(
lda _pCheck+0
ldx _pCheck+0+1
ldy #$00
sta ptr1
stx ptr1+1
ldx #$00
lda (ptr1),y
> -----Original Message-----
> From: Keates, Mark [mailto:Mark.Keates_at_dendrite.com]
> Sent: 22 May 2002 09:49
> To: 'cc65_at_musoftware.de'
> Subject: RE: [cc65] statics in zero page
>
>
> Hi Matt,
>
> > Would there be any way to create a zero page pointer?
>
> This worked for me:
>
> #include <stdio.h>
>
> const char msg[] = "Hello.";
>
> #pragma bssseg ("ZEROPAGE")
> static char *pMsg;
> #pragma bssseg ("DATA")
> static char *pCheck;
>
> main(int c,char**v) {
> pMsg = (char *)msg;
> pCheck = pMsg;
> printf("%s %s (%c)\n",msg,pMsg,*pCheck);
> getchar();
> }
> ----------------------------------------------------------------------
> To unsubscribe from the list send mail to majordomo_at_musoftware.de with
> the string "unsubscribe cc65" in the body(!) of the mail.
>
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
This archive was generated by hypermail 2.1.3 : 2002-05-22 10:52:32 CEST