From: Ullrich von Bassewitz (uz_at_musoftware.de)
Date: 2003-08-29 12:23:57
On Fri, Aug 29, 2003 at 06:12:08AM -0400, Keates, Mark wrote: > Can the linker warn you if an instruction (e.g. STA/X/Y, ORA/AND etc) > will potentionally access read-only data? Currently not, but this is a good idea and would nicely fit into the new .ASSERT command that is implemented in the head branch to check for things like the "jmp ($XXFF)" anomaly of the 6502. > Also, which part of the config file decides this? > MEMORY has "type = ro" and SEGMENTS has "type = wprot" "wprot" is obsolete, it is identical to "ro". The type of the segment determines which memory are is suited for placement: "rw" or "bss" type segments cannot go into a "ro" memory area, while it is possible to place a "ro" segment into a "rw" memory area. If you are using an emulator, and this emulator allows write protecting memory areas (VICE allows this for example), you can load your program into the emulator, write protect all "ro" segments, and let the program run. This does sometimes help when searching for memory overwrite errors caused by invalid pointers or similar. 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.
This archive was generated by hypermail 2.1.3 : 2003-08-29 12:24:06 CEST