From: Daniel Berntsson (danbe628_at_student.liu.se)
Date: 2001-10-01 14:20:23
Ullrich von Bassewitz wrote: > As you can see, it cannot be done without some assembler code. For many > applications, the wrapper code is more than what has to be done in the > interrupt handler itself, so I do usually suggest to think about writing the > interrupt handler in assembler (provided it is rather short). If you don't > want to do this for some reason or another, you may want to have a look at the > break handler. It contains all code that would also be needed for an interrupt > handler (saving registers and zero page locations, calling a C function). 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? > You don't need to save the contents of the stack, but switching the stack > itself is needed. This is because the routines that manipulate the stack > pointer are not reentrant (they work on 8 bits per insn while the stack > pointer is a 16 bit value) 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.. / Daniel Berntsson ---------------------------------------------------------------------- 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 : 2001-12-14 22:05:42 CET