Re: [cc65] Interrupts and break

Date view Thread view Subject view

From: Ullrich von Bassewitz (uz_at_musoftware.de)
Date: 2001-10-01 14:33:33


Hi!

On Mon, Oct 01, 2001 at 02:20:23PM +0200, Daniel Berntsson wrote:
> Do you mean break_handler in libsrc/c64/break.s? As far as I can see
> that just saves a, x, y, pc and the flags, no zero page saving?

This module contains the platform dependent code for the break handler (as you
can see from the fact that it is placed in a directory named after a target
system). The platform independent remainder is in libsrc/dbg/dbgsupp.s.

[stack]
> It is? According to the Commodore 64 Programmer's Reference Guide it is
> 8 bits and the stack is always at 0100-01ff. And the vice monitor only
> shows a byte..

I was talking about the argument stack, not the hardware stack. Sorry for not
stating this explicitly in all places. The 6502 hardware stack is too limited
to be used as argument stack for a high level language. I remember that the
old native cc65 compiler (the one that run on the Atari machines) would crash
if the input contained more than five nested parenthesis in an expression,
because the recursive calls to the recursive descent expression parser caused
the CPU stack to overflow (with just the return addresses!).

The debugger module that comes with cc65 will show both stacks.

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 : 2001-12-14 22:05:42 CET