[cc65] Restoring vectors (CBM machines)

Date view Thread view Subject view

From: josef.soucek_at_ct.cz
Date: 2003-06-12 13:34:22


Hello!
I have one suggestion/note to the 'restoring' subject.
There is a one thing in the cc65 lib which protects the cc65 compiled CBM 
programs to be re-run in the same 'enviroment' after the exit, if the 
common ($8000) cartridge is installed. It is the call of the kernal 
routine "RESTOR" ($FF8A) at the last line of the code in crt0.s, which is 
called just before exiting to BASIC.

On C64 the RESTOR ($FF8A) routine do the following:
Jumps to $FD15 and fills the I/O vector area ($0314-$0333) from the table 
which is present from the $FD30 to $FD4F. The table is also put to the RAM 
area under the ROM ($FD30-$FD4F). Btw. Anybody knows why?

The problem which this solution is that I/O vector area is 'reset' to 
'default', but if there is a cartridge installed which depends on the I/O 
vectors 'redirecting' e.g. IDE64 it is snipped off.

My suggestion is to remove the RESTOR call from crt0.s and 'restore' only 
these vectors which are absolutely necessary.

Best regards,
 Josef Soucek




----------------------------------------------------------------------
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 : 2003-06-12 13:34:51 CEST