Re: [cc65] 16-bit writes on 65816

From: Scott Goldman <scottjg1umich.edu>
Date: 2009-01-07 03:34:09
Good advice! I'll take a look at some of the crt0.s for other platforms 
and make sure i'm setting up the software stack properly and whatnot. I 
guess it was kind of naive to assume I could just call C functions 
without any setup.

Thanks,
Scott

Ullrich von Bassewitz wrote:
> On Tue, Jan 06, 2009 at 06:34:05PM -0500, Scott Goldman wrote:
>   
>> Ah, I was under the impression that the 65816 was mostly backwards
>> compatible (it can execute the same opcodes) but there must be some
>> trickery there. I try to call my C function from asm but the runtime for
>> comparing 16-bit values (tosicmp) seems to have issues as my for loop
>> short circuits and never runs the code in the inner body:
>>     
>
> This is probably a stack and/or zeropage issue. The generated code and the C
> runtime expects some zeropage locations to be available and others to be set.
> For example, there's a software stack implemented by a zero page pointer. If
> it isn't set up correctly, things will go havoc.
>
> Regards
>
>
>         Uz
>
>
>   
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Wed Jan 7 03:34:18 2009

This archive was generated by hypermail 2.1.8 : 2009-01-07 03:34:19 CET