base:safeguard_against_putting_data_in_wrong_segment
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | base:safeguard_against_putting_data_in_wrong_segment [2017-07-28 18:50] (current) – created jupp3 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | Especially in macros, you often want to put data into a specific segments. After that is done, afaik, there' | ||
+ | The next best thing would be to make current segment " | ||
+ | One good safeguard for this is to create an empty segment. | ||
+ | |||
+ | Add to your config file: | ||
+ | < | ||
+ | MEMORY | ||
+ | { | ||
+ | EMPTY: start=$07FF, | ||
+ | ... | ||
+ | } | ||
+ | SEGMENTS | ||
+ | { | ||
+ | EMPTY: | ||
+ | ... | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | Then, whenever you want to make sure that developer HAS to define a segment, do: | ||
+ | < | ||
+ | .segment " | ||
+ | </ | ||
+ | If you don't: | ||
+ | < | ||
+ | ld65: Warning: config.cfg(4): | ||
+ | ld65: Error: Cannot generate output due to memory area overflow | ||
+ | Makefile: | ||
+ | </ |
base/safeguard_against_putting_data_in_wrong_segment.txt · Last modified: 2017-07-28 18:50 by jupp3