1
0
mirror of https://github.com/cc65/cc65.git synced 2026-04-24 14:17:23 +00:00

Added builtin .min() and .max() pseudo functions to the assembler.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4583 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz
2010-02-11 18:54:08 +00:00
parent c72cf88723
commit 61b69316c5
10 changed files with 188 additions and 34 deletions
+41 -1
View File
@@ -124,7 +124,7 @@ Long options:
---------------------------------------------------------------------------
</verb></tscreen>
<sect1>Command line options in detail<p>
Here is a description of all the command line options:
@@ -1420,6 +1420,26 @@ either a string or an expression.
See: <tt><ref id=".XMATCH" name=".XMATCH"></tt>
<sect1><tt>.MAX</tt><label id=".MAX"><p>
Builtin function. The result is the larger of two values.
The syntax is
<tscreen><verb>
.MAX (&lt;value #1&gt;, &lt;value #2&gt;)
</verb></tscreen>
Example:
<tscreen><verb>
; Reserve space for the larger of two data blocks
savearea: .max (.sizeof (foo), .sizeof (bar))
</verb></tscreen>
See: <tt><ref id=".MIN" name=".MIN"></tt>
<sect1><tt>.MID</tt><label id=".MID"><p>
Builtin function. Takes a starting index, a count and a token list as
@@ -1460,6 +1480,26 @@ either a string or an expression.
name=".RIGHT"></tt> builtin functions.
<sect1><tt>.MIN</tt><label id=".MIN"><p>
Builtin function. The result is the smaller of two values.
The syntax is
<tscreen><verb>
.MIN (&lt;value #1&gt;, &lt;value #2&gt;)
</verb></tscreen>
Example:
<tscreen><verb>
; Reserve space for some data, but 256 bytes minimum
savearea: .min (.sizeof (foo), 256)
</verb></tscreen>
See: <tt><ref id=".MAX" name=".MAX"></tt>
<sect1><tt>.REF, .REFERENCED</tt><label id=".REFERENCED"><p>
Builtin function. The function expects an identifier as argument in braces.