Professional Documents
Culture Documents
Directive
.BELL BYTE BYTES CEQU .CTRL DATE DC.B DC.W DC.L #DEFINE DS.B DS.W DS.L END EQU EXTERN #ELSE #ENDIF FCS .FORM GROUP #IF #IF1 #IF2 #IFB #IFIDN #IFDEF #IFLAB #INCLUDE INTEL .LALL .LIST #LOAD LOCAL
Description
Ring bell on console Define byte in object code Label type definition: type = byte Equate pre-existing label to expression Send control codes to the printer .BELL
Description
Add with carry, s to d Add s to d Logical AND (d with s) Bit compare A, mem Bit reset d Bit set d Jump if bit is false (0) Jump if bit is true (1) Call subroutine Call subroutine relative Clear d Arithmetic Compare
Source
mem mem mem mem
Flags
H,N,Z,C H,N,Z,C N,Z N,Z
Addr. Modes
2,3,4,5,s,w 2,3,4,5,s,w 2,3,4,5,s,w 2,3,4,5,s,w 3,4,5,s 3,4,5,s
Mnemo
JRULE d LD d,s MUL d,s NEG d NOP OR d,s
Description
Jump if (C+Z = 1) Load s in d Multiply d by s Negate d (logical 2-complement) No operation OR d with s Pop from the Stack Push onto the Stack Reset carry flag Subroutine return Reset interrupt mask
Operation
Dest.
Source
Flags
Addr. Modes
3,5,6 1,2,3,4,5,s,w 1 1,3,4,5,s 1
BYTE <exp or string>, [,<exp or string>...] BYTES label CEQU <equ> .CTRL <ctrl>[,<ctrl>]...
Jmp if unsigned mem ds d:s d*s reg, mem mem,reg N,Z A,X,Y X,Y,A H=0,C=0 N,Z,C
d d AND (2**b) mem d d OR (2**b) PC=PC + rel IF (d AND (2**b))=0 PC=PC + rel IF (d AND (2**b))0 mem mem mem mem mem d 00 reg, mem mem N=0,Z=1 N,Z,C N,Z,C=1 N,Z I=0 dd+1 Pop CC, A, X, PC PC d PC PC + d PC PC + d condition false mem mem mem mem reg, mem N, Z H,I,N,Z,C C C
Define 12-byte ASCII date into object DATE code Define byte(s) in object code. Define word(s) in object code Define long word(s) in object code Define manifest constant Define byte space in object code Define word space in object code Define long space in object code End of source code Equate the label to expression Declare external labels Conditional ELSE Conditional terminator Form constant string Set form length of the listing device Name area of source code Start conditional assembly IF condition that must be satisfied in pass #1 to be true IF condition that must be satisfied in pass #2 to be true DC.B <exp or string>, [,<exp or string>] DC.W <exp>[,<exp>...] DC.L <exp>[,<exp>...] #DEFINE <CONSTANT ID> <real characters> DS.B [optional number of bytes] DS.W [optional number of words] DS.L [optional number of long words] END label EQU <EXPRESSIONS> EXTERN #ELSE #ENDIF FCS <string> |<bytes> [<string> |<bytes>]... .FORM <exp> GROUP <exp> #IF <exp> #IF1 #IF2
A reg, CC
mem
N,Z
2,3,4,5,6,s,w
3,4,5,s 3,4,5,s 3,4,5,s,w 3,5,6,s 1,3,4,5,s 2,3,4,5,s,w 1,3,4,5,s 1,3,4,5,s 1 1,3,4,5,s 1 3,4,5,s,w 3,5,6 3,5,6 3,5,6 3,5,6 3,5,6 3,5,6 3,5,6 3,5,6 3,5,6 3,5,6 3,5,6 3,5,6 3,5,6 3,5,6 3,5,6 3,5,6 3,5,6 3,5,6
Logical complement of d d d XOR FF Decrement d Halt Increment d Interrupt routine return Absolute jump Jump relative always Jump relative if true Never jump dd-1
Rotate left through carry C Rotate right through carry Reset Stack pointer Subtract s from d with carry Set carry flag Set interrupt mask Shift left arithmetic (equal to SLL d = 1) Shift left logical Shift right arithmetic (equal to SLL one) Shift right logical Subtract s from d Swap nibbles Test for Neg & Zero Software trap Wait for interrupt Exclusive OR (d with s)
0 reg, mem
N, Z,C
0 reg, mem
N, Z,C
1,3,4,5,s 1
mem
7 7
0 0
reg, mem
N,Z,C N,Z,C
Jump if Port INT pin = 1 (no port interrupts) mem Jump if Port INT pin = 0 (port interrupt) Jump if H = 1 Jump if H = 0 Jump if I = 1 Jump if I = 0 Jump if N = 1 Jump if N = 0 Jump if Z = 1 Jump if Z = 0 Jump if C = 1 Jump if C = 0 Jump if C = 1 Jump if C = 0 Jump if (C+Z = 0) H = 1? H = 0? I = 1? I = 0? N = 1? (minus) N = 0? (plus) Z = 1? (equal) mem mem mem mem mem mem mem mem
0 reg, mem
SRA d
7
0
0 7
C reg, mem
N,Z,C
1,3,4,5,s
Conditional on argument being blank #IFB <arg> Conditional on arguments being iden#IFIDN <arg-1> <arg-2> tical Conditional on argument being defined Conditional on argument being a label Insert external source code file Force Intel-style radix specifier List whole body of macro cells Enable listing (default) Load named object file at link time Define labels as local to macro #IFDEF <exp> #IFLAB <arg> #INCLUDE <filename>
JRC d INTEL .LALL .LIST #LOAD pathname\filename[.ext] LOCAL <arg> JRNC d JRULT d JRUGE d JRUGT d
d d XOR s
mem
N,Z
Jmp if unsigned < mem Jmp if unsigned mem Jmp if unsigned > mem
ST 7 AS M Di re ct iv e L an g ua ge Su mma r y (c on ti nu ed )
Directive
LONG LONGS MACRO MEND
Description
Define long word in object code Default new label length long Define macro template End of macro definition
Syntax
LONG <exp>[,<exp>...] LONGS <macro> MACRO [param-1] [,param-2]... MEND MOTOROLA .NOCHANGE .NOLIST %OUT string .PAGE PUBLIC <arg> REPEAT .SALL |<name>|SEGMENT <align> <combine> <class> [cod] .SETDP <base address>
Syntax
MOTOROLA Force Motorola-style radix specifier .NOCHANGE List original #DEFINE strings .NOLIST %OUT .PAGE PUBLIC REPEAT .SALL SEGMENT .SETDP SKIP STRING SUBTTL .TAB TEXAS TITLE UNTIL WORD WORDS .XALL ZILOG Turn off listing Output string to the console Perform a form feed Make labels public Assembly-time loop initiator Suppress all of the body of called macro Start of a new segment Set base address for direct page
A concise listing of the ST7 ASM Instruction Set and Directive Language This quick reference guide gives all the instructions, directives and command line options for the ST7 Assembler. For detailed references on the ST7 Assembler-Linker software and the ST7 Instruction Set, please refer to the ST7 Assembler-Linker User Manual and the ST7 Programming Manual, both available in PDF format on the MCU on CD CDROM.
Inserts given number of bytes with an SKIP <number of bytes>,<value to fill> initialization value Define a byte-level string Define a subtitle for listing heading Set listing field lengths Texas Instruments-style radix specifier Define main title for listing Assembly time loop terminator Define word in object code Default new label length word STRING <exp or string>,[,<exp or string>...] SUBTTL <Subtitle string> .TAB <label>, <Opcode>, <operand>, <comment> TEXAS TITLE <Title string> UNTIL <exp> WORD <exp>[, <exp>...] WORDS
Description
List only code producing macro lines .XALL Force Zilog-style radix specifiers ZILOG Destination/Source/ Other
RETURN
Addressing Modes
7 6 5 4 3 2 1 0 1 1 1 H I N Z C
UNSTACK (POP)
http://mcu.st.com