mirror of
https://github.com/cc65/cc65.git
synced 2024-12-27 15:29:46 +00:00
Updated documentation for .ADDRSIZE and .FEATURE addrsize
This commit is contained in:
parent
dfddf8f9d2
commit
499eab65f1
@ -1278,6 +1278,36 @@ writable.
|
||||
Pseudo functions expect their arguments in parenthesis, and they have a result,
|
||||
either a string or an expression.
|
||||
|
||||
<sect1><tt>.ADDRSIZE</tt><label id=".ADDRSIZE"><p>
|
||||
|
||||
The <tt/.ADDRSIZE/ function is used to return the interal address size
|
||||
associated with a symbol. This can be helpful in macros when knowing address
|
||||
size of symbol can allow for custom instructions.
|
||||
|
||||
Example:
|
||||
|
||||
<tscreen><verb>
|
||||
|
||||
.macro myLDA foo
|
||||
|
||||
.if .ADDRSIZE(foo) = 1
|
||||
;do custom command based on zeropage addressing:
|
||||
.byte .A5h, foo
|
||||
.elseif .ADDRSIZE(foo) = 2
|
||||
;do custom command based on absolute addressing:
|
||||
.byte .ADh, foo
|
||||
.elseif .ADDRSIZE(foo) = 0
|
||||
; no address size define for this symbol:
|
||||
.out .sprinft("Error, address size unknown for symbol %s", .string(foo))
|
||||
.endif
|
||||
.endmacro
|
||||
</verb></tscreen>
|
||||
|
||||
This command is new and must be enabled with the <tt/.FEATURE addrsize/ command.
|
||||
|
||||
See: <tt><ref id=".FEATURE" name=".FEATURE"></tt>
|
||||
|
||||
|
||||
|
||||
<sect1><tt>.BANK</tt><label id=".BANK"><p>
|
||||
|
||||
@ -2596,6 +2626,12 @@ Here's a list of all control commands and a description, what they do:
|
||||
|
||||
<descrip>
|
||||
|
||||
<tag><tt>addrsize</tt><label id="addrsize"></tag>
|
||||
|
||||
Enables the .ADDRSIZE pseudo function. This function is experimental and not enabled by default.
|
||||
|
||||
See also: <tt><ref id=".ADDRSIZE" name=".ADDRSIZE"></tt>
|
||||
|
||||
<tag><tt>at_in_identifiers</tt><label id="at_in_identifiers"></tag>
|
||||
|
||||
Accept the at character (`@') as a valid character in identifiers. The
|
||||
@ -2648,11 +2684,6 @@ Here's a list of all control commands and a description, what they do:
|
||||
overridden. When using this feature, you may also get into trouble if
|
||||
later versions of the assembler define new keywords starting with a dot.
|
||||
|
||||
<tag><tt>loose_char_term</tt><label id="loose_char_term"></tag>
|
||||
|
||||
Accept single quotes as well as double quotes as terminators for char
|
||||
constants.
|
||||
|
||||
<tag><tt>loose_string_term</tt><label id="loose_string_term"></tag>
|
||||
|
||||
Accept single quotes as well as double quotes as terminators for string
|
||||
|
Loading…
Reference in New Issue
Block a user