From: Groepaz (groepaz_at_gmx.net)
Date: 2004-01-24 02:32:40
On Saturday 24 January 2004 01:59, Benjamin Bahnsen wrote: > > 1. Use a numeric address: > > > > #define c (*(unsigned char*)0xFF) > > > > 2. Define the variable in an assembler file, declare them as external > > in your C file, and use #pragma zpsym("name") to import it as zeropage > > symbol in the generated assembler module. > > I used the second way you described, because i want to use the variables in > assembler, too. It works perfect, thanks. But i had to rewrite the > memory.cfg to increase the zero page size. The default size was 1ah. I am > not very familar with the kernal functions of the c64 and which zero page > addresses they use. I am wondering, if it is a problem to set the zero page > size to (for example) f0h. I am still able to use file-I/O-functions or the > standard-I/O-functions of CC65? Or do these function use kernal calls, > which change the zero page? file i/o uses kernel calls yes, so you have to take care just as if you would use them from basic (or whatever). gpz ps: actually some other routines, like conio, use certain zeropage locations aswell....so you might only want to use these that are clearly marked as "unused" in the c64 manual. ---------------------------------------------------------------------- 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 : 2004-01-24 02:25:23 CET