Specific to ELEC 371
z:\elec371\working\AS11.EXE %f -L > %n.LST & TYPE %n.LST
%u%s%d
Assembler Directives
4.3 EQU - EQUATE SYMBOL TO A VALUE
<label> EQU
The EQU directive assigns the value of the expression in the operand field to the label. The EQU directive assigns a value other than the program counter to the label. The label cannot be redefined anywhere else in the program. The expression cannot contain any forward references or undefined symbols. Equates with forward references are flagged with Phasing Errors.
4.4 FCB - FORM CONSTANT BYTE or DB - DEFINE BYTE
(<label>) FCB <expr>(,<expr>,...,<expr>) (<comment>)
The FCB directive may have one or more operands separated by commas. The value of each operand is truncated to eight bits, and is stored in a single byte of the object program. Multiple operands are stored in successive bytes. The operand may be a numeric constant, a character constant, a symbol, or an expression. If multiple operands are present, one or more of them can be null (two adjacent commas), in which case a single byte of zero will be assigned for that operand. An error will occur if the upper eight bits of the evaluated operands' values are not all ones or all zeros.
4.5 FCC - FORM CONSTANT CHARACTER STRING
(<label>) FCC <delimiter><string><delimiter> (<comment>)
The FCC directive is used to store ASCII strings into consecutive bytes of memory. The byte storage begins at the current program counter. The label is assigned to the first byte in the string. Any of the printable ASCII characters can be contained in the string. The string is specified between two identical delimiters which can be any printable ASCII character. The first non-blank character after the FCC directive is used as the delimiter.
Buffalo Routines
| $FFA0 | UPCASE | A | If character in A is lower case, convert to upper case. |
| $FFA3 | WCHEK | A | If character in A is white space (space, comma, tab), set Z bit. |
| $FFA6 | DCHEK | A | If character in A is delimiter (carriage return, white space), set Z bit. |
| $FFAC | INPUT | A | Read I/O device. Does not wait. A is ASCII character, $00 if nothing received. |
| $FFAF | OUTPUT | A | Write I/O device. Forces parity bit to 0. Waits until character sent. Restores A. |
| $FFB2 | OUTLHLF | A | Convert left nibble of A to ASCII and output to terminal port. Destroys A. |
| $FFB5 | OUTRHLF | A | Convert right nibble of A to ASCII and output to terminal port. Destroys A. |
| $FFB8 | OUTA | A | Output ASCII character in A. Uses OUTPUT utility. |
| $FFBB | OUT1BYT | IX | Convert binary byte at address in X to two ASCII characters and output. Returns with address in X pointing to next byte. Restores A. |
| $FFBE | OUT1BSP | IX | Convert binary byte at address in X to two ASCII characters and output followed by a space. Returns with address in X pointing to next byte. ACCA holds $20. |
| $FFC1 | OUT2BSP | IX | Convert two consecutive binary bytes starting at address in X to four ASCII characters and output followed by a space. Returns with address in X pointing to next byte. ACCA holds $20. |
| $FFC4 | OUTCRLF | - | Output ASCII carriage return, CR, followed by ASCII line feed, LF. ACCA holds $0D. |
| $FFC7 | OUTSTRG | IX | Output CR and LF first. Output string of ASCII bytes pointed to by address in X until an EOT ($04, end of transmission) is encountered. Destroys A. Returns with address in X pointing to next byte. ACCA holds $0D. |
| $FFCA | OUTSTRG0 | IX | Same as OUTSTRG except leading CR and LF is skipped. Restores A. |
| $FFCD | INCHAR | A | Input ASCII character to A and echo back. This routine loops until a character is received. Uses INPUT utility. |