1
0
mirror of https://github.com/KarolS/millfork.git synced 2024-05-29 04:41:30 +00:00
millfork/docs/lang/predefined_constants.md
Karol Stasiak f676e74e38 Macro improvements:
– allow local constants in macros
– allow untyped macro parameters with void
– treat the name of a function as a pointer to it
– add this.function local alias (#118)
2021-11-12 02:10:07 +01:00

30 lines
1.4 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[< back to index](../doc_index.md)
# Predefined constants
* `byte nullchar` the null terminator for strings in the default encoding, equivalent to `""z[0]`, can be overriden by the `NULLCHAR` feature
* `byte nullchar_scr` the null terminator for strings in the screen encoding, equivalent to `""scrz[0]`, can be overriden by the `NULLCHAR_SCR` feature
* `null$ nullptr` the invalid pointer value; the value of the `NULLPTR` feature
* `bool true`, `bool false` boolean constants
* `pointer segment.N.start` the value of `segment_N_start` from the platform definition
* `pointer segment.N.codeend` the value of `segment_N_codeend` from the platform definition
* `pointer segment.N.datastart` the value of `segment_N_datastart` from the platform definition
* `pointer segment.N.end` the value of `segment_N_end` from the platform definition
* `pointer segment.N.heapstart` the address of the first byte in the `N` segment that was not automatically allocated
* `word segment.N.length` the number of byte locations between `segment_N_start` and `segment_N_end`, inclusive
* `byte segment.N.bank` the value of `segment_N_bank` from the platform definition
* `byte segment.N.fill` the value of `segment_N_fill` from the platform definition
* `this.function` the alias of the current function (in macros, it resolves to the actual non-macro function that called the macro)