Re: [cc65] CC65 and Stack Pointer

From: Hiroji Kimura <us3h-kmr1asahi-net.or.jp>
Date: 2006-11-29 03:43:35
oz,

Thank you for your quick reply. I really appreciate it.

 > 3. Upon entering the interrupt handler do we need to push registers 
and pop them before RTI?

 >If you're calling C code, you will also have to save the zero page 
 >locations used by the compiler. If your interrupt handler doesn't use 
C >code, saving just the registers is ok.

What locations in the zero page does CC65 use?  Could you tell me which 
document has that information? Also I wonder why our calculator works 
even without saving registers and zero page locations.  We are calling a 
c function within an interrupt and I am pretty sure that it will use 
real 6502 registers. I guess we only have "while(1);" in our main function.

Now, I am just curios. Why does cc65 generate codes which depend on 
subroutines like pushax and the secondary stack?  I understand Small-c 
implementation assumes a primary and a secondary registers.  I guess the 
reason is to make porting the c compiler to different architectures 
easier. Is it one of the reasons?

best regards,

Hiroji Kimura
----------------------------------------------------------------------
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 Nov 29 03:43:44 2006

This archive was generated by hypermail 2.1.8 : 2006-11-29 03:43:47 CET