add @requirezp and allow str/array to be on zp (with warning)

This commit is contained in:
Irmen de Jong
2022-01-14 23:16:05 +01:00
parent 8e56656c8d
commit 641477d6f6
19 changed files with 310 additions and 242 deletions

View File

@@ -266,7 +266,8 @@ Variables should be declared with their exact type and size so the compiler can
for them. You can give them an initial value as well. That value can be a simple literal value,
or an expression. If you don't provide an intial value yourself, zero will be used.
You can add a ``@zp`` zeropage-tag, to tell the compiler to prioritize it
when selecting variables to be put into zeropage.
when selecting variables to be put into zeropage (but no guarantees). If the ZP is full,
the variable will be allocated in normal memory elsewhere.
You can add a ``@shared`` shared-tag, to tell the compiler that the variable is shared
with some assembly code and that it should not be optimized away if not used elsewhere.
The syntax is::