@@ -936,12 +913,536 @@ if you want to access the "other" symbol Pseudo variables
+
+ Builtin string function. The function allows to concatenate a list of string
+ constants separated by commas. The result is a string constant that is the
+ concatentation of all arguments. This function is most useful in macros and
+ when used together with the
+
+ Builtin function. The function evaluates its argument in braces and
+ yields "true" if the argument is a constant expression (that is, an
+ expression that yields a constant value at assembly time) and "false"
+ otherwise. As an example, the .IFCONST statement may be replaced by
+
+
+
+ The function returns the high byte (that is, bits 8-15) of its argument.
+ It works identical to the '>' operator.
+
+ See: ,
+
+
+
+
+
+ The function returns the high word (that is, bits 16-31) of its argument.
+
+ See:
+
+
+
+
+ Builtin function. Extracts the left part of a given token list.
+
+ Syntax:
+
+
+
+ The function returns the low byte (that is, bits 0-7) of its argument.
+ It works identical to the '<' operator.
+
+ See: ,
+
+
+
+
+
+ The function returns the low word (that is, bits 0-15) of its argument.
+
+ See:
+
+
+
+
+ Builtin function. Matches two token lists against each other. This is
+ most useful within macros, since macros are not stored as strings, but
+ as lists of tokens.
+
+ The syntax is
+
+
+
+ Builtin function. Takes a starting index, a count and a token list as
+ arguments. Will return part of the token list.
+
+ Syntax:
+
+
+
+ Builtin function. The function expects an identifier as argument in braces.
+ The argument is evaluated, and the function yields "true" if the identifier
+ is a symbol that has already been referenced somewhere in the source file up
+ to the current position. Otherwise the function yields false. As an example,
+ the statement may be replaced by
+
+
+
+ Builtin function. Extracts the right part of a given token list.
+
+ Syntax:
+
+
+
+
+
+ Builtin function. The function accepts a string and an index as
+ arguments and returns the value of the character at the given position
+ as an integer value. The index is zero based.
+
+ Example:
+
+
+
+ Builtin function. The function accepts an argument in braces and converts
+ this argument into a string constant. The argument may be an identifier, or
+ a constant numeric value.
+
+ Since you can use a string in the first place, the use of the function may
+ not be obvious. However, it is useful in macros, or more complex setups.
+
+ Example:
+
+
+
+ Builtin function. The function accepts a string argument in braces and
+ eveluates to the length of the string.
+
+ Example:
+
+ The following macro encodes a string as a pascal style string with
+ a leading length byte.
+
+
+
+ Builtin function. The function accepts a token list in braces. The
+ function result is the number of tokens given as argument.
+
+ Example:
+
+ The
+
+ Builtin function. Matches two token lists against each other. This is
+ most useful within macros, since macros are not stored as strings, but
+ as lists of tokens.
+
+ The syntax is
+
+
-
Here's a list of all control commands and a description, what they do:
@@ -1064,18 +1565,6 @@ Here's a list of all control commands and a description, what they do:
-
-
- Builtin function. The function evaluates its argument in braces and
- yields "false" if the argument is non blank (there is an argument), and
- "true" if there is no argument. As an example, the
Switch to the BSS segment. The name of the BSS segment is always "BSS",
@@ -1183,40 +1672,6 @@ Here's a list of all control commands and a description, what they do:
feature in more detail.
-
-
- Builtin function. The function allows to concatenate a list of string
- constants separated by commas. The result is a string constant that
- is the concatentation of all arguments. This function is most useful
- in macros and when used together with the
-
- Builtin function. The function evaluates its argument in braces and
- yields "true" if the argument is a constant expression (that is, an
- expression that yields a constant value at assembly time) and "false"
- otherwise. As an example, the .IFCONST statement may be replaced by
-
-
Export a symbol and mark it as a module constructor. This may be used
@@ -1248,33 +1703,6 @@ Here's a list of all control commands and a description, what they do:
feature in more detail.
-
-
- Reading this pseudo variable will give a constant integer value that
- tells which CPU is currently enabled. It can also tell which instruction
- set the CPU is able to translate. The value read from the pseudo variable
- should be further examined by using one of the constants defined by the
- "cpu" macro package (see /).
-
- It may be used to replace the .IFPxx pseudo instructions or to construct
- even more complex expressions.
-
- Example:
-
-
Switch to the DATA segment. The name of the DATA segment is always
@@ -1436,8 +1864,9 @@ Here's a list of all control commands and a description, what they do:
- Ends a struct definition. See the section named .
+ Ends a struct definition. See the /
+ command and the separate section named .
@@ -1973,41 +2402,6 @@ Here's a list of all control commands and a description, what they do:
-
-
- Builtin function. Extracts the left part of a given token list.
-
- Syntax:
-
-
Switch on or off line continuations using the backslash character
@@ -2146,99 +2540,6 @@ Here's a list of all control commands and a description, what they do:
See section .
-
-
- Builtin function. Matches two token lists against each other. This is
- most useful within macros, since macros are not stored as strings, but
- as lists of tokens.
-
- The syntax is
-
-
-
- Builtin function. Takes a starting index, a count and a token list as
- arguments. Will return part of the token list.
-
- Syntax:
-
-
Start a section of absolute code. The command is followed by a constant
@@ -2313,25 +2614,6 @@ Here's a list of all control commands and a description, what they do:
-
-
- This builtin pseudo variable is only available in macros. It is replaced by
- the actual number of parameters that were given in the macro invocation.
-
- Example:
-
-
Enable the 65C02 instructions set. This instruction set includes all
@@ -2415,21 +2697,6 @@ Here's a list of all control commands and a description, what they do:
See:
-
-
- Builtin function. The function expects an identifier as argument in braces.
- The argument is evaluated, and the function yields "true" if the identifier
- is a symbol that has already been referenced somewhere in the source file up
- to the current position. Otherwise the function yields false. As an example,
- the statement may be replaced by
-
-
Repeat all commands between
-
-
- Builtin function. Extracts the right part of a given token list.
-
- Syntax:
-
-
Switch to the RODATA segment. The name of the RODATA segment is always
@@ -2610,80 +2860,6 @@ Here's a list of all control commands and a description, what they do:
-
-
-
Switch on or off smart mode. The command must be followed by a '+' or
@@ -2720,64 +2896,12 @@ Here's a list of all control commands and a description, what they do:
-
-
- Builtin function. The function accepts a string and an index as
- arguments and returns the value of the character at the given position
- as an integer value. The index is zero based.
-
- Example:
-
-
-
- Builtin function. The function accepts an argument in braces and converts
- this argument into a string constant. The argument may be an identifier, or
- a constant numeric value.
-
- Since you can use a string in the first place, the use of the function may
- not be obvious. However, it is useful in macros, or more complex setups.
-
- Example:
-
-
-
- Builtin function. The function accepts a string argument in braces and
- eveluates to the length of the string.
-
- Example:
-
- The following macro encodes a string as a pascal style string with
- a leading length byte.
-
-
- Starts a struct definition. See the section named .
+ Starts a struct definition. Structs are covered in a separate section named
+ .
+
+ See:
@@ -2808,62 +2932,6 @@ Here's a list of all control commands and a description, what they do:
-
-
- Builtin function. The function accepts a token list in braces. The
- function result is the number of tokens given as argument.
-
- Example:
-
- The
-
- Reading this pseudo variable will give a constant integer value that
- represents the current time in POSIX standard (as seconds since the
- Epoch).
-
- It may be used to encode the time of translation somewhere in the created
- code.
-
- Example:
-
-
-
- Reading this pseudo variable will give the assembler version according to
- the following formula:
-
- VER_MAJOR*$100 + VER_MINOR*$10 + VER_PATCH
-
- It may be used to encode the assembler version or check the assembler for
- special features not available with older versions.
-
- Example:
-
- Version 2.11.1 of the assembler will return $2B1 as numerical constant when
- reading the pseudo variable .WARNING
Force an assembly warning. The assembler will output a warning message
@@ -2906,35 +2974,6 @@ Here's a list of all control commands and a description, what they do:
-
-
- Builtin function. Matches two token lists against each other. This is
- most useful within macros, since macros are not stored as strings, but
- as lists of tokens.
-
- The syntax is
-
-
Switch to the ZEROPAGE segment and mark it as direct (zeropage) segment.
@@ -3445,7 +3484,7 @@ CPUs (the latter two are upwards compatible to the 65SC02).
Structs and unions are special forms of . They
are to some degree comparable to their C counterparts. Both have a list of
members. Each member allocates storage and may optionally have a name, which,
-in case of a struct, is the offset from the beginning and, in case of a union
+in case of a struct, is the offset from the beginning and, in case of a union,
is always zero.
Here is an example for a very simple struct with two members and a total size
@@ -3488,13 +3527,26 @@ already defined structs or unions in structs:
.struct Circle
Origin .tag Point
- Radius .word
+ Radius .byte
.endstruct
Space for a struct or union may be allocated using the directive.
+