home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Interactive Reference Guide / C-C++ Interactive Reference Guide.iso / c_ref / csource3 / 148_01 / xasm99.prn < prev    next >
Encoding:
Text File  |  1987-09-28  |  46.5 KB  |  1,245 lines

  1.  
  2.  
  3.  
  4. 
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.                           TMS9900/99105 Cross-assembler
  13.  
  14.  
  15.                                     Rev. 1.0
  16.  
  17.                 Derived from the original William C. Colley, III.
  18.                               M6800 Cross Assembler
  19.  
  20.                                        by
  21.  
  22.  
  23.                                 Alexander Cameron 
  24.  
  25.                      Written and modified during June 1984.
  26.  
  27.  
  28.  
  29.  
  30.                             The Manual Such As It Is.
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.                TMS9900/99105 Cross-assembler  Rev. 1.0                    Page 1
  72.  
  73.  
  74.                 1.1       Format of Cross-assembler Commands
  75.                 1.1.1     Command Strings
  76.  
  77.                           T∩á  ruε  thσ 990░ cross-assembler¼á  typσá thσ ì
  78.         ááááááááááááááááááfollowinτ commanΣ line:
  79.  
  80.                           A>a99 filename options
  81.  
  82.                           filename║ 
  83.         ááááááááááááááááááThσáá namσáá oµá thσá sourcσá inpu⌠áá filσáá i≤ ì
  84.         ááááááááááááááááááfilename.a99¼á thσ lis⌠ caε g∩ t∩ filename.l99¼ ì
  85.         ááááááááááááááááááanΣ thσ he° filσ caε g∩ t∩ filename.h99.
  86.  
  87.                           options:   See next section.
  88.  
  89.                 1.1.2     Options
  90.  
  91.                           Thσá  sourcσá filσá come≤á froφá thσá currentl∙  ì
  92.         ááááááááááááááááááloggeΣ  disδ drivσ  unles≤  i⌠ i≤ redirecteΣ b∙ ì
  93.         ááááááááááááááááááputtinτ  thσ  strinτ "sdó iε thσ option≤ field«  ì
  94.         áááááááááááááááááá≤á specifie≤ thσ sourcσ filσ anΣ Σ i≤ ßá devicσ ì
  95.         áááááááááááááááááácodσ froφ thσ followinτ list:
  96.  
  97.                           a, b, c, d   Disk drives.
  98.                           -            The currently logged in disk drive.
  99.  
  100.                           Line≤á  oµ inpu⌠ containinτ error≤ wil∞á alway≤ ì
  101.         áááááááááááááááááábσá outpu⌠ t∩ thσ consolσ device«á  Iµ thσ ful∞ ì
  102.         áááááááááááááááááálistinτá i≤ desired¼á i⌠ mus⌠ bσ calleΣ fo≥á b∙ ì
  103.         ááááááááááááááááááputtinτá thσ strinτ "ldó iε thσ option≤á field«  ì
  104.         áááááááááááááááááá∞ specifie≤ lis⌠ filσ anΣ Σ i≤ ß devicσ codσ a≤ ì
  105.         áááááááááááááááááápe≥ thσ sourcσ file¼á o≥ onσ oµ thσá following║ 
  106.                          ì
  107.         áááááááááááááááááá°              Consolσ device.
  108.                           y              List device.
  109.  
  110.                           Thσá  he° filσ wil∞ no⌠ bσ outpu⌠ unles≤ calleΣ  ì
  111.         ááááááááááááááááááfo≥  a≤ pe≥ thσ lis⌠ file.
  112.  
  113.                           Option≤á  mus⌠á bσ ruε togethe≥ int∩á ßá singlσ ì
  114.         áááááááááááááááááástrinτ witΦ n∩ embeddeΣ blanks.
  115.  
  116.                 1.1.3     Examples
  117.  
  118.                           A>a99 barf       source -- a:barf.a99
  119.                                               list   -- none.
  120.                                               hex    -- none.
  121.  
  122.                           A>a99 barf sblxha source -- b:barf.a99
  123.                                               list   -- con:
  124.                                               hex    -- a:barf.h99
  125.  
  126.                           A>a99 barf ly    source -- a:barf.a99
  127.                                               list   -- lst:
  128.                                               hex    -- none.
  129.  
  130.  
  131.                           A>b:a99 barf sbh-  source -- b:barf.a99
  132.                                               list   -- none.è
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.                TMS9900/99105 Cross-assembler  Rev. 1.0                    Page 2
  141.  
  142.  
  143.                                               hex    -- a:barf.h99
  144.  
  145.  
  146.                 1.2       Format of TMS9900 Cross-assembler Source Files
  147.  
  148.                           Line≤ oµ sourcσ inpu⌠ arσ terminateΣ witΦ CR/L╞  ì
  149.         áááááááááááááááááápairs«  Internally¼ thσ characte≥ beforσ thσ L╞ ì
  150.         áááááááááááááááááái≤ discarded¼ s∩ iµ thσ C╥ i≤ missing¼ thσ las⌠ ì
  151.         áááááááááááááááááácharacte≥á oµ thσ linσ wil∞ bσ eateεá up«á  Thσ ì
  152.         ááááááááááááááááááinterna∞ linσ buffe≥ wil∞ holΣ ß 12░  characte≥ ì
  153.         ááááááááááááááááááline«á   Thi≤á ma∙ bσ changeΣ b∙  alterinτá thσ  ì
  154.         áááááááááááááááááá"#definσ  LINLE╬  120ó statemen⌠ iεá xasm99.gb∞ ì
  155.         ááááááááááááááááááanΣá recompilinτ thσ cross-assembler«á   Exces≤ ì
  156.         áááááááááááááááááácharacter≤ iε thσ linσ arσ throwε out.
  157.  
  158.                           Lowe≥á  casσá  letter≤ arσ converteΣá t∩á uppe≥ ì
  159.         áááááááááááááááááácasσ iε  a≤ fe≈ place≤ a≤ possible«  The∙ are:
  160.  
  161.                                1)  In opcodes,
  162.  
  163.                                2)  In checking for keywords such as NOT, and
  164.  
  165.                                3)  In command strings.
  166.  
  167.                           Thi≤  mean≤ tha⌠ "not"¼á  "NOT"¼á  "Not"¼  etc«  ì
  168.         ááááááááááááááááááarσá  al∞á possiblσ  spelling≤ oµá thσá logica∞ ì
  169.         ááááááááááááááááááinversioεá  operator«á Thi≤  als∩á  mean≤á tha⌠ ì
  170.         áááááááááááááááááá"fooóáá anΣá  "FOOóá  arσá  differen⌠á symbols«  ì
  171.         ááááááááááááááááááWatcΦá thi≤ iµ yo⌡ star⌠ encounterinτ ╒á error≤ ì
  172.         ááááááááááááááááááoµ symbol≤ tha⌠ yo⌡ "knowó yo⌡ defined.
  173.  
  174.                 1.2.1     Statements
  175.  
  176.                           Sourcσ file≤ inpu⌠ t∩ thσ 990░á Cross-assemble≥  ì
  177.         ááááááááááááááááááconsis⌠ oµ statement≤ oµ thσ form:
  178.  
  179.                           [label] [opcode] [arguments] [;comments.]
  180.  
  181.                           Label≤á  arσá recognizeΣ b∙ thei≥ beginninτá iε ì
  182.         áááááááááááááááááácolumε  1« Iµ  i⌠  doesn'⌠  begiε there¼  i⌠ i≤ ì
  183.         ááááááááááááááááááassumeΣá t∩á  bσá  aεá opcode«á    Label≤á  arσ  ì
  184.         ááááááááááááááááááassigneΣ  thσ  curren⌠  prograφ counte≥á  valuσ  ì
  185.         ááááááááááááááááááunles≤  thσ line'≤ opcodσ i≤  "EQUó  o≥ "SET".
  186.  
  187.                           Opcode≤áá  ma∙á  bσá eithe≥á 990░áá instructioε  ì
  188.         áááááááááááááááááámnemonic≤  o≥ pseudo-ops.
  189.  
  190.                           Thσá  argument≤ followinτ thσ opcodσ wil∞á var∙ ì
  191.         ááááááááááááááááááwitΦ  thσ opcode«á  Iε thσ casσ oµ opcode≤ sucΦ ì
  192.         ááááááááááááááááááa≤ "NOP"¼ the∙ ma∙ bσ absen⌠ entirely.
  193.  
  194.                           Line≤á terminatσ witΦ eithe≥ ß CR/L╞ pai≥ o≥á ß ì
  195.         áááááááááááááááááásemicoloεá tha⌠  i≤  no⌠ embeddeΣ iε ßá  quoteΣ  ì
  196.         áááááááááááááááááástring«   Anythinτ afte≥ ß semicoloε i≤ ignoreΣ ì
  197.         ááááááááááááááááááb∙á thσá assembler¼á bu⌠á wil∞á appea≥á iεá thσ ì
  198.         áááááááááááááááááálisting«á  Notσá tha⌠á ß semicoloε iε columεá ▒ ì
  199.         ááááááááááááááááááwil∞ makσ thσ entirσ linσ ß comment.
  200.                 1.2.2     Symbols
  201. è
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.                TMS9900/99105 Cross-assembler  Rev. 1.0                    Page 3
  210.  
  211.  
  212.                           Symbol≤  ma∙  bσ oµ an∙ length¼á  bu⌠ onl∙á thσ  ì
  213.         ááááááááááááááááááfirs⌠á  ╕ character≤  arσ  significant«á   Thi≤ ì
  214.         ááááááááááááááááááma∙á bσá changeΣá  b∙á changinτá  thσá "#definσ ì
  215.         ááááááááááááááááááSYMLE╬áá 8óáá statemen⌠áá  iεáá  a68.gb∞ááá anΣ   ì
  216.         áááááááááááááááááárecompilinτá  thσá  assembler«áá    Notσá  tha⌠   ì
  217.         ááááááááááááááááááthi≤á increase≤á  thσ storagσ requireΣá b∙á thσ ì
  218.         áááááááááááááááááásymbo∞á tablσá  a≤ eacΦ  entr∙  iεá thσá symbo∞ ì
  219.         áááááááááááááááááátablσá i≤á SYMLEN+▓  byte≤á  iεá length«á   Thσ  ì
  220.         ááááááááááááááááááfollowinτáá  character≤á  arσá  lega∞á  iεáá  ß ì
  221.         áááááááááááááááááásymbol:
  222.  
  223.                                A-Z  a-z  !  &  .  :  ?  [  \  ]  ^  _  `
  224.                                          {  |  }  ~  0-9
  225.  
  226.                           Notσá  tha⌠á symbol≤ ma∙ no⌠ begiε witΦ 0-╣á a≤ ì
  227.         ááááááááááááááááááthi≤ woulΣ makσ  theφ impossiblσ t∩ distinguisΦ ì
  228.         ááááááááááááááááááfroφ Inte∞  forma⌠ numbers.
  229.  
  230.                           ┴á  specia∞á  symbo∞ ñ i≤ alway≤ equa∞á t∩á thσ ì
  231.         ááááááááááááááááááaddres≤  oµ thσ firs⌠ bytσ oµ codσ generateΣ b∙ ì
  232.         ááááááááááááááááááß giveε line.
  233.  
  234.                 1.2.3     Numeric Constants
  235.  
  236.                           Number≤á begiεá witΦá 0-9,%«á Ñá leadinτá  basσ  ì
  237.         áááááááááááááááááádesignato≥á represen⌠á binary«á Iµá thσá numbe≥ ì
  238.         áááááááááááááááááábegin≤ witΦ 0-9¼  thσ  assemble≥  look≤ fo≥ onσ ì
  239.         ááááááááááááááááááoµ thσ trailinτ  basσ designator≤ B¼  O¼  Q¼ D¼ ì
  240.         ááááááááááááááááááo≥á H«á  Iµ thσ numbe≥ doe≤ no⌠ enΣ witΦ onσ oµ ì
  241.         ááááááááááááááááááthese¼  i⌠ i≤ assumeΣ t∩ bσ decimal«  ┬ i≤  thσ  ì
  242.         áááááááááááááááááábasσ designato≥ fo≥ binary¼á  ╧ anΣ ╤  arσ  fo≥ ì
  243.         ááááááááááááááááááoctal¼á  ─á  i≤á fo≥ decimal¼á  anΣ ╚á i≤á  fo≥  ì
  244.         ááááááááááááááááááhexidecimal«  Trailinτ basσ designator≤ anΣ thσ ì
  245.         ááááááááááááááááááhe° digit≤ A-╞ caε bσ iε  eithe≥ uppe≥ o≥ lowe≥ ì
  246.         áááááááááááááááááácase«á   Notσá tha⌠á he° number≤á tha⌠á   star⌠  ì
  247.         ááááááááááááááááááwitΦá  A-╞á  anΣá  arσá  specifieΣá  witΦá  thσ ì
  248.         áááááááááááááááááádesignato≥á  ╚  mus⌠ havσ ß leadinτ zer∩á addeΣ  ì
  249.         áááááááááááááááááát∩  kee≡ theφ froφ beinτ mistakeε fo≥á symbols«  ì
  250.         ááááááááááááááááááFo≥ example:
  251.  
  252.                           0ff80h                   evaluate to ff80 hex.
  253.                           128 and 128d             evaluate to 80 hex.
  254.                           35o, and 35q             evaluate to 1d hex.
  255.                           %0111000 and 0111000b    evaluate to 39 hex.
  256.  
  257.                           ┴á characte≥á constan⌠ i≤ ß strinτ composeΣá oµ ì
  258.         áááááááááááááááááázero¼á one¼ o≥ tw∩ ASCI╔ characters¼  delimiteΣ ì
  259.         ááááááááááááááááááb∙á eithe≥ singlσ o≥ doublσ  quote≤ (ºá o≥á ")«   ì
  260.         ááááááááááááááááááNotσá tha⌠á singlσ quote≤ onl∙á balancσá singlσ ì
  261.         ááááááááááááááááááquotes¼  anΣ doublσ quote≤ onl∙  balancσ doublσ ì
  262.         ááááááááááááááááááquotes«á  Thu≤á ß characte≥ constan⌠ oµ 2▓á he° ì
  263.         áááááááááááááááááácaε bσ specifieΣ b∙ '"'«  Fo≥ example:
  264.  
  265.                                "ab"           evaluates to 6162 hex.
  266.                                ""             evaluates to 0000 hex.
  267.                                "'"            evaluates to 0027 hex.
  268.                                'A'            evaluates to 0041 hex.
  269.  
  270. è
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.                TMS9900/99105 Cross-assembler  Rev. 1.0                    Page 4
  279.  
  280.  
  281.  
  282.                           Notσáá tha⌠á iεá thσá two-characte≥áá characte≥ ì
  283.         ááááááááááááááááááconstant¼á  thσ left-hanΣ characte≥ wil∞ appea≥ ì
  284.         ááááááááááááááááááiεá thσá upper-orde≥ bytσ anΣá  thσá right-hanΣ ì
  285.         áááááááááááááááááácharacte≥ wil∞ appea≥ iε thσ lower-orde≥ byte.
  286.  
  287.                 1.2.4     Strings
  288.  
  289.                           String≤á  arσá  formeΣ  iε  thσ  samσ  wa∙á  a≤  ì
  290.         áááááááááááááááááácharacte≥ constant≤  excep⌠ tha⌠ the∙ ma∙ bσ oµ ì
  291.         ááááááááááááááááááan∙ lengtΦ u≡  t∩ anΣ includinτ 25╡ characters«  ì
  292.         ááááááááááááááááááThσá firs⌠á characte≥á wil∞ bσá placeΣá iεá thσ ì
  293.         áááááááááááááááááálowest-orde≥áá memor∙áá byte«ááá  ┴áá line-feeΣ ì
  294.         áááááááááááááááááácharacte≥  ma∙  no⌠  bσ  embeddeΣ iε  ß  strinτ  ì
  295.         ááááááááááááááááááa≤á  i⌠ terminate≤  thσ linσ anΣ wil∞á yielΣá ß  ì
  296.         ááááááááááááááááááquotσá  imbalancσ error«á   Notσ  tha⌠  string≤  ì
  297.         ááááááááááááááááááarσ  onl∙  valiΣ  iε  thσ arguemen⌠ fielΣ oµ aε ì
  298.         áááááááááááááááááá"TEXTó pseudo-op.
  299.  
  300.                 1.3       Expression Evaluation
  301.  
  302.                           Thσá  followinτá  operator≤á arσá alloweΣáá  iε  ì
  303.         ááááááááááááááááááexpressions«  Thσ operator≤ arσ listeΣ iε orde≥ ì
  304.         ááááááááááááááááááoµ precedence.
  305.  
  306.                                Unary Plus, Unary Minus
  307.  
  308.                                *, /, MOD, SHL, SHR
  309.  
  310.                                +, -
  311.  
  312.                                >, >=, <, <=, <>, =
  313.                                          (These can also be written as
  314.                                               GT, GE, LT, LE, NE, EQ.)
  315.  
  316.                                NOT       (1's complement)
  317.  
  318.                                AND       (Bitwise logical AND)
  319.  
  320.                                OR, XOR   (Bitwise logical OR and Exclusive 
  321.         áááááááááááááááááá                OR)
  322.  
  323.                                HIGH, LOW
  324.         ááááááááááááááááááParenthese≤á arσá useΣ t∩ changσ thσá orde≥á oµ ì
  325.         ááááááááááááááááááprecedence«ááá  Durinτááá  evaluatioεáá oµáá aε ì
  326.         ááááááááááááááááááexpression¼á  a≤á sooε a≤ ß  ne≈á operato≥á  i≤ ì
  327.         ááááááááááááááááááencountereΣá tha⌠ ha≤ precedencσ les≤  thaεá o≥   ì
  328.         ááááááááááááááááááequa∞á  t∩á  thσ  las⌠  operato≥á  encountered¼   ì
  329.         ááááááááááááááááááal∞á operation≤á u≡á t∩ thσá ne≈á operato≥á arσ ì
  330.         ááááááááááááááááááperformed«ááá   Tha⌠ááá is¼ááá   subexpression≤  ì
  331.         ááááááááááááááááááinvolvinτá  operator≤  oµá   highe≥á precedencσ ì
  332.         ááááááááááááááááááarσ computeΣ first.
  333.  
  334.                           Al∞ operator≤ excep⌠ +¼á  -¼  *¼  /¼ =¼ <>¼ >=¼ ì
  335.         áááááááááááááááááá<=¼ >¼ ╝ mus⌠  bσ separateΣ froφ thei≥ operand≤ ì
  336.         ááááááááááááááááááb∙ a⌠ leas⌠  onσ spacσ o≥ tab.
  337.  
  338.                           Thσ  "HIG╚ mumbleó i≤ equivalen⌠ t∩ "mumblσ SH╥ ì
  339.         áááááááááááááááááá8óá  anΣ "LO╫ mumbleó i≤ equivalen⌠ t∩á "mumblσ ìè
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.                TMS9900/99105 Cross-assembler  Rev. 1.0                    Page 5
  348.  
  349.  
  350.         ááááááááááááááááááAN─ 0ffH".
  351.  
  352.                           Thσ relationa∞ operator≤ (=¼á >¼ etc.⌐ evaluatσ ì
  353.         áááááááááááááááááát∩ 0ffffΦ iµ thσ relationshi≡ i≤ true¼á ░ iµ i⌠ ì
  354.         áááááááááááááááááái≤ false.
  355.  
  356.                           Expression≤ááá  arσáá terminateΣáá b∙áá commas¼  ì
  357.         áááááááááááááááááásemicolons¼  o≥ CR/L╞ pairs.
  358.  
  359.                 1.4       990 Family Instructions
  360.  
  361.                           Thσááá  instruction≤ááá oµááá thσááá 9900/9910╡ ì
  362.         áááááááááááááááááámicroprocesso≥á fal∞  int∩ severa∞  catagories«   ì
  363.         ááááááááááááááááááEacΦ require≤ ß certaiε  se⌠  oµ argument≤á anΣ ì
  364.         áááááááááááááááááádisallow≤á othe≥ arguments«á  Argument≤ ma∙á bσ  ì
  365.         ááááááááááááááááááspecifieΣá iεá an∙ orde≥ anΣ arσá separateΣá b∙  ì
  366.         áááááááááááááááááácomma≤ááá Blank≤áá  ma∙áá  bσáá  useΣáá  freel∙  ì
  367.         ááááááááááááááááááthroughou⌠á  thσ argumen⌠ fielΣ (excep⌠á withiε ì
  368.         áááááááááááááááááásymbol≤á o≥ operator≤ sucΦ a≤  NOT⌐ t∩á enhancσ ì
  369.         ááááááááááááááááááthσ readabilit∙ oµ thσ sourcσ code«  
  370.                           The basic syntax is as follows:
  371.  
  372.                           [label]   LI  R1,expression   ;The expression 
  373.         áááááááááááááááááá                              ;is evaluated 
  374.                                                         ;from left to 
  375.         áááááááááááááááááá                              ;right.
  376.  
  377.                           Thσá typσá oµá addressinτ eacΦá instructioεá i≤ ì
  378.         ááááááááááááááááááalloweΣá alonτ witΦ thσ numbe≥ oµ operand≤á thσ ì
  379.         ááááááááááááááááááassemble≥á expect≤ thσ instructioε t∩ have¼á i≤ ì
  380.         áááááááááááááááááácarrieΣ iε thσ ATTRI┬ bytσ whicΦ i≤ returneΣ b∙ ì
  381.         ááááááááááááááááááthσá GETOP├á function«áá  Thσá ATTRI┬á bytσá i≤ ì
  382.         áááááááááááááááááái≤á madσá u≡á oµ tw∩ ┤ bi⌠á nibble≤á thσá leas⌠ ì
  383.         áááááááááááááááááásignifica⌠á describinτ operanΣ ▒ anΣá thσá mos⌠ ì
  384.         áááááááááááááááááásignifican⌠á describinτá operanΣá 2«á (Seσá thσ ì
  385.         ááááááááááááááááááheadinτ comment≤ oµ GETOP├ whicΦ i≤ par⌠ oµ thσ ì
  386.         ááááááááááááááááááfilσ A99TBLS.CSM)«    Thσ ATTRI┬ bytσ wil∞ als∩ ì
  387.         áááááááááááááááááátel∞á thσá assemble≥ whicΦ onσ oµ thσá ╖á basiπ ì
  388.         ááááááááááááááááááinstructioεá format≤ ß particularσá instructioε ì
  389.         ááááááááááááááááááfall≤ into«á  The≤ formats/group≤ arσ discusseΣ ì
  390.         ááááááááááááááááááiε thσ followinτ sections.
  391.  
  392.         áááááááá1.4.1áááááAddressing Modes 
  393.  
  394.         ááááááááááááááááááThσá 9900/9910╡ instructioε se⌠ allow≤ ╡á basiπ ì
  395.         ááááááááááááááááááaddressinτá modes«á These are:
  396.  
  397.         áááááááááááááááááá Mode                          Example  
  398.         áááááááááááááááááá ----                          -------
  399.  
  400.         áááááááááááááááááá Workspace register            MOV R1,R3
  401.         áááááááááááááááááá Workspace register indirect   A *R1,R2
  402.         áááááááááááááááááá Symbolic                      CLR @expr
  403.         áááááááááááááááááá IndexeΣ                       A @expr(R1),R2
  404.         áááááááááááááá     Workspacσ registe≥ indirec⌠   DEC *R7+
  405.         áááááááááááááááááá (aut∩ increment)
  406.  
  407.                            Thesσ mode≤ wil∞ iε genera∞ bσ writteε iεá thσ ì
  408.         áááááááááááááááááá form:è
  409.  
  410.  
  411.  
  412.  
  413.  
  414.  
  415.  
  416.                TMS9900/99105 Cross-assembler  Rev. 1.0                    Page 6
  417.  
  418.  
  419.  
  420.         áááááááááááááááááá       R, *R, *R+, @X, @X(R)
  421.  
  422.         ááááááááááááááááááwherσá Rá refer≤á t∩á ß Registe≥ anΣá ╪á t∩á aε ì
  423.         ááááááááááááááááááaddress.
  424.  
  425.  
  426.                 1.4.2     Instruction Formats
  427.  
  428.         ááááááááááááááááááThσá assemble≥ wil∞ properl∙ evaluatσá ╖á basiπ ì
  429.         ááááááááááááááááááinstrucion formats; these are:
  430.  
  431.         áááááááááááááááááá       Format 0  -  No operands at all (N)
  432.         áááááááááááááááááá       Format 1  -  R,*R,*R+,@X,@X(R)
  433.         áááááááááááááááááá       Format 2  -  Displacement (Disp)
  434.         áááááááááááááááááá       Forma⌠á│  -  Destinatioε Field only (D)
  435.         áááááááááááááááááá       Format 4  -  Signed Displacement (SD)
  436.         áááááááááááááááááá       Format 5  -  Workspace Register (W or C)
  437.         áááááááááááááááááá       Format 6  -  Immediate Operands (IOP)
  438.                                  Forma⌠á╖  -  Bi⌠ Manipulatioε Instrucions
  439.                                               (TMS99105 only)  
  440.  
  441.         ááááááááááááááááááDependinτá oε thσ instructioε thesσ format≤ ma∙ ì
  442.         ááááááááááááááááááliσá withiεá eithe≥ thσ sourcσá o≥á destinatioε ì
  443.         ááááááááááááááááááfields.
  444.                 1.4.3     Group 1 Instructions 
  445.  
  446.                           This group contains the following opcodes:
  447.                            
  448.                                NOP 
  449.         áááááááááááááááááá     RSET IDLE CKOF CKON LREX
  450.         áááááááááááááááááá     RTWP      
  451.  
  452.                           Thesσá opcode≤ permi⌠ n∩ arguments¼á anΣá hencσ ì
  453.         ááááááááááááááááááare of format 0.
  454.  
  455.                 1.4.4     Group 2 Instructions
  456.         áááááááááááááááááá  
  457.         ááááááááááááááááááThi≤ grou≡ oµ instruction≤ arσ oµ Forma⌠ typσ ▒ ì
  458.         ááááááááááááááááááanΣ arσ Dua∞ OperanΣ Instruction≤ witΦ Multiplσ ì
  459.         ááááááááááááááááááAddressinτá Mode≤á fo≥ Sourcσá anΣá Destinatioε ì
  460.         ááááááááááááááááááOperand. 
  461.  
  462.         ááááááááááááááááááThis group contains the following opcodes:
  463.  
  464.         áááááááááááááááááá        ┴á A┬ ├ C┬ ╙ S┬ SO├ SOC┬ 
  465.         áááááááááááááááááá        SZ├á SZC┬á MO╓ MOVB
  466.         áááááááááááááááááá       
  467.         ááááááááááááááááááInstruction format:  [opcode|format1|format1]
  468.  
  469.         ááááááááááááááááááExample:             A *R1+,R2
  470.  
  471.                 1.4.5     Group 3 Instructions
  472.  
  473.                           Thi≤á grou≡á oµ instruction≤ arσá Dua∞á OperanΣ ì
  474.         ááááááááááááááááááInstruction≤ witΦ Multiplσ Addressinτ Mode≤ fo≥ ì
  475.         ááááááááááááááááááthσá Sourcσá OperanΣá anΣá Workspacσáá Registe≥ ì
  476.         ááááááááááááááááááAddressifnτ fo≥ thσ Destination.
  477. è
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484.  
  485.                TMS9900/99105 Cross-assembler  Rev. 1.0                    Page 7
  486.  
  487.  
  488.         ááááááááááááááááááThis group contains the following opcodes:
  489.         áááááááááááááááááá       
  490.         áááááááááááááááááá       COC CZC XOR MPY DIV XOP LDCR STCR
  491.  
  492.         ááááááááááááááááááInstruction format:  [opcode|format3|format1]
  493.  
  494.                           Example:              XOP @LABEL,3  
  495.  
  496.         áááááááá1.4.6áááááGroup 4 Instructions
  497.  
  498.         ááááááááááááááááááThi≤áá grou≡á oµá instruction≤á allo≈á Multiplσ ì
  499.         ááááááááááááááááááAddressinτá mode≤ fo≥ thσ sourcσá Operand¼á anΣ ì
  500.         ááááááááááááááááááthus a single operand instructions.
  501.  
  502.         ááááááááááááááááááThi≤á followinτá instruction≤á belonτá t∩á thi≤ ì
  503.         áááááááááááááááááágroup:
  504.  
  505.         áááááááááááááááááá       ┬ B╠ BLW╨ CL╥ SET╧ IN╓ NE╟ AB╙ SWPB
  506.         áááááááááááááááá á       INC INCT DEC DECT X
  507.         áááááááááááááááááá       BIND(a TMS99105 instruction)
  508.  
  509.         ááááááááááááááááááInstruction format:  [opcode|format1]
  510.  
  511.                           Example:             INC @LABEL(R3)
  512.  
  513.         áááááááá1.4.7     Group 5 Instructions
  514.  
  515.         ááááááááááááááááááThi≤á grou≡ oµ instruction≤ arσ CR╒á Single-Bi⌠ ì
  516.         ááááááááááááááááááInstructions.
  517.  
  518.         ááááááááááááááááááThσá followinτá instruction≤á belonτá t∩áá thi≤ ì
  519.         áááááááááááááááááágroup:  áááááááááááááááááá       
  520.  
  521.         áááááááááááááááááá       SBO SBZ TB
  522.  
  523.         ááááááááááááááááááInstruction format:  [opcode|format4]
  524.  
  525.                           Example:             SBO 25
  526.  
  527.  
  528.                 1.4.8áááááGroup 6 Instructions
  529.  
  530.                           Thi≤áá grou≡áá cover≤á thσáá Conditiona∞áá Jum≡ ì
  531.         ááááááááááááááááááinstrucions«ááá  Notσááá tha⌠ááá thσááá maximuφ ì
  532.         áááááááááááááááááádisplacemen⌠ range is +127 to -128 words.
  533.  
  534.         ááááááááááááááááááThσáá followinτá instruction≤á belonτá t∩á thi≤ ì
  535.         áááááááááááááááááágroup:
  536.         áááááááááááááááááá  
  537.         áááááááááááááááááá       JEQ JGT JH JHE JL JLE JLT JMP JNC JNE
  538.         áááááááááááááááááá       JNO JOC JOP
  539.  
  540.         ááááááááááááááááááInstruction format:  [opcode|format2]
  541.  
  542.                           Example:             JEQ LABEL
  543.  
  544.  
  545.         áááááááá1.4.9áááááGroup 7 Instructions
  546. è
  547.  
  548.  
  549.  
  550.  
  551.  
  552.  
  553.  
  554.                TMS9900/99105 Cross-assembler  Rev. 1.0                    Page 8
  555.  
  556.  
  557.         ááááááááááááááááááThi≤á grou≡á havσ aε Immediatσá Sourcσá OperanΣ ì
  558.         ááááááááááááááááááwitΦá aε Workspacσ Registe≥ a≤ thσá Destinatioε ì
  559.         ááááááááááááááááááOperand.
  560.  
  561.         ááááááááááááááááááThσáá followinτá instruction≤á belonτá t∩á thi≤ ì
  562.         áááááááááááááááááágroup:
  563.  
  564.         áááááááááááááááááá       AI ANDI CI LI ORI
  565.         áááááááááááááááááá       BLSK (a TMS99105 instruction)
  566.  
  567.         ááááááááááááááááááInstruction format:   [opcode|format5]
  568.         áááááááááááááááááá                      [    format6   ]         
  569.  
  570.         ááááááááááááááááááExample:              AI R3,128
  571.  
  572.  
  573.         áááááááá1.4.10ááááGroup 8 Instructions
  574.  
  575.         ááááááááááááááááááThi≤á grou≡á cover≤ thσ Interna∞ Registe≥á LoaΣ ì
  576.         ááááááááááááááááááImmediatσá Instruction≤ anΣ havσá aεá Immediatσ ì
  577.         ááááááááááááááááááSourcσ OperanΣ only.
  578.  
  579.         ááááááááááááááááááThσá followinτá instruction≤á belonτá t∩áá thi≤ ì
  580.         áááááááááááááááááágroup:
  581.         áááááááááááááááááá       
  582.         áááááááááááááááááá       LWPI LIMI
  583.  
  584.         ááááááááááááááááááInstruction format:   [ opcode  ]
  585.         áááááááááááááááááá                      [ format6 ]
  586.  
  587.         ááááááááááááááááááExample:              LIMI 3
  588.  
  589.  
  590.         áááááááá1.4.11ááááGroup 9 Instructions
  591.  
  592.         ááááááááááááááááááThi≤á grou≡ cover≤ thσ Interna∞ Registe≥á Storσ ì
  593.         ááááááááááááááááááInstruction≤á anΣá havσá Destinatioεá Workspacσ ì
  594.         ááááááááááááááááááRegister Addressing only.
  595.  
  596.         ááááááááááááááááááThσáá followinτá instruction≤á belonτá t∩á thi≤ ì
  597.         áááááááááááááááááágroup:
  598.  
  599.         áááááááááááááááááá       STST STWP
  600.         áááááááááááááááááá       LS╘á LW╨ ( TMS9910╡ instructions )  
  601.  
  602.         ááááááááááááááááááInstruction format:   [opcode|format5]
  603.         áááááááááááááááááá  
  604.         ááááááááááááááááááExample:              STST R3
  605.  
  606.                 1.4.12    Group 10 (TMS99105 only)
  607.                   
  608.                           Thi≤ grou≡ cover≤ thσ Bit-Manipulatioε instruc-ì
  609.         áááááááááááááááááátion≤ peculia≥ t∩ thσ TMS99105«  Thi≤ grou≡ ha≤ ì
  610.         ááááááááááááááááááßá differen⌠ instructioε forma⌠ thaε thσá basiπ ì
  611.         áááááááááááááááááá990░á se⌠á insofa≥ a≤ thσ forma⌠ field≤ liσá iε ì
  612.         ááááááááááááááááááthσ 2nΣ word«á  Thσ instruction≤ iε thi≤á grou≡ ì
  613.         ááááááááááááááááááare:
  614.         áááááááááááááááááá       TMB TCMB TSMC
  615. è
  616.  
  617.  
  618.  
  619.  
  620.  
  621.  
  622.  
  623.                TMS9900/99105 Cross-assembler  Rev. 1.0                    Page 9
  624.  
  625.  
  626.         ááááááááááááááááááInstruction format:   [     opcode     ]
  627.         áááááááááááááááááá                      [ format3|format1]
  628.         áááááááááááááááááá         
  629.         ááááááááááááááááááExample:              TMB @BITMAP(R3),8
  630.  
  631.                 1.5       Pseudo-operations
  632.                 1.5.1     END
  633.  
  634.                           Wheεá  thi≤  statemen⌠  i≤á  encountered¼á  thσ  ì
  635.         ááááááááááááááááááassemble≥á decide≤á  tha⌠á  thσá  enΣá oµáá thσ  ì
  636.         áááááááááááááááááásourcσá  filσ  ha≤  beeε reached«á    Iµá  thi≤  ì
  637.         áááááááááááááááááástatemen⌠á  i≤  missinτ  o≥  iε  ßá conditiona∞ ì
  638.         ááááááááááááááááááassembl∙ blocδ tha⌠ i≤ no⌠ beinτ assembled¼ thσ  ì
  639.         ááááááááááááááááááassemble≥á wil∞á encounte≥ end-of-filσá oεá thσ ì
  640.         áááááááááááááááááásourcσá file«á   Iε thi≤ case¼á  thσá assemble≥ ì
  641.         ááááááááááááááááááwil∞á attacΦ aε EN─ statemen⌠  anΣ wil∞ flaτ aε ì
  642.         ááááááááááááááááááerror«   Thσ synta°  i≤  a≤ follows:
  643.  
  644.                           [label]   END
  645.  
  646.                           Iµ  an∙ I╞ statemen⌠ i≤ no⌠ closeΣ witΦ aε END╔ ì
  647.         ááááááááááááááááááa⌠ thi≤ point, an error will be flagged.
  648.  
  649.                           This statement permits no arguments.
  650.  
  651.                 1.5.2     EQU
  652.  
  653.         ááááááááááááááááááThi≤á statemen⌠ i≤ useΣ t∩ assigεá ßá permenan⌠ ì
  654.         áááááááááááááááááávaluσá t∩á ß symbol«á   Thi≤ valuσ ma∙á no⌠á bσ ì
  655.         áááááááááááááááááásubsequentl∙ changeΣ b∙ ß SET¼  anothe≥ EQU¼ o≥ ì
  656.         ááááááááááááááááááb∙á writinτ thσ symbo∞ iε columε ▒ a≤ ßá label«  ì
  657.         ááááááááááááááááááThσ synta° i≤ a≤ follows:
  658.  
  659.                           label     EQU  expression
  660.  
  661.                           ┴á  phasinτ  (P⌐  erro≥  wil∞  resul⌠  iµá  an∙   ì
  662.         ááááááááááááááááááforwarΣá reference≤á  arσ  encountereΣá iεá thσ ì
  663.         ááááááááááááááááááevaluatioε  oµ  thσ expression.
  664.  
  665.                 1.5.3     BYTE
  666.  
  667.                           Thi≤á statemen⌠á i≤á useΣá t∩á placσá byte≤á iε ì
  668.         áááááááááááááááááámemory«áá   EacΦáá bytσáá  i≤á defineΣá b∙áá aε ì
  669.         ááááááááááááááááááexpression«á   Multiplσ byte≤ caε bσ defineΣ b∙ ì
  670.         ááááááááááááááááááexpression≤á separateΣá b∙á commas«áá   Iµá  aε ì
  671.         ááááááááááááááááááexpressioε  evaluate≤ t∩ ß quantit∙ outsidσ thσ ì
  672.         áááááááááááááááááárangσ -12╕  t∩ 255¼  aε erro≥ i≤ flagged«   Thσ ì
  673.         áááááááááááááááááásynta°  i≤  a≤ follows:
  674.  
  675.                           [label]   BYTE  [expr1][,epxr2].....
  676.  
  677.                 1.5.4     TEXT
  678.  
  679.                           Thi≤á statemen⌠á i≤ useΣ t∩á placσá string≤á iε ì
  680.         áááááááááááááááááámemory«á  It≤á argument≤á ma∙ onl∙ bσá strings«  ì
  681.         ááááááááááááááááááMultiplσ string≤ ma∙ bσ placeΣ  iε  memor∙á  iµ  ì
  682.         ááááááááááááááááááthσá string≤  arσ  separateΣ  b∙á commas«á  Thσ ì
  683.         áááááááááááááááááásynta° i≤ a≤ follows:
  684. è
  685.  
  686.  
  687.  
  688.  
  689.  
  690.  
  691.  
  692.                TMS9900/99105 Cross-assembler  Rev. 1.0                    Page 10
  693.  
  694.  
  695.                           [label]   TEXT  [string][,string].....
  696.  
  697.  
  698.                 1.5.5     WORD
  699.  
  700.                           Thi≤á statemen⌠á i≤á useΣá t∩á placσá word≤á iε ì
  701.         áááááááááááááááááámemory«áá   EacΦáá worΣáá  i≤á defineΣá b∙áá aε ì
  702.         ááááááááááááááááááexpression«á   Multiplσ word≤ ma∙ bσ defineΣ b∙ ì
  703.         ááááááááááááááááááexpression≤ separateΣ b∙  commas«á   Word≤á arσ  ì
  704.         ááááááááááááááááááplaceΣá iε memor∙ witΦ thei≥ high-orde≥ bytσ iε ì
  705.         ááááááááááááááááááthσ low-orde≥ memor∙ locatioε anΣ thσ low-orde≥ ì
  706.         áááááááááááááááááábytσá iε thσ high-orde≥ memor∙á location«á  Thσ ì
  707.         áááááááááááááááááásynta° i≤ a≤ follows:
  708.  
  709.                           [label]   WORD  [expr1][,expr2].....
  710.  
  711.                 1.5.6     BSS (Block Starting with Symbol)
  712.  
  713.                           Thi≤á statemen⌠ i≤ useΣ t∩ reservσ ßá blocδá oµ ì
  714.         áááááááááááááááááámemor∙áá fo≥á workinτá  storage¼áá  etc«áá   I⌠ ì
  715.         áááááááááááááááááárequire≤ onσ argumen⌠ tha⌠ give≤ thσ numbe≥á oµ ì
  716.         áááááááááááááááááábyte≤á oµ storagσ t∩  reserve«á   Thσ synta° i≤ ì
  717.         ááááááááááááááááááa≤ follows:
  718.  
  719.                           [label]   BSS  expression
  720.  
  721.         áááááááá1.5.7áááááEVEN
  722.  
  723.         ááááááááááááááááááThi≤á statemen⌠  i≤ useΣ t∩ forcσ thσ assemble≥ ì
  724.         áááááááááááááááááát∩á aligε codσ oε aε eveε worΣ boundar∙ iµá thσ ì
  725.         áááááááááááááááááápresen⌠á programmσá counte≥á i≤á odd«á  Iµá thσ ì
  726.         ááááááááááááááááááprogrammσ counte≥ i≤ odΣ ß zer∩ bytσ i≤á outpu⌠ ì
  727.         ááááááááááááááááááiµáá eveεá thσá statemen⌠á i≤áá ignored«áá  Thσ ì
  728.         ááááááááááááááááááassemble≥ wil∞ als∩ flaτ aε erro≥ i≤ aε attemp⌠ ì
  729.         áááááááááááááááááái≤ madσ t∩ outpu⌠ codσ t∩ aε odΣ address«á  Thσ ì
  730.         áááááááááááááááááásyntax is as follows:
  731.                             
  732.         áááááááááááááááááá[label]   EVEN 
  733.          
  734.                 1.5.8     DXOP
  735.  
  736.                           Thi≤ statemen⌠ allow≤ thσ programme≥ t∩á definσ ì
  737.         ááááááááááááááááááthei≥áá owεáá macr∩á instruction≤á arounΣáá thσ ì
  738.         ááááááááááááááááááExtendeΣá Operatioεá Instructioεá (XOP)«áá  Thσ ì
  739.         ááááááááááááááááááassemblσá wil∞á substitutσ thσ XO╨ codσá fo≥á ß ì
  740.         áááááááááááááááááágiveε instructioε iε placσ oµ thσ namσ assigneΣ ì
  741.         ááááááááááááááááááto the XOP.  The syntax is as follows:
  742.  
  743.         áááááááááááááááááá       DXOP PUSH,3    ;assign the name PUSH to
  744.         áááááááááááááááááá                      ;XOP number 3
  745.         áááááááááááááááááá
  746.         ááááááááááááááááááFo≥á examplσ iµ PUS╚ i≤ ß previousl∙ codeΣá XO╨ ì
  747.         ááááááááááááááááááwhicΦá pushe≤á register≤á ont∩ thσá stacδá theε ì
  748.         ááááááááááááááááááinsteaΣá oµ codinτ thi≤ XO╨ instructioε a≤á XO╨ ì
  749.         ááááááááááááááááááR3,│á yo⌡ caε codσ PUS╚ R│ - thi≤ wil∞á producσ ì
  750.         ááááááááááááááááááthσá samσ codσ a≤ XO╨ R3,│ bu⌠ wil∞á  generall∙ ì
  751.         áááááááááááááááááámakσá thσá programmσ fa≥ morσ eas∙á t∩á follow«  ì
  752.         ááááááááááááááááááThσ 99░ CPU'≤ allo≈ u≡ t∩ 1╡ XOP's.
  753.         áááááááááááááááááá  è
  754.  
  755.  
  756.  
  757.  
  758.  
  759.  
  760.  
  761.                TMS9900/99105 Cross-assembler  Rev. 1.0                    Page 11
  762.  
  763.  
  764.         áááááááááááááááááá  
  765.                 1.5.9     Conditional Assembly
  766.  
  767.         ááááááááááááááááááBlock≤áá oµá codσá caεá bσá assembleΣá o≥áá no⌠ ì
  768.         ááááááááááááááááááassembleΣáá  baseΣá oεá  thσá valuσáá oµáá somσ ì
  769.         ááááááááááááááááááexpression«   Thσ basiπ synta° i≤ as follows:
  770.  
  771.                                     IF   expression
  772.  
  773.                                (lines of code)
  774.  
  775.                                     ENDI
  776.  
  777.                           Iµá thσá expressioε evaluate≤ t∩ 0¼á  thσá codσ ì
  778.         ááááááááááááááááááwil∞ no⌠ bσ assembled«á   Thσ sourcσ line≤ wil∞ ì
  779.         áááááááááááááááááábσá transfereΣá t∩ thσá listing¼á  bu⌠á n∩á he° ì
  780.         ááááááááááááááááááoutpu⌠ wil∞ bσ generated«á   I⌠  i≤ recommendeΣ  ì
  781.         áááááááááááááááááátha⌠á  ßá valuσá oµ $fffµ bσ useΣ fo≥á ßá  truσ ì
  782.         áááááááááááááááááávaluσ  sincσ i⌠ turn≤ int∩ ß falsσ valuσá unde≥  ì
  783.         áááááááááááááááááábitwisσ inversion.
  784.  
  785.                           Iεáá  addition¼áá   thσá  ELS┼á  directivσá  i≤  ì
  786.         áááááááááááááááááásupporteΣ  a≤ follows:
  787.  
  788.                                     IF   expression
  789.  
  790.                                (lines of code)
  791.  
  792.                                     ELSE
  793.  
  794.                                (more lines of code)
  795.  
  796.                                     ENDI
  797.  
  798.                           This is equivalent to:
  799.  
  800.                                     IF   expression
  801.  
  802.                                (lines of code)
  803.  
  804.                                     ENDI
  805.                                     IF   NOT expression
  806.  
  807.                                (more lines of code)
  808.  
  809.                                     ENDI
  810.  
  811.                           Notσá  tha⌠á  label≤  arσá no⌠á  permitteΣá  oε  ì
  812.         ááááááááááááááááááconditiona∞á assembl∙ directives«á   Als∩á notσ ì
  813.         áááááááááááááááááátha⌠áá aεá EN─á  statemen⌠á caεá  fai∞á  t∩á bσ ì
  814.         áááááááááááááááááárecognizeΣ iµ i⌠ i≤ iε  ß  conditiona∞ assembl∙ ì
  815.         ááááááááááááááááááblocδ witΦ ß falsσ expression.
  816.  
  817.                           ┴  phasinτ  (P⌐ erro≥ wil∞ bσ flaggeΣ iµá therσ ì
  818.         ááááááááááááááááááarσ  an∙ forward references in the expression.
  819.  
  820.                 1.5.10    AORG
  821.  
  822.                           Thi≤á  statemen⌠á  i≤  useΣ  t∩ loaΣ  ßá  valuσ  ìè
  823.  
  824.  
  825.  
  826.  
  827.  
  828.  
  829.  
  830.                TMS9900/99105 Cross-assembler  Rev. 1.0                    Page 12
  831.  
  832.  
  833.         ááááááááááááááááááint∩  thσ assembl∙ prograφ counter«   Thσ valuσ ì
  834.         áááááááááááááááááái≤á obtaineΣ  froφ thσ  expression«á   Iµá  thσ ì
  835.         ááááááááááááááááááexpressioεá contain≤á  forwarΣá references¼áá ß ì
  836.         ááááááááááááááááááphasinτá (P⌐ erro≥ wil∞ result«á Iµ ß labe∞á i≤ ì
  837.         áááááááááááááááááápresent¼á i⌠á wil∞ bσ EQUeΣ t∩ thσ ne≈á prograφ ì
  838.         áááááááááááááááááácounte≥ value.  The syntax is:
  839.  
  840.                           [label]   AORG  expression
  841.  
  842.                 1.5.11    SET
  843.  
  844.                           Thi≤á statemen⌠ i≤ useΣ t∩ assigεá ßá temporar∙ ì
  845.         áááááááááááááááááávaluσá t∩á ß symbol«á   Thσ  symbo∞ ma∙ no⌠á bσ ì
  846.         ááááááááááááááááááredefineΣ b∙ aε EQ╒ o≥ b∙  writinτ i⌠ iε columε ì
  847.         áááááááááááááááááá▒á a≤ ß label¼á  bu⌠ i⌠  ma∙  bσá redefineΣá b∙ ì
  848.         ááááááááááááááááááanothe≥á SE╘á statement«á   Thσ valuσá fo≥á thσ ì
  849.         áááááááááááááááááásymbo∞ i≤ obtaineΣ froφ thσ expression«á  Iµ i⌠ ì
  850.         áááááááááááááááááácontain≤á forwarΣ  references¼á  ß phasinτá (P⌐ ì
  851.         ááááááááááááááááááerro≥ wil∞  result«  
  852.                           The syntax is:
  853.  
  854.                           label     SET  expression
  855.  
  856.                 1.6       Error Messages
  857.  
  858.                           Erro≥á  message≤á  arσ flaggeΣ witΦá ßá  singlσ  ì
  859.         áááááááááááááááááálette≥á  iε columε  ▒  oµ thσ offendinτ linσ iε ì
  860.         ááááááááááááááááááthσá  listing«á   Thσá meaninτ oµá eacΦá lette≥ ì
  861.         ááááááááááááááááááfollows.
  862.  
  863.                                A    Presently not implemented.
  864.  
  865.                                B    Distancσ  oε  ß  brancΦá  instructioε  ì
  866.         áááááááááááááááááááááááááááái≤áá  to∩áá great«áá   Usσáá ßáá jum≡ ì
  867.         ááááááááááááááááááááááááááááinstructioεá witΦ ß brancΦ arounΣ it¼  ì
  868.         ááááááááááááááááááááááááááááo≥ rearrangσ you≥ codσ t∩ shorteε thσ ì
  869.         áááááááááááááááááááááááááááádistance.
  870.  
  871.                                D    Digi⌠á to∩á largσ fo≥á thσá basσá wa≤ ì
  872.         ááááááááááááááááááááááááááááencountered«á  Iε particular¼á  watcΦ ì
  873.         ááááááááááááááááááááááááááááfo≥ ╕ o≥ ╣ iε aε  octa∞ numbe≥ anΣ a-ì
  874.         ááááááááááááááááááááááááááááµ iε ß decima∞ number.
  875.  
  876.                                E    Expressioε ill-formed«   Looδ fo≥ noε ì
  877.         ááááááááááááááááááááááááááááarithmetiπáá character≤á iεáá indexeΣ ì
  878.         ááááááááááááááááááááááááááááaddressing modes.
  879.  
  880.                                I    Iµ  stacδ imbalance«á   Looδ fo≥ ELS┼ ì
  881.         ááááááááááááááááááááááááááááo≥á  END╔á withou⌠á  aε I╞ o≥á aεá I╞ ì
  882.         áááááááááááááááááááááááááááástil∞ opeε a⌠ thσ enΣ of the file.
  883.  
  884.                                L    InvaliΣ  label«á   Labe∞ ma∙  contaiε  ì
  885.         ááááááááááááááááááááááááááááinvaliΣ character≤  o≥  bσ equa∞ t∩ ß  ì
  886.         ááááááááááááááááááááááááááááreserveΣ  worΣ likσ NOT«á   Labe∞ ma∙ ì
  887.         áááááááááááááááááááááááááááábσ presen⌠ oε  ß conditiona∞ assembl∙ ì
  888.         áááááááááááááááááááááááááááádirective.
  889.  
  890.                                M    Labe∞áá multipl∙áá defined«áá   Labe∞ ì
  891.         áááááááááááááááááááááááááááádefineΣáá morσá thaεá oncσá anΣáá al∞ ìè
  892.  
  893.  
  894.  
  895.  
  896.  
  897.  
  898.  
  899.                TMS9900/99105 Cross-assembler  Rev. 1.0                    Page 13
  900.  
  901.  
  902.         áááááááááááááááááááááááááááádefinitions are not SET statements.
  903.  
  904.                                O    InvaliΣáá   opcode«ááá    Looδáá  fo≥  ì
  905.         áááááááááááááááááááááááááááámisspellings¼á missinτ semicolons¼ o≥ ì
  906.         ááááááááááááááááááááááááááááopcode≤ iε columε 1.
  907.  
  908.                                P    Phasinτ error«   Looδ fo≥ expression≤ ì
  909.         ááááááááááááááááááááááááááááiεáá ORG¼ááá EQU¼áá  SET¼áá  o≥áá  I╞  ì
  910.         áááááááááááááááááááááááááááádirective≤áá  tha⌠á  contaiεá forwarΣ ì
  911.         ááááááááááááááááááááááááááááreferences«  Iµ nonσ exist¼ somethinτ ì
  912.         ááááááááááááááááááááááááááááwierΣ i≤ goinτ oε a≤ ß labe∞ tha⌠ wa≤ ì
  913.         áááááááááááááááááááááááááááádefineΣáá iεá pas≤áá ▒áá mysteriousl∙ ì
  914.         áááááááááááááááááááááááááááávanisheΣ iε pas≤ 2.
  915.  
  916.         áááááááááááááááááá     R    Registe≥ valuσ to∩ large«á  Register≤ ì
  917.         áááááááááááááááááááááááááááávalue≤á betweeεá ░á anΣ 1╡á onl∙á arσ ì
  918.         ááááááááááááááááááááááááááááallowed«  Thi≤ erro≥ wil∞ mos⌠ likel∙ ì
  919.         ááááááááááááááááááááááááááááoccu≥á iµ ß registe≥ valuσá i≤á beinτ ì
  920.         ááááááááááááááááááááááááááááevaluateΣá froφá aε expressioεá whicΦ ì
  921.         ááááááááááááááááááááááááááááoverflows.
  922.  
  923.         áááááááááááááááááááááááS    Synta°á error«á   Checδá you≥á synta° ì
  924.         ááááááááááááááááááááááááááááagains⌠  m∙ samples.
  925.  
  926.                                T    To∩áá   man∙á  argument≤á  oεáá  thi≤  ì
  927.         ááááááááááááááááááááááááááááline«áá   WOR─á directive≤á ma∙á onl∙ ì
  928.         áááááááááááááááááááááááááááádefinσá 12╖  words¼á  whilσ TEX╘  anΣ  ì
  929.         ááááááááááááááááááááááááááááBYT┼ directive≤ ma∙ onl∙ definσá  25╡ ì
  930.         áááááááááááááááááááááááááááábytes«áá    Oεá   othe≥á  statements¼   ì
  931.         ááááááááááááááááááááááááááááyo⌡á   pu⌠á superfluou≤ argument≤á oε ì
  932.         ááááááááááááááááááááááááááááthσ line.
  933.  
  934.                                U    UndefineΣá    symbo∞áá    encountereΣ     ì
  935.         áááááááááááááááááááááááááááádurinτ expression evaluation.
  936.  
  937.                                V    Valuσááá  ou⌠áá  oµáá bounds«ááá   Iε  ì
  938.         ááááááááááááááááááááááááááááparticular¼á  FC┬ expression≤  anΣ 8-ì
  939.         áááááááááááááááááááááááááááábi⌠á immediatσ value≤  mus⌠á evaluatσ  ì
  940.         áááááááááááááááááááááááááááát∩ -12╕ t∩ 255¼á  whilσ inde°á value≤ ì
  941.         áááááááááááááááááááááááááááámus⌠ evaluatσ t∩ ░ t∩ 255.
  942.  
  943.                                *    Thi≤á  statemen⌠á generateΣá b∙á  thσ  ì
  944.         ááááááááááááááááááááááááááááassembler«á  Righ⌠á  now¼á  thi≤ onl∙ ì
  945.         ááááááááááááááááááááááááááááhappen≤áá iµáá yo⌡áá dro≡áá aεááá EN─   ì
  946.         áááááááááááááááááááááááááááástatemen⌠ááá   o≥ááá   removσááá   i⌠    ì
  947.         ááááááááááááááááááááááááááááthrougΦ conditional assembly.
  948.  
  949.                                "    Quotσá  imbalancσá error«á   Bea≥á iε ì
  950.         ááááááááááááááááááááááááááááminΣá tha⌠á º wil∞  no⌠á terminatσá ß ì
  951.         áááááááááááááááááááááááááááástrinτá starteΣá  witΦ  óá anΣá vice-ì
  952.         ááááááááááááááááááááááááááááversa.
  953.  
  954.                                (    Parenthesi≤á imbalancσ error«á  Coun⌠ ì
  955.         ááááááááááááááááááááááááááááthem!
  956.  
  957.                 1.7       Assembler Abort Conditions
  958.  
  959.                           Unde≥  certaiε circumstances¼á  thi≤á assemble≥ ì
  960.         ááááááááááááááááááwil∞á jus⌠ givσ u≡ anΣ qui⌠ iε thσ middlσ oµ aε ìè
  961.  
  962.  
  963.  
  964.  
  965.  
  966.  
  967.  
  968.                TMS9900/99105 Cross-assembler  Rev. 1.0                    Page 14
  969.  
  970.  
  971.         ááááááááááááááááááassembly«á   Iµ yo⌡ don'⌠  ge⌠ thσ erro≥á coun⌠ ì
  972.         áááááááááááááááááádiagnostiπ oε  thσ  console¼ reaΣ  you≥  screeε ì
  973.         ááááááááááááááááááfo≥ sureí   Thσ  followinτ  message≤ occur:
  974.  
  975.                                1)   Can't open source.
  976.  
  977.                                     Thσá   sourcσ  filσ  doe≤  no⌠  exis⌠  ì
  978.         ááááááááááááááááááááááááááááoε  thσ specified disk drive.
  979.  
  980.                                2)   Can't open list.
  981.                                     Can't open hex.
  982.  
  983.                                     N∩á  director∙á entrie≤ lef⌠á oεá thσ ì
  984.         áááááááááááááááááááááááááááádisδ  drivσ in question.
  985.  
  986.                                3)   Illegal command line.
  987.  
  988.                                     Bone up on command lines.
  989.  
  990.                                4)   No file info supplied.
  991.  
  992.                                     Bone up on command lines.
  993.  
  994.                                5)   If stack overflow.
  995.  
  996.                                     I╞á  directive≤  ma∙ onl∙á bσá nesteΣ  ì
  997.         áááááááááááááááááááááááááááá1╢á  deep«áá  RebuilΣá  you≥á  sourcσ  ì
  998.         áááááááááááááááááááááááááááácodσ  t∩  reducσ  you≥ nestinτ depth¼ ì
  999.         ááááááááááááááááááááááááááááo≥á changσá thσ "#definσ IFDEPT╚á 16ó  ì
  1000.         áááááááááááááááááááááááááááástatemen⌠ iε xasm99.gb∞ anΣ recompilσ ì
  1001.         ááááááááááááááááááááááááááááthσ assembler.
  1002.  
  1003.                                6)   Disk read error.
  1004.  
  1005.                                     Sourcσá  filσá  ha≤  ßá baΣá CR├á  o≥  ì
  1006.         áááááááááááááááááááááááááááásomσ  othe≥ difficulty.
  1007.  
  1008.                                7)   Disk write error.
  1009.  
  1010.                                     Ou⌠ oµ disδ o≥ director∙ spacσ oε thσ ì
  1011.         áááááááááááááááááááááááááááális⌠ o≥ hex file.
  1012.  
  1013.                                8)   Error closing file.
  1014.  
  1015.                                     Probleφáá  closinτá  lis⌠á  o≥áá  he°  ì
  1016.         ááááááááááááááááááááááááááááfile«    Yo⌡ shouldn't get this one.
  1017.  
  1018.                                9)   Symbol Table Overflow.
  1019.  
  1020.                                     You≥á sourcσ prograφ define≤ to∩ man∙ ì
  1021.         áááááááááááááááááááááááááááásymbols«á  Thσ  curren⌠ limi⌠ i≤ 500«   ì
  1022.         ááááááááááááááááááááááááááááIµá yo⌡ havσ morσ memor∙ thaεá ╔á do¼ ì
  1023.         ááááááááááááááááááááááááááááyo⌡á caε changσ thσ "#definσá SYMBOL╙    ì
  1024.         áááááááááááááááááááááááááááá500ó linσ iε a99.gb∞  anΣá  recompilσ ì
  1025.         ááááááááááááááááááááááááááááthσá   assembler«á   Otherwise¼á  yo⌡ ì
  1026.         áááááááááááááááááááááááááááámus⌠ worδ oε you≥ sourcσ code.
  1027.  
  1028.                 1.8       Compiling the Assembler
  1029. è
  1030.  
  1031.  
  1032.  
  1033.  
  1034.  
  1035.  
  1036.  
  1037.                TMS9900/99105 Cross-assembler  Rev. 1.0                    Page 15
  1038.  
  1039.  
  1040.                           T∩á  compilσ thσ assemble≥ a≤ i⌠á stands¼á  yo⌡ ì
  1041.         ááááááááááááááááááwil∞  neeΣ the following items:
  1042.  
  1043.                                1)   40K of RAM.
  1044.  
  1045.                                2)   The BDS C Compiler Version 1.5
  1046.         áááááááááááááááááá          (good box, Leor!!).
  1047.  
  1048.                                3)   Digita∞áá Research'≤áá AS═áá o≥áá MA├ ì
  1049.         ááááááááááááááááááááááááááááassembler«á  (Note║á  Onl∙á needeΣ iµ ì
  1050.         ááááááááááááááááááááááááááááyo⌡ wan⌠ t∩ pla∙  witΦ thσ  function≤  ì
  1051.         ááááááááááááááááááááááááááááiεá a99tbls.maπ a≤ the∙  exis⌠ iεá  ß  ì
  1052.         ááááááááááááááááááááááááááááforφá digestiblσá b∙á CLIN╦á iεá  thσ  ì
  1053.         ááááááááááááááááááááááááááááfilσ xasm99.crl.)
  1054.  
  1055.                           T∩  ge⌠  a99tbls.cr∞  u≡  froφ  scratch¼á   yo⌡  ì
  1056.         áááááááááááááááááád∩á  thσá following«á   ╔á  assumσá  al∞á file≤ ì
  1057.         ááááááááááááááááááincludinτ AS═ o≥ MA├ livσ oε drivσ A.
  1058.  
  1059.                                A>casm a99tbls        ;source a99tbls.csm
  1060.  
  1061.                           This should yield a file a99tbls.asm on drive A.
  1062.  
  1063.                                A>maπá a99tbl≤ $p· -≤  ;ma∙ usσ asφ fn.aa· ì
  1064.  
  1065.                                A>cloaΣá a99tbl≤       ;producσ CR╠ filσ ì
  1066.  
  1067.                          You  should  now have a99tbls.crl on  drive  A.
  1068.  
  1069.                          áNo≈á yo⌡á arσ read∙ t∩ compilσ thσ res⌠ oµá thσ ì
  1070.         áááááááááááááááááábeast.
  1071.  
  1072.                                A>cc a99
  1073.                                A>cc a99asmlnc
  1074.                                A>cc a99evalc
  1075.                                A>cc a99getc
  1076.                                A>cc a99putc
  1077.                                A>cc a99symbc
  1078.  
  1079.                           Now you can link it all together.
  1080.  
  1081.                                A>clink a99 -s
  1082.  
  1083.                                *a99asmln
  1084.                                *a99eval
  1085.                                *a99get
  1086.                                *a99put
  1087.                                *a99symb
  1088.                                *a99tbls
  1089.  
  1090.                           And, as if by magic, you've got a99.com!
  1091.  
  1092.                           Notσá tha⌠á thσ linkagσ caε al∞ bσ donσ oεá onσ ì
  1093.         ááááááááááááááááááline¼á  bu⌠ m∙ pape≥ isn'⌠ widσ enougΦ herσá t∩ ì
  1094.         áááááááááááááááááád∩á i⌠á tha⌠ way«á Notσ  tha⌠ iµ yo⌡ havσá morσ ì
  1095.         ááááááááááááááááááthaε 40╦ oµ  RAM¼á  yo⌡  ma∙ wan⌠  t∩á increasσ ì
  1096.         ááááááááááááááááááyou≥ symbo∞ tablσ size«á   Symbol≤ arσ 1░ byte≤ ì
  1097.         ááááááááááááááááááeach¼ s∩ plaε accordingly.
  1098. è
  1099.  
  1100.  
  1101.  
  1102.  
  1103.  
  1104.  
  1105.  
  1106.                TMS9900/99105 Cross-assembler  Rev. 1.0                    Page 16
  1107.  
  1108.  
  1109.  
  1110.                 1.9       Final Comments
  1111.                           Happ∙á  assemblingíá   Iµ yo⌡ havσ question≤ o≥ ì
  1112.         áááááááááááááááááánotσá  an∙ bugs¼á   I'Σ   appreciatσ  ßá  shou⌠  ì
  1113.         ááááááááááááááááááa⌠á   (617)258-1204¼á (617)266-317╣  o≥ oεá thσ ì
  1114.         ááááááááááááááááááBostoε CBB╙ a⌠  (617)963-8310«á  Thσ  question≤ ì
  1115.         ááááááááááááááááááwil∞á poin⌠ u≡ weaknesse≤ iε thσá  manual¼á anΣ ì
  1116.         ááááááááááááááááááthσ bug≤ neeΣ t∩ bσ stampeΣ upoε unmercifully.
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127.  
  1128.  
  1129.  
  1130.  
  1131.  
  1132.  
  1133.  
  1134.  
  1135.  
  1136.  
  1137.  
  1138.  
  1139.  
  1140.  
  1141.  
  1142.  
  1143.  
  1144.  
  1145.  
  1146.  
  1147.  
  1148.  
  1149.  
  1150.  
  1151.  
  1152.  
  1153.  
  1154.  
  1155.  
  1156.  
  1157.  
  1158.  
  1159.  
  1160.  
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166.  
  1167. è
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.                TMS9900/99105 Cross-assembler  Rev. 1.0                    Page 17
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.  
  1194.  
  1195.  
  1196.  
  1197.  
  1198.  
  1199.  
  1200.  
  1201.  
  1202.  
  1203.  
  1204.  
  1205.  
  1206.  
  1207.  
  1208.  
  1209.  
  1210.  
  1211.  
  1212.  
  1213.  
  1214.  
  1215.  
  1216.  
  1217.  
  1218.  
  1219.  
  1220.  
  1221.  
  1222.  
  1223.  
  1224.  
  1225.  
  1226.  
  1227.  
  1228.  
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234.  
  1235.  
  1236.  
  1237.  
  1238.  
  1239.  
  1240.  
  1241.  
  1242.  
  1243.  
  1244.  
  1245.