mirror of
https://github.com/cc65/cc65.git
synced 2024-12-25 02:29:52 +00:00
commit
ffa5371a05
@ -1278,27 +1278,28 @@ writable.
|
|||||||
Pseudo functions expect their arguments in parenthesis, and they have a result,
|
Pseudo functions expect their arguments in parenthesis, and they have a result,
|
||||||
either a string or an expression.
|
either a string or an expression.
|
||||||
|
|
||||||
|
|
||||||
<sect1><tt>.ADDRSIZE</tt><label id=".ADDRSIZE"><p>
|
<sect1><tt>.ADDRSIZE</tt><label id=".ADDRSIZE"><p>
|
||||||
|
|
||||||
The <tt/.ADDRSIZE/ function is used to return the interal address size
|
The <tt/.ADDRSIZE/ function is used to return the interal address size
|
||||||
associated with a symbol. This can be helpful in macros when knowing the address
|
associated with a symbol. This can be helpful in macros when knowing the address
|
||||||
size of symbol can allow for custom instructions.
|
size of symbol can help with custom instructions.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
<tscreen><verb>
|
<tscreen><verb>
|
||||||
.macro myLDA foo
|
.macro myLDA foo
|
||||||
|
.if .ADDRSIZE(foo) = 1
|
||||||
.if .ADDRSIZE(foo) = 1
|
;do custom command based on zeropage addressing:
|
||||||
;do custom command based on zeropage addressing:
|
.byte 0A5h, foo
|
||||||
.byte .A5h, foo
|
.elseif .ADDRSIZE(foo) = 2
|
||||||
.elseif .ADDRSIZE(foo) = 2
|
;do custom command based on absolute addressing:
|
||||||
;do custom command based on absolute addressing:
|
.byte 0ADh
|
||||||
.byte .ADh, foo
|
.word foo
|
||||||
.elseif .ADDRSIZE(foo) = 0
|
.elseif .ADDRSIZE(foo) = 0
|
||||||
; no address size define for this symbol:
|
; no address size define for this symbol:
|
||||||
.out .sprinft("Error, address size unknown for symbol %s", .string(foo))
|
.out .sprintf("Error, address size unknown for symbol %s", .string(foo))
|
||||||
.endif
|
.endif
|
||||||
.endmacro
|
.endmacro
|
||||||
</verb></tscreen>
|
</verb></tscreen>
|
||||||
|
|
||||||
@ -1307,7 +1308,6 @@ either a string or an expression.
|
|||||||
See: <tt><ref id=".FEATURE" name=".FEATURE"></tt>
|
See: <tt><ref id=".FEATURE" name=".FEATURE"></tt>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<sect1><tt>.BANK</tt><label id=".BANK"><p>
|
<sect1><tt>.BANK</tt><label id=".BANK"><p>
|
||||||
|
|
||||||
The <tt/.BANK/ function is used to support systems with banked memory. The
|
The <tt/.BANK/ function is used to support systems with banked memory. The
|
||||||
@ -2683,6 +2683,11 @@ 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
|
overridden. When using this feature, you may also get into trouble if
|
||||||
later versions of the assembler define new keywords starting with a dot.
|
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>
|
<tag><tt>loose_string_term</tt><label id="loose_string_term"></tag>
|
||||||
|
|
||||||
Accept single quotes as well as double quotes as terminators for string
|
Accept single quotes as well as double quotes as terminators for string
|
||||||
|
@ -688,15 +688,13 @@ static ExprNode* FuncAddrSize (void)
|
|||||||
if (Sym) {
|
if (Sym) {
|
||||||
AddrSize = Sym->AddrSize;
|
AddrSize = Sym->AddrSize;
|
||||||
} else {
|
} else {
|
||||||
Error ("Unknown symbol or scope: `%m%p%m%p'",
|
Error ("Unknown symbol or scope: `%m%p%m%p'", &ScopeName, &Name);
|
||||||
&ScopeName, &Name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (AddrSize == 0) {
|
if (AddrSize == 0) {
|
||||||
Warning(1, "Unknown address size: `%m%p%m%p'",
|
Warning (1, "Unknown address size: `%m%p%m%p'", &ScopeName, &Name);
|
||||||
&ScopeName, &Name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Free the string buffers */
|
/* Free the string buffers */
|
||||||
|
Loading…
Reference in New Issue
Block a user