Re: [cc65] Inline assembly question

From: Scott Hutter <scott.hutter1gmail.com>
Date: 2009-08-04 05:41:05
In this case yes.  But the example is just showing that you can't jsr to a C
label.  You can JMP to it, or Bxx to it all day long.  JSR appears to only
works with a C function name, not C labels.


On Mon, Aug 3, 2009 at 10:29 PM, Payton Byrd <payton@paytonbyrd.com> wrote:

>  I haven't tried it, but seriously, wouldn't a C goto work here?
>
>  *From:* Scott Hutter <scott.hutter@gmail.com>
> *Sent:* Monday, August 03, 2009 6:12 PM
> *To:* cc65@musoftware.de
> *Subject:* Re: [cc65] Inline assembly question
>
> I have noticed though, that sometimes the compiler doesnt generate labels
> from C labels.  Particularly when JSRs are involved:
>
>     asm("jsr %g", downward);
>     return;
>
> downward:
>     asm("lda #$00");
>     asm("rts");
>     return;
>
> I can only assume that jsr wont work this way in the inline assembly - only
> jmp and other branch opcodes.
>
>
>
>

----------------------------------------------------------------------
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 Aug 4 05:41:12 2009

This archive was generated by hypermail 2.1.8 : 2009-08-04 05:41:13 CEST