home *** CD-ROM | disk | FTP | other *** search
Text File | 1987-09-28 | 46.5 KB | 1,245 lines |
-
-
-
-
-
-
-
-
-
-
- TMS9900/99105 Cross-assembler
-
-
- Rev. 1.0
-
- Derived from the original William C. Colley, III.
- M6800 Cross Assembler
-
- by
-
-
- Alexander Cameron
-
- Written and modified during June 1984.
-
-
-
-
- The Manual Such As It Is.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- TMS9900/99105 Cross-assembler Rev. 1.0 Page 1
-
-
- 1.1 Format of Cross-assembler Commands
- 1.1.1 Command Strings
-
- T∩á ruε thσ 990░ cross-assembler¼á typσá thσ ì
- ááááááááááááááááááfollowinτ commanΣ line:
-
- A>a99 filename options
-
- filename║
- ááááááááááááááááááThσáá namσáá oµá thσá sourcσá inpu⌠áá filσáá i≤ ì
- ááááááááááááááááááfilename.a99¼á thσ lis⌠ caε g∩ t∩ filename.l99¼ ì
- ááááááááááááááááááanΣ thσ he° filσ caε g∩ t∩ filename.h99.
-
- options: See next section.
-
- 1.1.2 Options
-
- Thσá sourcσá filσá come≤á froφá thσá currentl∙ ì
- ááááááááááááááááááloggeΣ disδ drivσ unles≤ i⌠ i≤ redirecteΣ b∙ ì
- ááááááááááááááááááputtinτ thσ strinτ "sdó iε thσ option≤ field« ì
- áááááááááááááááááá≤á specifie≤ thσ sourcσ filσ anΣ Σ i≤ ßá devicσ ì
- áááááááááááááááááácodσ froφ thσ followinτ list:
-
- a, b, c, d Disk drives.
- - The currently logged in disk drive.
-
- Line≤á oµ inpu⌠ containinτ error≤ wil∞á alway≤ ì
- áááááááááááááááááábσá outpu⌠ t∩ thσ consolσ device«á Iµ thσ ful∞ ì
- áááááááááááááááááálistinτá i≤ desired¼á i⌠ mus⌠ bσ calleΣ fo≥á b∙ ì
- ááááááááááááááááááputtinτá thσ strinτ "ldó iε thσ option≤á field« ì
- áááááááááááááááááá∞ specifie≤ lis⌠ filσ anΣ Σ i≤ ß devicσ codσ a≤ ì
- áááááááááááááááááápe≥ thσ sourcσ file¼á o≥ onσ oµ thσá following║
- ì
- áááááááááááááááááá° Consolσ device.
- y List device.
-
- Thσá he° filσ wil∞ no⌠ bσ outpu⌠ unles≤ calleΣ ì
- ááááááááááááááááááfo≥ a≤ pe≥ thσ lis⌠ file.
-
- Option≤á mus⌠á bσ ruε togethe≥ int∩á ßá singlσ ì
- áááááááááááááááááástrinτ witΦ n∩ embeddeΣ blanks.
-
- 1.1.3 Examples
-
- A>a99 barf source -- a:barf.a99
- list -- none.
- hex -- none.
-
- A>a99 barf sblxha source -- b:barf.a99
- list -- con:
- hex -- a:barf.h99
-
- A>a99 barf ly source -- a:barf.a99
- list -- lst:
- hex -- none.
-
-
- A>b:a99 barf sbh- source -- b:barf.a99
- list -- none.è
-
-
-
-
-
-
-
- TMS9900/99105 Cross-assembler Rev. 1.0 Page 2
-
-
- hex -- a:barf.h99
-
-
- 1.2 Format of TMS9900 Cross-assembler Source Files
-
- Line≤ oµ sourcσ inpu⌠ arσ terminateΣ witΦ CR/L╞ ì
- áááááááááááááááááápairs« Internally¼ thσ characte≥ beforσ thσ L╞ ì
- áááááááááááááááááái≤ discarded¼ s∩ iµ thσ C╥ i≤ missing¼ thσ las⌠ ì
- áááááááááááááááááácharacte≥á oµ thσ linσ wil∞ bσ eateεá up«á Thσ ì
- ááááááááááááááááááinterna∞ linσ buffe≥ wil∞ holΣ ß 12░ characte≥ ì
- ááááááááááááááááááline«á Thi≤á ma∙ bσ changeΣ b∙ alterinτá thσ ì
- áááááááááááááááááá"#definσ LINLE╬ 120ó statemen⌠ iεá xasm99.gb∞ ì
- ááááááááááááááááááanΣá recompilinτ thσ cross-assembler«á Exces≤ ì
- áááááááááááááááááácharacter≤ iε thσ linσ arσ throwε out.
-
- Lowe≥á casσá letter≤ arσ converteΣá t∩á uppe≥ ì
- áááááááááááááááááácasσ iε a≤ fe≈ place≤ a≤ possible« The∙ are:
-
- 1) In opcodes,
-
- 2) In checking for keywords such as NOT, and
-
- 3) In command strings.
-
- Thi≤ mean≤ tha⌠ "not"¼á "NOT"¼á "Not"¼ etc« ì
- ááááááááááááááááááarσá al∞á possiblσ spelling≤ oµá thσá logica∞ ì
- ááááááááááááááááááinversioεá operator«á Thi≤ als∩á mean≤á tha⌠ ì
- áááááááááááááááááá"fooóáá anΣá "FOOóá arσá differen⌠á symbols« ì
- ááááááááááááááááááWatcΦá thi≤ iµ yo⌡ star⌠ encounterinτ ╒á error≤ ì
- ááááááááááááááááááoµ symbol≤ tha⌠ yo⌡ "knowó yo⌡ defined.
-
- 1.2.1 Statements
-
- Sourcσ file≤ inpu⌠ t∩ thσ 990░á Cross-assemble≥ ì
- ááááááááááááááááááconsis⌠ oµ statement≤ oµ thσ form:
-
- [label] [opcode] [arguments] [;comments.]
-
- Label≤á arσá recognizeΣ b∙ thei≥ beginninτá iε ì
- áááááááááááááááááácolumε 1« Iµ i⌠ doesn'⌠ begiε there¼ i⌠ i≤ ì
- ááááááááááááááááááassumeΣá t∩á bσá aεá opcode«á Label≤á arσ ì
- ááááááááááááááááááassigneΣ thσ curren⌠ prograφ counte≥á valuσ ì
- ááááááááááááááááááunles≤ thσ line'≤ opcodσ i≤ "EQUó o≥ "SET".
-
- Opcode≤áá ma∙á bσá eithe≥á 990░áá instructioε ì
- áááááááááááááááááámnemonic≤ o≥ pseudo-ops.
-
- Thσá argument≤ followinτ thσ opcodσ wil∞á var∙ ì
- ááááááááááááááááááwitΦ thσ opcode«á Iε thσ casσ oµ opcode≤ sucΦ ì
- ááááááááááááááááááa≤ "NOP"¼ the∙ ma∙ bσ absen⌠ entirely.
-
- Line≤á terminatσ witΦ eithe≥ ß CR/L╞ pai≥ o≥á ß ì
- áááááááááááááááááásemicoloεá tha⌠ i≤ no⌠ embeddeΣ iε ßá quoteΣ ì
- áááááááááááááááááástring« Anythinτ afte≥ ß semicoloε i≤ ignoreΣ ì
- ááááááááááááááááááb∙á thσá assembler¼á bu⌠á wil∞á appea≥á iεá thσ ì
- áááááááááááááááááálisting«á Notσá tha⌠á ß semicoloε iε columεá ▒ ì
- ááááááááááááááááááwil∞ makσ thσ entirσ linσ ß comment.
- 1.2.2 Symbols
- è
-
-
-
-
-
-
-
- TMS9900/99105 Cross-assembler Rev. 1.0 Page 3
-
-
- Symbol≤ ma∙ bσ oµ an∙ length¼á bu⌠ onl∙á thσ ì
- ááááááááááááááááááfirs⌠á ╕ character≤ arσ significant«á Thi≤ ì
- ááááááááááááááááááma∙á bσá changeΣá b∙á changinτá thσá "#definσ ì
- ááááááááááááááááááSYMLE╬áá 8óáá statemen⌠áá iεáá a68.gb∞ááá anΣ ì
- áááááááááááááááááárecompilinτá thσá assembler«áá Notσá tha⌠ ì
- ááááááááááááááááááthi≤á increase≤á thσ storagσ requireΣá b∙á thσ ì
- áááááááááááááááááásymbo∞á tablσá a≤ eacΦ entr∙ iεá thσá symbo∞ ì
- áááááááááááááááááátablσá i≤á SYMLEN+▓ byte≤á iεá length«á Thσ ì
- ááááááááááááááááááfollowinτáá character≤á arσá lega∞á iεáá ß ì
- áááááááááááááááááásymbol:
-
- A-Z a-z ! & . : ? [ \ ] ^ _ `
- { | } ~ 0-9
-
- Notσá tha⌠á symbol≤ ma∙ no⌠ begiε witΦ 0-╣á a≤ ì
- ááááááááááááááááááthi≤ woulΣ makσ theφ impossiblσ t∩ distinguisΦ ì
- ááááááááááááááááááfroφ Inte∞ forma⌠ numbers.
-
- ┴á specia∞á symbo∞ ñ i≤ alway≤ equa∞á t∩á thσ ì
- ááááááááááááááááááaddres≤ oµ thσ firs⌠ bytσ oµ codσ generateΣ b∙ ì
- ááááááááááááááááááß giveε line.
-
- 1.2.3 Numeric Constants
-
- Number≤á begiεá witΦá 0-9,%«á Ñá leadinτá basσ ì
- áááááááááááááááááádesignato≥á represen⌠á binary«á Iµá thσá numbe≥ ì
- áááááááááááááááááábegin≤ witΦ 0-9¼ thσ assemble≥ look≤ fo≥ onσ ì
- ááááááááááááááááááoµ thσ trailinτ basσ designator≤ B¼ O¼ Q¼ D¼ ì
- ááááááááááááááááááo≥á H«á Iµ thσ numbe≥ doe≤ no⌠ enΣ witΦ onσ oµ ì
- ááááááááááááááááááthese¼ i⌠ i≤ assumeΣ t∩ bσ decimal« ┬ i≤ thσ ì
- áááááááááááááááááábasσ designato≥ fo≥ binary¼á ╧ anΣ ╤ arσ fo≥ ì
- ááááááááááááááááááoctal¼á ─á i≤á fo≥ decimal¼á anΣ ╚á i≤á fo≥ ì
- ááááááááááááááááááhexidecimal« Trailinτ basσ designator≤ anΣ thσ ì
- ááááááááááááááááááhe° digit≤ A-╞ caε bσ iε eithe≥ uppe≥ o≥ lowe≥ ì
- áááááááááááááááááácase«á Notσá tha⌠á he° number≤á tha⌠á star⌠ ì
- ááááááááááááááááááwitΦá A-╞á anΣá arσá specifieΣá witΦá thσ ì
- áááááááááááááááááádesignato≥á ╚ mus⌠ havσ ß leadinτ zer∩á addeΣ ì
- áááááááááááááááááát∩ kee≡ theφ froφ beinτ mistakeε fo≥á symbols« ì
- ááááááááááááááááááFo≥ example:
-
- 0ff80h evaluate to ff80 hex.
- 128 and 128d evaluate to 80 hex.
- 35o, and 35q evaluate to 1d hex.
- %0111000 and 0111000b evaluate to 39 hex.
-
- ┴á characte≥á constan⌠ i≤ ß strinτ composeΣá oµ ì
- áááááááááááááááááázero¼á one¼ o≥ tw∩ ASCI╔ characters¼ delimiteΣ ì
- ááááááááááááááááááb∙á eithe≥ singlσ o≥ doublσ quote≤ (ºá o≥á ")« ì
- ááááááááááááááááááNotσá tha⌠á singlσ quote≤ onl∙á balancσá singlσ ì
- ááááááááááááááááááquotes¼ anΣ doublσ quote≤ onl∙ balancσ doublσ ì
- ááááááááááááááááááquotes«á Thu≤á ß characte≥ constan⌠ oµ 2▓á he° ì
- áááááááááááááááááácaε bσ specifieΣ b∙ '"'« Fo≥ example:
-
- "ab" evaluates to 6162 hex.
- "" evaluates to 0000 hex.
- "'" evaluates to 0027 hex.
- 'A' evaluates to 0041 hex.
-
- è
-
-
-
-
-
-
-
- TMS9900/99105 Cross-assembler Rev. 1.0 Page 4
-
-
-
- Notσáá tha⌠á iεá thσá two-characte≥áá characte≥ ì
- ááááááááááááááááááconstant¼á thσ left-hanΣ characte≥ wil∞ appea≥ ì
- ááááááááááááááááááiεá thσá upper-orde≥ bytσ anΣá thσá right-hanΣ ì
- áááááááááááááááááácharacte≥ wil∞ appea≥ iε thσ lower-orde≥ byte.
-
- 1.2.4 Strings
-
- String≤á arσá formeΣ iε thσ samσ wa∙á a≤ ì
- áááááááááááááááááácharacte≥ constant≤ excep⌠ tha⌠ the∙ ma∙ bσ oµ ì
- ááááááááááááááááááan∙ lengtΦ u≡ t∩ anΣ includinτ 25╡ characters« ì
- ááááááááááááááááááThσá firs⌠á characte≥á wil∞ bσá placeΣá iεá thσ ì
- áááááááááááááááááálowest-orde≥áá memor∙áá byte«ááá ┴áá line-feeΣ ì
- áááááááááááááááááácharacte≥ ma∙ no⌠ bσ embeddeΣ iε ß strinτ ì
- ááááááááááááááááááa≤á i⌠ terminate≤ thσ linσ anΣ wil∞á yielΣá ß ì
- ááááááááááááááááááquotσá imbalancσ error«á Notσ tha⌠ string≤ ì
- ááááááááááááááááááarσ onl∙ valiΣ iε thσ arguemen⌠ fielΣ oµ aε ì
- áááááááááááááááááá"TEXTó pseudo-op.
-
- 1.3 Expression Evaluation
-
- Thσá followinτá operator≤á arσá alloweΣáá iε ì
- ááááááááááááááááááexpressions« Thσ operator≤ arσ listeΣ iε orde≥ ì
- ááááááááááááááááááoµ precedence.
-
- Unary Plus, Unary Minus
-
- *, /, MOD, SHL, SHR
-
- +, -
-
- >, >=, <, <=, <>, =
- (These can also be written as
- GT, GE, LT, LE, NE, EQ.)
-
- NOT (1's complement)
-
- AND (Bitwise logical AND)
-
- OR, XOR (Bitwise logical OR and Exclusive
- áááááááááááááááááá OR)
-
- HIGH, LOW
- ááááááááááááááááááParenthese≤á arσá useΣ t∩ changσ thσá orde≥á oµ ì
- ááááááááááááááááááprecedence«ááá Durinτááá evaluatioεáá oµáá aε ì
- ááááááááááááááááááexpression¼á a≤á sooε a≤ ß ne≈á operato≥á i≤ ì
- ááááááááááááááááááencountereΣá tha⌠ ha≤ precedencσ les≤ thaεá o≥ ì
- ááááááááááááááááááequa∞á t∩á thσ las⌠ operato≥á encountered¼ ì
- ááááááááááááááááááal∞á operation≤á u≡á t∩ thσá ne≈á operato≥á arσ ì
- ááááááááááááááááááperformed«ááá Tha⌠ááá is¼ááá subexpression≤ ì
- ááááááááááááááááááinvolvinτá operator≤ oµá highe≥á precedencσ ì
- ááááááááááááááááááarσ computeΣ first.
-
- Al∞ operator≤ excep⌠ +¼á -¼ *¼ /¼ =¼ <>¼ >=¼ ì
- áááááááááááááááááá<=¼ >¼ ╝ mus⌠ bσ separateΣ froφ thei≥ operand≤ ì
- ááááááááááááááááááb∙ a⌠ leas⌠ onσ spacσ o≥ tab.
-
- Thσ "HIG╚ mumbleó i≤ equivalen⌠ t∩ "mumblσ SH╥ ì
- áááááááááááááááááá8óá anΣ "LO╫ mumbleó i≤ equivalen⌠ t∩á "mumblσ ìè
-
-
-
-
-
-
-
- TMS9900/99105 Cross-assembler Rev. 1.0 Page 5
-
-
- ááááááááááááááááááAN─ 0ffH".
-
- Thσ relationa∞ operator≤ (=¼á >¼ etc.⌐ evaluatσ ì
- áááááááááááááááááát∩ 0ffffΦ iµ thσ relationshi≡ i≤ true¼á ░ iµ i⌠ ì
- áááááááááááááááááái≤ false.
-
- Expression≤ááá arσáá terminateΣáá b∙áá commas¼ ì
- áááááááááááááááááásemicolons¼ o≥ CR/L╞ pairs.
-
- 1.4 990 Family Instructions
-
- Thσááá instruction≤ááá oµááá thσááá 9900/9910╡ ì
- áááááááááááááááááámicroprocesso≥á fal∞ int∩ severa∞ catagories« ì
- ááááááááááááááááááEacΦ require≤ ß certaiε se⌠ oµ argument≤á anΣ ì
- áááááááááááááááááádisallow≤á othe≥ arguments«á Argument≤ ma∙á bσ ì
- ááááááááááááááááááspecifieΣá iεá an∙ orde≥ anΣ arσá separateΣá b∙ ì
- áááááááááááááááááácomma≤ááá Blank≤áá ma∙áá bσáá useΣáá freel∙ ì
- ááááááááááááááááááthroughou⌠á thσ argumen⌠ fielΣ (excep⌠á withiε ì
- áááááááááááááááááásymbol≤á o≥ operator≤ sucΦ a≤ NOT⌐ t∩á enhancσ ì
- ááááááááááááááááááthσ readabilit∙ oµ thσ sourcσ code«
- The basic syntax is as follows:
-
- [label] LI R1,expression ;The expression
- áááááááááááááááááá ;is evaluated
- ;from left to
- áááááááááááááááááá ;right.
-
- Thσá typσá oµá addressinτ eacΦá instructioεá i≤ ì
- ááááááááááááááááááalloweΣá alonτ witΦ thσ numbe≥ oµ operand≤á thσ ì
- ááááááááááááááááááassemble≥á expect≤ thσ instructioε t∩ have¼á i≤ ì
- áááááááááááááááááácarrieΣ iε thσ ATTRI┬ bytσ whicΦ i≤ returneΣ b∙ ì
- ááááááááááááááááááthσá GETOP├á function«áá Thσá ATTRI┬á bytσá i≤ ì
- áááááááááááááááááái≤á madσá u≡á oµ tw∩ ┤ bi⌠á nibble≤á thσá leas⌠ ì
- áááááááááááááááááásignifica⌠á describinτ operanΣ ▒ anΣá thσá mos⌠ ì
- áááááááááááááááááásignifican⌠á describinτá operanΣá 2«á (Seσá thσ ì
- ááááááááááááááááááheadinτ comment≤ oµ GETOP├ whicΦ i≤ par⌠ oµ thσ ì
- ááááááááááááááááááfilσ A99TBLS.CSM)« Thσ ATTRI┬ bytσ wil∞ als∩ ì
- áááááááááááááááááátel∞á thσá assemble≥ whicΦ onσ oµ thσá ╖á basiπ ì
- ááááááááááááááááááinstructioεá format≤ ß particularσá instructioε ì
- ááááááááááááááááááfall≤ into«á The≤ formats/group≤ arσ discusseΣ ì
- ááááááááááááááááááiε thσ followinτ sections.
-
- áááááááá1.4.1áááááAddressing Modes
-
- ááááááááááááááááááThσá 9900/9910╡ instructioε se⌠ allow≤ ╡á basiπ ì
- ááááááááááááááááááaddressinτá modes«á These are:
-
- áááááááááááááááááá Mode Example
- áááááááááááááááááá ---- -------
-
- áááááááááááááááááá Workspace register MOV R1,R3
- áááááááááááááááááá Workspace register indirect A *R1,R2
- áááááááááááááááááá Symbolic CLR @expr
- áááááááááááááááááá IndexeΣ A @expr(R1),R2
- áááááááááááááá Workspacσ registe≥ indirec⌠ DEC *R7+
- áááááááááááááááááá (aut∩ increment)
-
- Thesσ mode≤ wil∞ iε genera∞ bσ writteε iεá thσ ì
- áááááááááááááááááá form:è
-
-
-
-
-
-
-
- TMS9900/99105 Cross-assembler Rev. 1.0 Page 6
-
-
-
- áááááááááááááááááá R, *R, *R+, @X, @X(R)
-
- ááááááááááááááááááwherσá Rá refer≤á t∩á ß Registe≥ anΣá ╪á t∩á aε ì
- ááááááááááááááááááaddress.
-
-
- 1.4.2 Instruction Formats
-
- ááááááááááááááááááThσá assemble≥ wil∞ properl∙ evaluatσá ╖á basiπ ì
- ááááááááááááááááááinstrucion formats; these are:
-
- áááááááááááááááááá Format 0 - No operands at all (N)
- áááááááááááááááááá Format 1 - R,*R,*R+,@X,@X(R)
- áááááááááááááááááá Format 2 - Displacement (Disp)
- áááááááááááááááááá Forma⌠á│ - Destinatioε Field only (D)
- áááááááááááááááááá Format 4 - Signed Displacement (SD)
- áááááááááááááááááá Format 5 - Workspace Register (W or C)
- áááááááááááááááááá Format 6 - Immediate Operands (IOP)
- Forma⌠á╖ - Bi⌠ Manipulatioε Instrucions
- (TMS99105 only)
-
- ááááááááááááááááááDependinτá oε thσ instructioε thesσ format≤ ma∙ ì
- ááááááááááááááááááliσá withiεá eithe≥ thσ sourcσá o≥á destinatioε ì
- ááááááááááááááááááfields.
- 1.4.3 Group 1 Instructions
-
- This group contains the following opcodes:
-
- NOP
- áááááááááááááááááá RSET IDLE CKOF CKON LREX
- áááááááááááááááááá RTWP
-
- Thesσá opcode≤ permi⌠ n∩ arguments¼á anΣá hencσ ì
- ááááááááááááááááááare of format 0.
-
- 1.4.4 Group 2 Instructions
- áááááááááááááááááá
- ááááááááááááááááááThi≤ grou≡ oµ instruction≤ arσ oµ Forma⌠ typσ ▒ ì
- ááááááááááááááááááanΣ arσ Dua∞ OperanΣ Instruction≤ witΦ Multiplσ ì
- ááááááááááááááááááAddressinτá Mode≤á fo≥ Sourcσá anΣá Destinatioε ì
- ááááááááááááááááááOperand.
-
- ááááááááááááááááááThis group contains the following opcodes:
-
- áááááááááááááááááá ┴á A┬ ├ C┬ ╙ S┬ SO├ SOC┬
- áááááááááááááááááá SZ├á SZC┬á MO╓ MOVB
- áááááááááááááááááá
- ááááááááááááááááááInstruction format: [opcode|format1|format1]
-
- ááááááááááááááááááExample: A *R1+,R2
-
- 1.4.5 Group 3 Instructions
-
- Thi≤á grou≡á oµ instruction≤ arσá Dua∞á OperanΣ ì
- ááááááááááááááááááInstruction≤ witΦ Multiplσ Addressinτ Mode≤ fo≥ ì
- ááááááááááááááááááthσá Sourcσá OperanΣá anΣá Workspacσáá Registe≥ ì
- ááááááááááááááááááAddressifnτ fo≥ thσ Destination.
- è
-
-
-
-
-
-
-
- TMS9900/99105 Cross-assembler Rev. 1.0 Page 7
-
-
- ááááááááááááááááááThis group contains the following opcodes:
- áááááááááááááááááá
- áááááááááááááááááá COC CZC XOR MPY DIV XOP LDCR STCR
-
- ááááááááááááááááááInstruction format: [opcode|format3|format1]
-
- Example: XOP @LABEL,3
-
- áááááááá1.4.6áááááGroup 4 Instructions
-
- ááááááááááááááááááThi≤áá grou≡á oµá instruction≤á allo≈á Multiplσ ì
- ááááááááááááááááááAddressinτá mode≤ fo≥ thσ sourcσá Operand¼á anΣ ì
- ááááááááááááááááááthus a single operand instructions.
-
- ááááááááááááááááááThi≤á followinτá instruction≤á belonτá t∩á thi≤ ì
- áááááááááááááááááágroup:
-
- áááááááááááááááááá ┬ B╠ BLW╨ CL╥ SET╧ IN╓ NE╟ AB╙ SWPB
- áááááááááááááááá á INC INCT DEC DECT X
- áááááááááááááááááá BIND(a TMS99105 instruction)
-
- ááááááááááááááááááInstruction format: [opcode|format1]
-
- Example: INC @LABEL(R3)
-
- áááááááá1.4.7 Group 5 Instructions
-
- ááááááááááááááááááThi≤á grou≡ oµ instruction≤ arσ CR╒á Single-Bi⌠ ì
- ááááááááááááááááááInstructions.
-
- ááááááááááááááááááThσá followinτá instruction≤á belonτá t∩áá thi≤ ì
- áááááááááááááááááágroup: áááááááááááááááááá
-
- áááááááááááááááááá SBO SBZ TB
-
- ááááááááááááááááááInstruction format: [opcode|format4]
-
- Example: SBO 25
-
-
- 1.4.8áááááGroup 6 Instructions
-
- Thi≤áá grou≡áá cover≤á thσáá Conditiona∞áá Jum≡ ì
- ááááááááááááááááááinstrucions«ááá Notσááá tha⌠ááá thσááá maximuφ ì
- áááááááááááááááááádisplacemen⌠ range is +127 to -128 words.
-
- ááááááááááááááááááThσáá followinτá instruction≤á belonτá t∩á thi≤ ì
- áááááááááááááááááágroup:
- áááááááááááááááááá
- áááááááááááááááááá JEQ JGT JH JHE JL JLE JLT JMP JNC JNE
- áááááááááááááááááá JNO JOC JOP
-
- ááááááááááááááááááInstruction format: [opcode|format2]
-
- Example: JEQ LABEL
-
-
- áááááááá1.4.9áááááGroup 7 Instructions
- è
-
-
-
-
-
-
-
- TMS9900/99105 Cross-assembler Rev. 1.0 Page 8
-
-
- ááááááááááááááááááThi≤á grou≡á havσ aε Immediatσá Sourcσá OperanΣ ì
- ááááááááááááááááááwitΦá aε Workspacσ Registe≥ a≤ thσá Destinatioε ì
- ááááááááááááááááááOperand.
-
- ááááááááááááááááááThσáá followinτá instruction≤á belonτá t∩á thi≤ ì
- áááááááááááááááááágroup:
-
- áááááááááááááááááá AI ANDI CI LI ORI
- áááááááááááááááááá BLSK (a TMS99105 instruction)
-
- ááááááááááááááááááInstruction format: [opcode|format5]
- áááááááááááááááááá [ format6 ]
-
- ááááááááááááááááááExample: AI R3,128
-
-
- áááááááá1.4.10ááááGroup 8 Instructions
-
- ááááááááááááááááááThi≤á grou≡á cover≤ thσ Interna∞ Registe≥á LoaΣ ì
- ááááááááááááááááááImmediatσá Instruction≤ anΣ havσá aεá Immediatσ ì
- ááááááááááááááááááSourcσ OperanΣ only.
-
- ááááááááááááááááááThσá followinτá instruction≤á belonτá t∩áá thi≤ ì
- áááááááááááááááááágroup:
- áááááááááááááááááá
- áááááááááááááááááá LWPI LIMI
-
- ááááááááááááááááááInstruction format: [ opcode ]
- áááááááááááááááááá [ format6 ]
-
- ááááááááááááááááááExample: LIMI 3
-
-
- áááááááá1.4.11ááááGroup 9 Instructions
-
- ááááááááááááááááááThi≤á grou≡ cover≤ thσ Interna∞ Registe≥á Storσ ì
- ááááááááááááááááááInstruction≤á anΣá havσá Destinatioεá Workspacσ ì
- ááááááááááááááááááRegister Addressing only.
-
- ááááááááááááááááááThσáá followinτá instruction≤á belonτá t∩á thi≤ ì
- áááááááááááááááááágroup:
-
- áááááááááááááááááá STST STWP
- áááááááááááááááááá LS╘á LW╨ ( TMS9910╡ instructions )
-
- ááááááááááááááááááInstruction format: [opcode|format5]
- áááááááááááááááááá
- ááááááááááááááááááExample: STST R3
-
- 1.4.12 Group 10 (TMS99105 only)
-
- Thi≤ grou≡ cover≤ thσ Bit-Manipulatioε instruc-ì
- áááááááááááááááááátion≤ peculia≥ t∩ thσ TMS99105« Thi≤ grou≡ ha≤ ì
- ááááááááááááááááááßá differen⌠ instructioε forma⌠ thaε thσá basiπ ì
- áááááááááááááááááá990░á se⌠á insofa≥ a≤ thσ forma⌠ field≤ liσá iε ì
- ááááááááááááááááááthσ 2nΣ word«á Thσ instruction≤ iε thi≤á grou≡ ì
- ááááááááááááááááááare:
- áááááááááááááááááá TMB TCMB TSMC
- è
-
-
-
-
-
-
-
- TMS9900/99105 Cross-assembler Rev. 1.0 Page 9
-
-
- ááááááááááááááááááInstruction format: [ opcode ]
- áááááááááááááááááá [ format3|format1]
- áááááááááááááááááá
- ááááááááááááááááááExample: TMB @BITMAP(R3),8
-
- 1.5 Pseudo-operations
- 1.5.1 END
-
- Wheεá thi≤ statemen⌠ i≤á encountered¼á thσ ì
- ááááááááááááááááááassemble≥á decide≤á tha⌠á thσá enΣá oµáá thσ ì
- áááááááááááááááááásourcσá filσ ha≤ beeε reached«á Iµá thi≤ ì
- áááááááááááááááááástatemen⌠á i≤ missinτ o≥ iε ßá conditiona∞ ì
- ááááááááááááááááááassembl∙ blocδ tha⌠ i≤ no⌠ beinτ assembled¼ thσ ì
- ááááááááááááááááááassemble≥á wil∞á encounte≥ end-of-filσá oεá thσ ì
- áááááááááááááááááásourcσá file«á Iε thi≤ case¼á thσá assemble≥ ì
- ááááááááááááááááááwil∞á attacΦ aε EN─ statemen⌠ anΣ wil∞ flaτ aε ì
- ááááááááááááááááááerror« Thσ synta° i≤ a≤ follows:
-
- [label] END
-
- Iµ an∙ I╞ statemen⌠ i≤ no⌠ closeΣ witΦ aε END╔ ì
- ááááááááááááááááááa⌠ thi≤ point, an error will be flagged.
-
- This statement permits no arguments.
-
- 1.5.2 EQU
-
- ááááááááááááááááááThi≤á statemen⌠ i≤ useΣ t∩ assigεá ßá permenan⌠ ì
- áááááááááááááááááávaluσá t∩á ß symbol«á Thi≤ valuσ ma∙á no⌠á bσ ì
- áááááááááááááááááásubsequentl∙ changeΣ b∙ ß SET¼ anothe≥ EQU¼ o≥ ì
- ááááááááááááááááááb∙á writinτ thσ symbo∞ iε columε ▒ a≤ ßá label« ì
- ááááááááááááááááááThσ synta° i≤ a≤ follows:
-
- label EQU expression
-
- ┴á phasinτ (P⌐ erro≥ wil∞ resul⌠ iµá an∙ ì
- ááááááááááááááááááforwarΣá reference≤á arσ encountereΣá iεá thσ ì
- ááááááááááááááááááevaluatioε oµ thσ expression.
-
- 1.5.3 BYTE
-
- Thi≤á statemen⌠á i≤á useΣá t∩á placσá byte≤á iε ì
- áááááááááááááááááámemory«áá EacΦáá bytσáá i≤á defineΣá b∙áá aε ì
- ááááááááááááááááááexpression«á Multiplσ byte≤ caε bσ defineΣ b∙ ì
- ááááááááááááááááááexpression≤á separateΣá b∙á commas«áá Iµá aε ì
- ááááááááááááááááááexpressioε evaluate≤ t∩ ß quantit∙ outsidσ thσ ì
- áááááááááááááááááárangσ -12╕ t∩ 255¼ aε erro≥ i≤ flagged« Thσ ì
- áááááááááááááááááásynta° i≤ a≤ follows:
-
- [label] BYTE [expr1][,epxr2].....
-
- 1.5.4 TEXT
-
- Thi≤á statemen⌠á i≤ useΣ t∩á placσá string≤á iε ì
- áááááááááááááááááámemory«á It≤á argument≤á ma∙ onl∙ bσá strings« ì
- ááááááááááááááááááMultiplσ string≤ ma∙ bσ placeΣ iε memor∙á iµ ì
- ááááááááááááááááááthσá string≤ arσ separateΣ b∙á commas«á Thσ ì
- áááááááááááááááááásynta° i≤ a≤ follows:
- è
-
-
-
-
-
-
-
- TMS9900/99105 Cross-assembler Rev. 1.0 Page 10
-
-
- [label] TEXT [string][,string].....
-
-
- 1.5.5 WORD
-
- Thi≤á statemen⌠á i≤á useΣá t∩á placσá word≤á iε ì
- áááááááááááááááááámemory«áá EacΦáá worΣáá i≤á defineΣá b∙áá aε ì
- ááááááááááááááááááexpression«á Multiplσ word≤ ma∙ bσ defineΣ b∙ ì
- ááááááááááááááááááexpression≤ separateΣ b∙ commas«á Word≤á arσ ì
- ááááááááááááááááááplaceΣá iε memor∙ witΦ thei≥ high-orde≥ bytσ iε ì
- ááááááááááááááááááthσ low-orde≥ memor∙ locatioε anΣ thσ low-orde≥ ì
- áááááááááááááááááábytσá iε thσ high-orde≥ memor∙á location«á Thσ ì
- áááááááááááááááááásynta° i≤ a≤ follows:
-
- [label] WORD [expr1][,expr2].....
-
- 1.5.6 BSS (Block Starting with Symbol)
-
- Thi≤á statemen⌠ i≤ useΣ t∩ reservσ ßá blocδá oµ ì
- áááááááááááááááááámemor∙áá fo≥á workinτá storage¼áá etc«áá I⌠ ì
- áááááááááááááááááárequire≤ onσ argumen⌠ tha⌠ give≤ thσ numbe≥á oµ ì
- áááááááááááááááááábyte≤á oµ storagσ t∩ reserve«á Thσ synta° i≤ ì
- ááááááááááááááááááa≤ follows:
-
- [label] BSS expression
-
- áááááááá1.5.7áááááEVEN
-
- ááááááááááááááááááThi≤á statemen⌠ i≤ useΣ t∩ forcσ thσ assemble≥ ì
- áááááááááááááááááát∩á aligε codσ oε aε eveε worΣ boundar∙ iµá thσ ì
- áááááááááááááááááápresen⌠á programmσá counte≥á i≤á odd«á Iµá thσ ì
- ááááááááááááááááááprogrammσ counte≥ i≤ odΣ ß zer∩ bytσ i≤á outpu⌠ ì
- ááááááááááááááááááiµáá eveεá thσá statemen⌠á i≤áá ignored«áá Thσ ì
- ááááááááááááááááááassemble≥ wil∞ als∩ flaτ aε erro≥ i≤ aε attemp⌠ ì
- áááááááááááááááááái≤ madσ t∩ outpu⌠ codσ t∩ aε odΣ address«á Thσ ì
- áááááááááááááááááásyntax is as follows:
-
- áááááááááááááááááá[label] EVEN
-
- 1.5.8 DXOP
-
- Thi≤ statemen⌠ allow≤ thσ programme≥ t∩á definσ ì
- ááááááááááááááááááthei≥áá owεáá macr∩á instruction≤á arounΣáá thσ ì
- ááááááááááááááááááExtendeΣá Operatioεá Instructioεá (XOP)«áá Thσ ì
- ááááááááááááááááááassemblσá wil∞á substitutσ thσ XO╨ codσá fo≥á ß ì
- áááááááááááááááááágiveε instructioε iε placσ oµ thσ namσ assigneΣ ì
- ááááááááááááááááááto the XOP. The syntax is as follows:
-
- áááááááááááááááááá DXOP PUSH,3 ;assign the name PUSH to
- áááááááááááááááááá ;XOP number 3
- áááááááááááááááááá
- ááááááááááááááááááFo≥á examplσ iµ PUS╚ i≤ ß previousl∙ codeΣá XO╨ ì
- ááááááááááááááááááwhicΦá pushe≤á register≤á ont∩ thσá stacδá theε ì
- ááááááááááááááááááinsteaΣá oµ codinτ thi≤ XO╨ instructioε a≤á XO╨ ì
- ááááááááááááááááááR3,│á yo⌡ caε codσ PUS╚ R│ - thi≤ wil∞á producσ ì
- ááááááááááááááááááthσá samσ codσ a≤ XO╨ R3,│ bu⌠ wil∞á generall∙ ì
- áááááááááááááááááámakσá thσá programmσ fa≥ morσ eas∙á t∩á follow« ì
- ááááááááááááááááááThσ 99░ CPU'≤ allo≈ u≡ t∩ 1╡ XOP's.
- áááááááááááááááááá è
-
-
-
-
-
-
-
- TMS9900/99105 Cross-assembler Rev. 1.0 Page 11
-
-
- áááááááááááááááááá
- 1.5.9 Conditional Assembly
-
- ááááááááááááááááááBlock≤áá oµá codσá caεá bσá assembleΣá o≥áá no⌠ ì
- ááááááááááááááááááassembleΣáá baseΣá oεá thσá valuσáá oµáá somσ ì
- ááááááááááááááááááexpression« Thσ basiπ synta° i≤ as follows:
-
- IF expression
-
- (lines of code)
-
- ENDI
-
- Iµá thσá expressioε evaluate≤ t∩ 0¼á thσá codσ ì
- ááááááááááááááááááwil∞ no⌠ bσ assembled«á Thσ sourcσ line≤ wil∞ ì
- áááááááááááááááááábσá transfereΣá t∩ thσá listing¼á bu⌠á n∩á he° ì
- ááááááááááááááááááoutpu⌠ wil∞ bσ generated«á I⌠ i≤ recommendeΣ ì
- áááááááááááááááááátha⌠á ßá valuσá oµ $fffµ bσ useΣ fo≥á ßá truσ ì
- áááááááááááááááááávaluσ sincσ i⌠ turn≤ int∩ ß falsσ valuσá unde≥ ì
- áááááááááááááááááábitwisσ inversion.
-
- Iεáá addition¼áá thσá ELS┼á directivσá i≤ ì
- áááááááááááááááááásupporteΣ a≤ follows:
-
- IF expression
-
- (lines of code)
-
- ELSE
-
- (more lines of code)
-
- ENDI
-
- This is equivalent to:
-
- IF expression
-
- (lines of code)
-
- ENDI
- IF NOT expression
-
- (more lines of code)
-
- ENDI
-
- Notσá tha⌠á label≤ arσá no⌠á permitteΣá oε ì
- ááááááááááááááááááconditiona∞á assembl∙ directives«á Als∩á notσ ì
- áááááááááááááááááátha⌠áá aεá EN─á statemen⌠á caεá fai∞á t∩á bσ ì
- áááááááááááááááááárecognizeΣ iµ i⌠ i≤ iε ß conditiona∞ assembl∙ ì
- ááááááááááááááááááblocδ witΦ ß falsσ expression.
-
- ┴ phasinτ (P⌐ erro≥ wil∞ bσ flaggeΣ iµá therσ ì
- ááááááááááááááááááarσ an∙ forward references in the expression.
-
- 1.5.10 AORG
-
- Thi≤á statemen⌠á i≤ useΣ t∩ loaΣ ßá valuσ ìè
-
-
-
-
-
-
-
- TMS9900/99105 Cross-assembler Rev. 1.0 Page 12
-
-
- ááááááááááááááááááint∩ thσ assembl∙ prograφ counter« Thσ valuσ ì
- áááááááááááááááááái≤á obtaineΣ froφ thσ expression«á Iµá thσ ì
- ááááááááááááááááááexpressioεá contain≤á forwarΣá references¼áá ß ì
- ááááááááááááááááááphasinτá (P⌐ erro≥ wil∞ result«á Iµ ß labe∞á i≤ ì
- áááááááááááááááááápresent¼á i⌠á wil∞ bσ EQUeΣ t∩ thσ ne≈á prograφ ì
- áááááááááááááááááácounte≥ value. The syntax is:
-
- [label] AORG expression
-
- 1.5.11 SET
-
- Thi≤á statemen⌠ i≤ useΣ t∩ assigεá ßá temporar∙ ì
- áááááááááááááááááávaluσá t∩á ß symbol«á Thσ symbo∞ ma∙ no⌠á bσ ì
- ááááááááááááááááááredefineΣ b∙ aε EQ╒ o≥ b∙ writinτ i⌠ iε columε ì
- áááááááááááááááááá▒á a≤ ß label¼á bu⌠ i⌠ ma∙ bσá redefineΣá b∙ ì
- ááááááááááááááááááanothe≥á SE╘á statement«á Thσ valuσá fo≥á thσ ì
- áááááááááááááááááásymbo∞ i≤ obtaineΣ froφ thσ expression«á Iµ i⌠ ì
- áááááááááááááááááácontain≤á forwarΣ references¼á ß phasinτá (P⌐ ì
- ááááááááááááááááááerro≥ wil∞ result«
- The syntax is:
-
- label SET expression
-
- 1.6 Error Messages
-
- Erro≥á message≤á arσ flaggeΣ witΦá ßá singlσ ì
- áááááááááááááááááálette≥á iε columε ▒ oµ thσ offendinτ linσ iε ì
- ááááááááááááááááááthσá listing«á Thσá meaninτ oµá eacΦá lette≥ ì
- ááááááááááááááááááfollows.
-
- A Presently not implemented.
-
- B Distancσ oε ß brancΦá instructioε ì
- áááááááááááááááááááááááááááái≤áá to∩áá great«áá Usσáá ßáá jum≡ ì
- ááááááááááááááááááááááááááááinstructioεá witΦ ß brancΦ arounΣ it¼ ì
- ááááááááááááááááááááááááááááo≥ rearrangσ you≥ codσ t∩ shorteε thσ ì
- áááááááááááááááááááááááááááádistance.
-
- D Digi⌠á to∩á largσ fo≥á thσá basσá wa≤ ì
- ááááááááááááááááááááááááááááencountered«á Iε particular¼á watcΦ ì
- ááááááááááááááááááááááááááááfo≥ ╕ o≥ ╣ iε aε octa∞ numbe≥ anΣ a-ì
- ááááááááááááááááááááááááááááµ iε ß decima∞ number.
-
- E Expressioε ill-formed« Looδ fo≥ noε ì
- ááááááááááááááááááááááááááááarithmetiπáá character≤á iεáá indexeΣ ì
- ááááááááááááááááááááááááááááaddressing modes.
-
- I Iµ stacδ imbalance«á Looδ fo≥ ELS┼ ì
- ááááááááááááááááááááááááááááo≥á END╔á withou⌠á aε I╞ o≥á aεá I╞ ì
- áááááááááááááááááááááááááááástil∞ opeε a⌠ thσ enΣ of the file.
-
- L InvaliΣ label«á Labe∞ ma∙ contaiε ì
- ááááááááááááááááááááááááááááinvaliΣ character≤ o≥ bσ equa∞ t∩ ß ì
- ááááááááááááááááááááááááááááreserveΣ worΣ likσ NOT«á Labe∞ ma∙ ì
- áááááááááááááááááááááááááááábσ presen⌠ oε ß conditiona∞ assembl∙ ì
- áááááááááááááááááááááááááááádirective.
-
- M Labe∞áá multipl∙áá defined«áá Labe∞ ì
- áááááááááááááááááááááááááááádefineΣáá morσá thaεá oncσá anΣáá al∞ ìè
-
-
-
-
-
-
-
- TMS9900/99105 Cross-assembler Rev. 1.0 Page 13
-
-
- áááááááááááááááááááááááááááádefinitions are not SET statements.
-
- O InvaliΣáá opcode«ááá Looδáá fo≥ ì
- áááááááááááááááááááááááááááámisspellings¼á missinτ semicolons¼ o≥ ì
- ááááááááááááááááááááááááááááopcode≤ iε columε 1.
-
- P Phasinτ error« Looδ fo≥ expression≤ ì
- ááááááááááááááááááááááááááááiεáá ORG¼ááá EQU¼áá SET¼áá o≥áá I╞ ì
- áááááááááááááááááááááááááááádirective≤áá tha⌠á contaiεá forwarΣ ì
- ááááááááááááááááááááááááááááreferences« Iµ nonσ exist¼ somethinτ ì
- ááááááááááááááááááááááááááááwierΣ i≤ goinτ oε a≤ ß labe∞ tha⌠ wa≤ ì
- áááááááááááááááááááááááááááádefineΣáá iεá pas≤áá ▒áá mysteriousl∙ ì
- áááááááááááááááááááááááááááávanisheΣ iε pas≤ 2.
-
- áááááááááááááááááá R Registe≥ valuσ to∩ large«á Register≤ ì
- áááááááááááááááááááááááááááávalue≤á betweeεá ░á anΣ 1╡á onl∙á arσ ì
- ááááááááááááááááááááááááááááallowed« Thi≤ erro≥ wil∞ mos⌠ likel∙ ì
- ááááááááááááááááááááááááááááoccu≥á iµ ß registe≥ valuσá i≤á beinτ ì
- ááááááááááááááááááááááááááááevaluateΣá froφá aε expressioεá whicΦ ì
- ááááááááááááááááááááááááááááoverflows.
-
- áááááááááááááááááááááááS Synta°á error«á Checδá you≥á synta° ì
- ááááááááááááááááááááááááááááagains⌠ m∙ samples.
-
- T To∩áá man∙á argument≤á oεáá thi≤ ì
- ááááááááááááááááááááááááááááline«áá WOR─á directive≤á ma∙á onl∙ ì
- áááááááááááááááááááááááááááádefinσá 12╖ words¼á whilσ TEX╘ anΣ ì
- ááááááááááááááááááááááááááááBYT┼ directive≤ ma∙ onl∙ definσá 25╡ ì
- áááááááááááááááááááááááááááábytes«áá Oεá othe≥á statements¼ ì
- ááááááááááááááááááááááááááááyo⌡á pu⌠á superfluou≤ argument≤á oε ì
- ááááááááááááááááááááááááááááthσ line.
-
- U UndefineΣá symbo∞áá encountereΣ ì
- áááááááááááááááááááááááááááádurinτ expression evaluation.
-
- V Valuσááá ou⌠áá oµáá bounds«ááá Iε ì
- ááááááááááááááááááááááááááááparticular¼á FC┬ expression≤ anΣ 8-ì
- áááááááááááááááááááááááááááábi⌠á immediatσ value≤ mus⌠á evaluatσ ì
- áááááááááááááááááááááááááááát∩ -12╕ t∩ 255¼á whilσ inde°á value≤ ì
- áááááááááááááááááááááááááááámus⌠ evaluatσ t∩ ░ t∩ 255.
-
- * Thi≤á statemen⌠á generateΣá b∙á thσ ì
- ááááááááááááááááááááááááááááassembler«á Righ⌠á now¼á thi≤ onl∙ ì
- ááááááááááááááááááááááááááááhappen≤áá iµáá yo⌡áá dro≡áá aεááá EN─ ì
- áááááááááááááááááááááááááááástatemen⌠ááá o≥ááá removσááá i⌠ ì
- ááááááááááááááááááááááááááááthrougΦ conditional assembly.
-
- " Quotσá imbalancσá error«á Bea≥á iε ì
- ááááááááááááááááááááááááááááminΣá tha⌠á º wil∞ no⌠á terminatσá ß ì
- áááááááááááááááááááááááááááástrinτá starteΣá witΦ óá anΣá vice-ì
- ááááááááááááááááááááááááááááversa.
-
- ( Parenthesi≤á imbalancσ error«á Coun⌠ ì
- ááááááááááááááááááááááááááááthem!
-
- 1.7 Assembler Abort Conditions
-
- Unde≥ certaiε circumstances¼á thi≤á assemble≥ ì
- ááááááááááááááááááwil∞á jus⌠ givσ u≡ anΣ qui⌠ iε thσ middlσ oµ aε ìè
-
-
-
-
-
-
-
- TMS9900/99105 Cross-assembler Rev. 1.0 Page 14
-
-
- ááááááááááááááááááassembly«á Iµ yo⌡ don'⌠ ge⌠ thσ erro≥á coun⌠ ì
- áááááááááááááááááádiagnostiπ oε thσ console¼ reaΣ you≥ screeε ì
- ááááááááááááááááááfo≥ sureí Thσ followinτ message≤ occur:
-
- 1) Can't open source.
-
- Thσá sourcσ filσ doe≤ no⌠ exis⌠ ì
- ááááááááááááááááááááááááááááoε thσ specified disk drive.
-
- 2) Can't open list.
- Can't open hex.
-
- N∩á director∙á entrie≤ lef⌠á oεá thσ ì
- áááááááááááááááááááááááááááádisδ drivσ in question.
-
- 3) Illegal command line.
-
- Bone up on command lines.
-
- 4) No file info supplied.
-
- Bone up on command lines.
-
- 5) If stack overflow.
-
- I╞á directive≤ ma∙ onl∙á bσá nesteΣ ì
- áááááááááááááááááááááááááááá1╢á deep«áá RebuilΣá you≥á sourcσ ì
- áááááááááááááááááááááááááááácodσ t∩ reducσ you≥ nestinτ depth¼ ì
- ááááááááááááááááááááááááááááo≥á changσá thσ "#definσ IFDEPT╚á 16ó ì
- áááááááááááááááááááááááááááástatemen⌠ iε xasm99.gb∞ anΣ recompilσ ì
- ááááááááááááááááááááááááááááthσ assembler.
-
- 6) Disk read error.
-
- Sourcσá filσá ha≤ ßá baΣá CR├á o≥ ì
- áááááááááááááááááááááááááááásomσ othe≥ difficulty.
-
- 7) Disk write error.
-
- Ou⌠ oµ disδ o≥ director∙ spacσ oε thσ ì
- áááááááááááááááááááááááááááális⌠ o≥ hex file.
-
- 8) Error closing file.
-
- Probleφáá closinτá lis⌠á o≥áá he° ì
- ááááááááááááááááááááááááááááfile« Yo⌡ shouldn't get this one.
-
- 9) Symbol Table Overflow.
-
- You≥á sourcσ prograφ define≤ to∩ man∙ ì
- áááááááááááááááááááááááááááásymbols«á Thσ curren⌠ limi⌠ i≤ 500« ì
- ááááááááááááááááááááááááááááIµá yo⌡ havσ morσ memor∙ thaεá ╔á do¼ ì
- ááááááááááááááááááááááááááááyo⌡á caε changσ thσ "#definσá SYMBOL╙ ì
- áááááááááááááááááááááááááááá500ó linσ iε a99.gb∞ anΣá recompilσ ì
- ááááááááááááááááááááááááááááthσá assembler«á Otherwise¼á yo⌡ ì
- áááááááááááááááááááááááááááámus⌠ worδ oε you≥ sourcσ code.
-
- 1.8 Compiling the Assembler
- è
-
-
-
-
-
-
-
- TMS9900/99105 Cross-assembler Rev. 1.0 Page 15
-
-
- T∩á compilσ thσ assemble≥ a≤ i⌠á stands¼á yo⌡ ì
- ááááááááááááááááááwil∞ neeΣ the following items:
-
- 1) 40K of RAM.
-
- 2) The BDS C Compiler Version 1.5
- áááááááááááááááááá (good box, Leor!!).
-
- 3) Digita∞áá Research'≤áá AS═áá o≥áá MA├ ì
- ááááááááááááááááááááááááááááassembler«á (Note║á Onl∙á needeΣ iµ ì
- ááááááááááááááááááááááááááááyo⌡ wan⌠ t∩ pla∙ witΦ thσ function≤ ì
- ááááááááááááááááááááááááááááiεá a99tbls.maπ a≤ the∙ exis⌠ iεá ß ì
- ááááááááááááááááááááááááááááforφá digestiblσá b∙á CLIN╦á iεá thσ ì
- ááááááááááááááááááááááááááááfilσ xasm99.crl.)
-
- T∩ ge⌠ a99tbls.cr∞ u≡ froφ scratch¼á yo⌡ ì
- áááááááááááááááááád∩á thσá following«á ╔á assumσá al∞á file≤ ì
- ááááááááááááááááááincludinτ AS═ o≥ MA├ livσ oε drivσ A.
-
- A>casm a99tbls ;source a99tbls.csm
-
- This should yield a file a99tbls.asm on drive A.
-
- A>maπá a99tbl≤ $p· -≤ ;ma∙ usσ asφ fn.aa· ì
-
- A>cloaΣá a99tbl≤ ;producσ CR╠ filσ ì
-
- You should now have a99tbls.crl on drive A.
-
- áNo≈á yo⌡á arσ read∙ t∩ compilσ thσ res⌠ oµá thσ ì
- áááááááááááááááááábeast.
-
- A>cc a99
- A>cc a99asmlnc
- A>cc a99evalc
- A>cc a99getc
- A>cc a99putc
- A>cc a99symbc
-
- Now you can link it all together.
-
- A>clink a99 -s
-
- *a99asmln
- *a99eval
- *a99get
- *a99put
- *a99symb
- *a99tbls
-
- And, as if by magic, you've got a99.com!
-
- Notσá tha⌠á thσ linkagσ caε al∞ bσ donσ oεá onσ ì
- ááááááááááááááááááline¼á bu⌠ m∙ pape≥ isn'⌠ widσ enougΦ herσá t∩ ì
- áááááááááááááááááád∩á i⌠á tha⌠ way«á Notσ tha⌠ iµ yo⌡ havσá morσ ì
- ááááááááááááááááááthaε 40╦ oµ RAM¼á yo⌡ ma∙ wan⌠ t∩á increasσ ì
- ááááááááááááááááááyou≥ symbo∞ tablσ size«á Symbol≤ arσ 1░ byte≤ ì
- ááááááááááááááááááeach¼ s∩ plaε accordingly.
- è
-
-
-
-
-
-
-
- TMS9900/99105 Cross-assembler Rev. 1.0 Page 16
-
-
-
- 1.9 Final Comments
- Happ∙á assemblingíá Iµ yo⌡ havσ question≤ o≥ ì
- áááááááááááááááááánotσá an∙ bugs¼á I'Σ appreciatσ ßá shou⌠ ì
- ááááááááááááááááááa⌠á (617)258-1204¼á (617)266-317╣ o≥ oεá thσ ì
- ááááááááááááááááááBostoε CBB╙ a⌠ (617)963-8310«á Thσ question≤ ì
- ááááááááááááááááááwil∞á poin⌠ u≡ weaknesse≤ iε thσá manual¼á anΣ ì
- ááááááááááááááááááthσ bug≤ neeΣ t∩ bσ stampeΣ upoε unmercifully.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- è
-
-
-
-
-
-
-
- TMS9900/99105 Cross-assembler Rev. 1.0 Page 17
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-