Tms9900 Assembler

Opcodes:

[<label>] b A b <gas>,<gad> b [<comment>]
[<label>] b AB b <gas>,<gad> b [<comment>]
[<label>] b ABS b <gas> b [<comment>]
[<label>] b AI b <wa>,<iop> b [<comment>]
[<label>] b DEC b <gas> b [<comment>]
[<label>] b DECT b <gas> b [<comment>]
[<label>] b DIV b <gas>,<wad> b [<comment>]
[<label>] b INC b <gas> b [<comment>]
[<label>] b INCT b <gas> b [<comment>]
[<label>] b MPY b <gas>,<wad> b [<comment>]
[<label>] b NEG b <gas> b [<comment>]
[<label>] b S b <gas>,<gad> b [<comment>]
[<label>] b SB b <gas>,<gad> b [<comment>]

[<label>] b B b <gas> b [<comment>]
[<label>] b BL b <gas> b [<comment>]
[<label>] b BLWP b <gas> b [<comment>]
[<label>] b JEQ b <exp> b [<comment>]
[<label>] b JGT b <exp> b [<comment>]
[<label>] b JHE b <exp> b [<comment>]
[<label>] b JH b <exp> b [<comment>]
[<label>] b JL b <exp> b [<comment>]
[<label>] b JLE b <exp> b [<comment>]
[<label>] b JLT b <exp> b [<comment>]
[<label>] b JMP b <exp> b [<comment>]
[<label>] b JNC b <exp> b [<comment>]
[<label>] b JNE b <exp> b [<comment>]
[<label>] b JNO b <exp> b [<comment>]
[<label>] b JOP b <exp> b [<comment>]
[<label>] b JOC b <exp> b [<comment>]
[<label>] b RTWP b [<comment>]
[<label>] b X b <gas> b [<comment>]
[<label>] b XOP b <gas>,<xop> b [<comment>]

[<label>] b C b <gas>,<gad> b [<comment>]
[<label>] b CB b <gas>,<gad> b [<comment>]
[<label>] b CI b <wa>,<iop> b [<comment>]
[<label>] b COC b <gas>,<wad> b [<comment>]
[<label>] b CZC b <gas>,<wad> b [<comment >]

[<label>] b LDCR b <gas>,<cnt> b [<comment>]
[<label>] b SBO b <disp> b [<comment>]
[<label>] b SBZ b <disp> b [<comment>]
[<label>] b STCR b <gas>,<cnt> b [<comment>]
[<label>] b TB b <disp> b [<comment>]

[<label>] b CKOF b [<comment>]
[<label>] b CKON b [<comment>]
[<label>] b IDLE b [<comment>]
[<label>] b RSET b [<comment>]
[<label>] b LREX b [<comment>]

[<label>] b LI b <wa>,<iop> b [<comment>]
[<label>] b LIMI b <iop> b [<comment>]
[<label>] b LWPI b <iop> b [<comment>]
[<label>] b MOV b <gas>,<gad> b [<comment>]
[<label>] b MOVB b (gas),(gad) b [<comment>]
[<label>] b STST b (wa) b [<comment>]
[<label>] b STWP b (wa) b [<comment>]
[<label>] b SWPB b (gas) b [<comment>]

[<label>] b ANDI b (wa),(iop) b [<comment>]
[<label>] b ORI b (wa),(iop) b [<comment>]
[<label>] b XOR b (gas),(wad) b [<comment>]
[<label>] b INV b (gas) b [<comment>]
[<label>] b CLR b (gas) b [<comment>]
[<label>] b SETO b (gas) b [<comment>]
[<label>] b SOC b (gas),(gad) b [<comment>]
[<label>] b SOCB b (gas),(gad) b [<comment>]
[<label>] b SZC b (gas),(gad) b [<comment>]
[<label>] b SZCB b (gas),(gad) b [<comment>]

[<label>] b SRA b (wa),(scnt) b [<comment>]
[<label>] b SRL b (wa),(scnt) b [<comment>]
[<label>] b SLA b (wa),(scnt) b [<comment>]
[<label>] b SRC b (wa),(scnt) b [<comment>]

