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