Pseudo Instructions:

[<label>] b NOP b [<comment>]
[<label>] b RT b [<comment>]

  • gas … General Address of the Source operand
  • gad … General Address of the Destination operand
  • wa … Workspace register Address
  • iop … Immediate OPerand
  • wad … Workspace register Address Destination
  • disp … DISPlacement of CRU lines from the CRU base register
  • exp … EXPression that represents an instruction location
  • cnt … CouNT of bits for CRU transfer
  • scnt … Shift CouNT
  • xop … number of eXtended OPeration
  • () Indicates “the contents of”.
  • Items in capital letters, including special characters, must be entered exactly as shown.
  • Items within angle brackets (<> ) are defined by you.
  • Items in lower-case letters represent classes (generic names) of items.
  • Items within brackets ([]) are optional.
  • Items within braces ({ }) are alternative items, one of which must be entered.
  • An ellipsis (…) indicates that the preceding item may be repeated.
  • The symbol b represents one or more blanks or spaces.

Assembler Directives

[<label>] b AORG b <wd-exp> b [<comment>]
[<label>] b RORG b [<exp>] b [<comment>]
[<label>] b DORG b <exp> b [<comment>]
[<label>] b BSS b <wd-exp> b [<comment>]
[<label>] b BES b <wd-exp> b [<comment>]
[<label>] b EVEN b [<comment>]
[<label>] b PSEG b [<comment>]
[<label>] b PEND b [<comment>]

[<label>] b CSEG b [<comment>]
[<label>] b CEND b [<comment>]
[<label>] b DSEG b [<comment>]
[<label>] b DEND b [<comment>]

[<label>] b UNL b [<comment>]
[<label>] b LIST b [<comment>]
[<label>] b PAGE b [<comment>]
[<label>] b TITL b ‘<string>’ b [<comment>]
[<label>] b IDT b ‘<string>’ b [<comment>]

<label> b EQU b <exp> b [<comment>]
[<label>] b BYTE b <exp>[,<exp>]… b [<comment>]
[<label>] b DATA b <exp>[,<exp>]… b [<comment>]
[<label>] b TEXT b [-]'<string>’ b [<comment>]

[<label>] b DEF b <symbol>[,<symbol>]… b [<comment>]
[<label>] b REF b <symbol>[,<symbol>] … b [<comment>]
[<label>] b COPY b “<file name>” b
[<label>] b LOAD b <symbol>[,<symbol>]… b [<comment>]
[<label>] b SREF b <symbol>,[<symbol>]… b [<comment>]

[<label>] b DXOP b <symbol>,<term> b [<comment>]
[<label>] b END b [<symbol>] b [<comment>]

  • label … A symbol used in the label field.
  • string … A character string of a length defined for each directive.
  • expr … An expression.
  • wd expr … A well-defined expression.
  • term … The term used to refer to an extended operation.
  • operation … A mnemonic operation code, macro name, or previously defined operation or extendedoperation.
  • Angle brackets (< > ) enclose items you supply.
  • Brackets ([ ]) enclose optional items.
  • An ellipsis (…) indicates that the preceding item may be repeated. Braces ({ } ) enclose two or more items of which one must be chosen.

Well-defined expressions:

[<label>] b LDCR b <gas>,<cnt> b [<comment>]
[<label>] b SBO b <disp> b [<comment>]
[<label>] b SBZ b <disp> b [<comment>]
[<label>] b STCR b <gas>,<cnt> b [<comment>]
[<label>] b TB b <disp> b [<comment>]

[<label>] b SRA b (wa),(scnt) b [<comment>]
[<label>] b SRL b (wa),(scnt) b [<comment>]
[<label>] b SLA b (wa),(scnt) b [<comment>]
[<label>] b SRC b (wa),(scnt) b [<comment>]

[<label>] b XOP b <gas>,<xop> b [<comment>]

[<label>] b BSS b <wd-exp> b [<comment>]
[<label>] b BES b <wd-exp> b [<comment>]