Home

TASM11 USER`S MANUAL - The Engineers Collaborative, Inc.

image

Contents

1. UR This is a comment line This is another form of comment line The following show the syntax of pseudo ops whose source lines do not show up in the listing file Use as shown without comment char to start the line INCLUDE A MYFILE ASM include MYFILE ASM TITLE Title text specify the page header title SBTTL Subtitle text specify the page header subtitle PGLEN64 print 64 lines per page NOLIST turn listing off LIST turn listing on OPT NOLIST another to turn listing off PAGE force a page break Equate examples memory_size EQU 64 1024 1 EXPRESSION EXAMPLE ram_memory equ 0 start of ram memory rom_memory equ e000 start of rom memory eeprom memory equ 5600 start of eeprom memory irq vectors equ SffcO WORD EQU 1122H 16 BIT CONSTANT BYTE EQU 3 8 BIT CONSTANT MASK EQU c3 REGISTERS EQU 1000 PORTA EQU REGISTERS RESERVED EQU REGISTERS 1 PIOC EQU REGISTERS 2 PORTC EQU REGISTERS 3 PORTB EQU REGISTERS 4 PORTCL EQU REGISTERS 5 RESERVED2 EQU REGISTERS 6 DDRC EQU REGISTERS 7 PORTD EQU REGISTERS 8 DDRD EQU REGISTERS 9 PORTE EQU REGISTERS 10 CFORC EQU REGISTERS 11 FFA TECE The Engineers Collaborative Inc Page 29 TASM11 USER S MANUAL 00C 00D 00 OOF QOO O0 t 0 0 O0 0 OUO 00 Q U p Q N O EAR TECE The Engineers Collaborative Inc OC1M OC1D TCNT TCNT1 TICI 1 TIC2 TI
2. N N aw E NN D 4o 00 1 Oy 4S I9 O1 iS C0 I9 B OO 44 TASM11 USER S MANUAL TOC33 101B TOC4 101 Toc44 101D 5 101 55 101 TWO 0002 WORD 1122 128 0080 eeprom memory B600 irq vectors FFCO memory size FFFF ram memory 0000 rom memory E000 Aq Engineers Collaborative Inc Page 45
3. 5 29 5 30 TERS 31 TERS 32 TERS 33 TERS 34 TERS 35 TERS 36 5 37 5 38 5 39 TERS 40 TERS 4 TERS 4 TERS 4 TERS 4 TERS 4 TERS 4 TERS 4 TERS 4 5 49 5 50 5 51 5 52 5 53 TERS 54 5 55 5 56 5 57 5 58 5 59 5 60 5 61 TERS 62 TERS 63 1 QO N P Page 31 5 11 USER S MANUAL The Engineers Collaborative Inc 68 11 Cross Assembler V1 0 APPENDIX TASM11 REFERENCE MANUAL TASM11 SOURCE FILE SYNTAX OPCODES amp ADDRESSING MODE EXAMPLES expression examples 0001 ONE EQU 3 2 this is a comment 0001 ONF_1 EQU 3 2 another comment 0001 One EQU 1 0 still another comment 0001 One_1 EQU 10 15 still another comment 0006 Six EQU 3 2 multiply 0007 SEVEN EQU Six 1 add 000A TEN EQU 20 2 divide 0002 TWO EQU 8 3 remainder after division 0080 128 EQU amp 80 bitwise AND 0005 FIVE EQU 4 1 bitwise OR 0007 SEVEN_1 EQU 5 2 bitwise XOR 0006 Complex equ ONE ONE_1 Six TWO 6 expressions are evaluated left to right E000 ORG rom_memory ORIGINATE AT ADDRESS 0 2 EXAMPLES OF STORAGE DEFINITION PSEUDO OPS E000 00 DB 0 define byte example E001 0000 DW 0 define word example E003 DS 2 define storage example reserves 2 bytes E005 RMB 10 reserve 10 memory bytes EOOF 00010203 FCB 05 152 3 form constant bytes E013 00000001 FDB 03 5 24 23 form double bytes 00020003 1 48656C6C FCC Hello
4. 26 50 27 701122 NEG WORD EXTENDED E32A 6000 NEG 0 INDEXED BY X E32C 186000 NEG 0 INDEXED BY Y E32F 6003 BYTE X INDEXED BY X E331 186003 NEG BYTE Y INDEXED BY Y EAR TECE The Engineers Collaborative Inc Page 39 TASM11 USER S MANUAL The Engineers Collaborative Inc 68 11 Cross Assembler V1 0 APPENDIX A TASM11 REFERENCE MANUAL TASM11 SOURCE FILE SYNTAX OPCODES amp ADDRESSING MODE EXAMPLES E334 01 NOP NO OPERATION OR ACCUM A E335 8A03 ORAA BYTE IMMEDIATE E337 9A03 ORAA BYTE DIRECT E339 1122 ORAA WORD EXTENDED E33C 00 ORAA 0 X INDEXED BY X E33E 18AA00 ORAA 0 Y INDEXED BY Y E341 AAO3 ORAA BYTE X INDEXED BY X E343 18AA03 ORAA BYTE Y INDEXED BY Y OR ACCUM B E346 CA03 ORAB BYTE IMMEDIATE E348 DAO3 ORAB BYTE DIRECT FA1122 ORAB WORD EXTENDED E34D 00 ORAB 0 X INDEXED BY X E34F 18EA00 ORAB 0 Y INDEXED BY Y E352 ORAB BYTE X INDEXED BY X E354 18 03 ORAB BYTE Y INDEXED BY Y E357 36 PSHA PUSH A ONTO STACK E358 37 PSHB PUSH B ONTO STACK E359 3C PSHX PUSH X ONTO STACK E35A 183C PSHY PUSH Y ONTO STACK E35C 32 PULA PULL A FROM STACK E35D 33 PULB PULL B FROM STACK E35E 38 PULX PULL X FROM STACK E35F 1838 PULY PULL Y FROM STACK ROTATE LEFT E361 49 ROLA 62 59 ROLB B E363 791122 ROL WORD EXTENDED E366 6900 ROL 0 X INDEXED BY X E368 186900 ROL 0 INDEXED BY Y E36B 6903 ROL B
5. 2 sets origin to current value of pc 2 Note that either or may be used to specify current program counter value memsize EQU 2 1024 memsize 2048 ORG memsize 8 sets origin to 2040 END argument The END pseudo op is an optional statement that can be included as the last statement of the primary source file INCLUDE files must not have an END statement If used the value of the argument becomes the start address specified by the end record of the object code file The argument must be a numeric or symbolic constant with value between 0H and OFFFFH Examples END 80H start EQU 80H END start 6 3 Symbolic Constants symbol EQU argument The EQU pseudo op assigns the value of the argument to the symbol name The argument must be a numeric constant or an expression Once defined by EQU the symbolic name may be used throughout the source file in place of its value Once a symbol has been assigned a value by the EQU pseudo op the same symbol can not be assigned another value elsewhere in the source file Symbolic constants are constants TECE The Engineers Collaborative Inc Page 16 TASM11 USER S MANUAL Examples PORTA EQU 1000 memsize EQU 2 1024 Idx PORTA bset 0 x 01 ORG memsize 10 6 4 Include Pseudo OP This pseudo op causes the specified file to be processed as if its source code statements were present in the main source file at the location of the INCLUDE pseudo op Included fil
6. 4 C403 ANDB BYTE IMMEDIATE 0 6 D403 ANDB BYTE DIRECT EOE8 F41122 ANDB WORD EXTENDED EOEB E400 ANDB 0 X INDEXED BY X EOED 18E400 ANDB 0 Y INDEXED BY Y EOFO E403 ANDB BYTE X INDEXED BY X EOF2 185403 ANDB BYTE Y INDEXED BY Y ARITHMETIC SHIFT LEFT EOFS 48 ASLA INHERENT EOF6 58 ASLB 7B INHERENT EOF7 05 ASLD INHERENT EOF8 781122 ASL WORD EXTENDED EOFB 6800 ASL 0 INDEXED BY X EOFD 186800 ASL 0 Y INDEXED BY Y E100 6803 ASL BYTE X INDEXED BY X E102 186803 ASL BYTE Y INDEXED BY Y ARITHMETIC SHIFT RIGHT E105 47 ASRA INHERENT E106 57 ASRB 7B INHERENT E107 771122 ASR WORD EXTENDED 10 6700 ASR 0 INDEXED BY X E10C 186700 ASR 0 Y INDEXED BY Y E10F 6703 ASR BYTE X INDEXED BY X E111 186703 ASR BYTE INDEXED BY Y E114 24FE BCC BRANCH IF CARRY CLEAR CLEAR 5 E116 1503C3 BCLR BYTE MASK DIRECT E119 1D00C3 BCLR 0 X MASK INDEXED BY X 11 181D00C3 BCLR 0 Y MASK INDEXED BY Y E120 1D03C3 BCLR BYTE X MASK INDEXED BY X E123 181D03C3 BCLR BYTE Y MASK INDEXED BY Y E127 25FE BCS BRANCH IF CARRY SET E129 27FE BEQ BRANCH IF ZERO E12B 2CFE BGE BRANCH IF ZERO E12D 2EFE BGT BRANCH IF ZERO E12F 22FE BHI IF HIGHER E131 24FE BHS IF HIGHER OR SAME Aq Engineers Collaborative Inc Page 34 5 11 USER S MANUAL The Engineers Collaborative Inc 68HC11 Cross Assembler V1 0 APPENDIX TAS
7. INDEXED BY X E1D7 18E100 CMPB 0 Y INDEXED BY Y E1DA E103 CMPB BYTE X INDEXED BY X E1DC 18E103 CMPB BYTE Y INDEXED BY Y COMPLIMENT E1DF 43 COMA 7A 1 0 53 COMB LB 1 1 731122 COM WORD EXTENDED 1 4 6300 COM 0 INDEXED BY X 1 6 186300 COM 0 Y INDEXED BY Y 1 9 6303 INDEXED BY X E1EB 186303 COM BYTE Y INDEXED BY Y COMPARE D TO MEMORY 1 1A831122 CPD WORD IMMEDIATE E1F2 1A9303 CPD BYTE DIRECT E1F5 1AB31122 CPD WORD EXTENDED E1F9 1AA300 CPD 0 INDEXED BY X E1FC CDA300 CPD LY INDEXED BY Y ElFF 1AA303 CPD BYTE X INDEXED BY X E202 CDA303 CPD BYTE Y INDEXED BY Y EAR TECE The Engineers Collaborative Inc Page 36 5 11 USER S MANUAL The Engineers Collaborative Inc 68HC11 Cross Assembler V1 0 APPENDIX A TASM11 REFERENCE MANUAL TASM11 SOURCE FILE SYNTAX OPCODES amp ADDRESSING MODE EXAMPLES COMPARE X TO MEMORY E205 8C1122 CPX fWORD IMMEDIATE E208 9 03 CPX BYTE DIRECT E20A BC1122 CPX WORD EXTENDED E20D ACOO CPX 0 INDEXED BY X E20F CDAC00 CPX 0 Y INDEXED BY Y E212 AC03 CPX BYTE X INDEXED BY X E214 CDACO3 CPX BYTE Y INDEXED BY Y COMPARE Y TO MEMORY E217 188C1122 WORD IMMEDIATE E21B 189C03 CPY BYTE DIRECT 21 18BC1122 WORD EXTENDED E222 1AACOO CPY 0 INDEXED BY X E225 18 00 CPY 0 Y INDEXED BY Y E228 1AACOS3 CPY BYTE X INDEXED BY X E22B 18AC03 CPY BYTE Y INDEXED BY Y E22E 19
8. 1 A703 STAA BYTE X INDEXED BY X E3B3 18A703 STAA BYTE Y INDEXED BY Y STORE ACCUM B E3B6 D703 STAB BYTE DIRECT E3B8 F71122 STAB WORD EXTENDED E3BB E700 STAB 0 X INDEXED BY X E3BD 18 700 STAB 0 Y INDEXED BY Y E703 STAB BYTE X INDEXED BY X 2 18 703 STAB BYTE Y INDEXED BY Y STORE ACCUM D E3C5 DD03 STD BYTE DIRECT E3C7 FD1122 STD WORD EXTENDED E3CA EDOO STD 0 INDEXED BY X E3CC 18 00 STD 0 Y INDEXED BY Y E3CF EDO3 STD BYTE X INDEXED BY X E3D1 18ED03 STD BYTE Y INDEXED BY Y E3D4 CF STOP STOP INTERNAL CLOCKS STORE STACK POINTER E3D5 9F03 STS BYTE DIRECT E3D7 BF1122 STS WORD EXTENDED E3DA AF00 STS 0 INDEXED BY X E3DC 18 00 STS 0 INDEXED BY Y E3DF AF03 STS BYTE X INDEXED BY X 1 18AF03 STS BYTE Y INDEXED BY Y FFA The Engineers Collaborative Inc Page 41 5 11 USER S MANUAL 68HC11 Cross Assembler V1 0 The Engineers Collaborative APPENDIX A TASM11 REFERENCE MANUAL TASM11 SOURCE FILE SYNTAX OPCODES amp ADDRESSING MODE EXAMPLES E3E4 6 9 E3F0 E3F3 E3F6 E3FA E3FD E400 E403 E406 E408 E40A E40D E40F E412 E414 E417 E419 E41B E41E E420 E423 E425 E428 E42B E42D E430 E432 E435 E437 E43B E43C E43D E43E EAR TECE The Engineers Collaborative Inc DF03 FF1122 EFOO CDEF00 EF03 CDEFO03 18DF03 18FF1122 lAEFO00 18EF00 lAEF03 18EF03 8003 9003 B01122 A
9. 9 2 Motorola S Record Object File Format 28 9 3 Intel HEX Object Pile aaa eee feared ace EE ay Sua 29 Appendix A Instruction Mnemonics opcodes and addressing modes 30 1 0 INTRODUCTION Aq The Engineers Collaborative Inc Page 4 TASM11 USER S MANUAL TASMII is 68HC11 cross assembler program It is designed to run on the IBM family of personal computers under the PC DOS disk operating system Version 2 1 or higher It also runs on true IBM compatible personal computers TASM11 takes its input from a PC DOS text file and creates as output an object code file in either Intel HEX or Motorola S record format and a listing file in PC DOS text format When invoking TASMI1 a number of option switches may be used to control the output generated A variety of pseudo operation codes may be included in the source code text file to control the format of the output generated This manual is intended as a reference document for the experienced 68HC11 assembly language programmer It is assumed that the user is familiar with the 68HC11 instruction set and chip architure Less experienced users should become familiar with the information contained in the following publicationsavailable from Motorola Semiconductor Products Inc 3501 Ed Bluestein Blvd Austin Texas 78721 MOTOROLA SINGLE CHIP MICROCOMPUTER DATA DLI32RI MC68HC11A8 PROGRAMMING REFERENCE GUID
10. ADCB BYTE X INDEXED BY X 09 18E903 ADCB BYTE Y INDEXED BY Y ADD MEMORY TO A EO9F 8B03 ADDA BYTE IMMEDIATE 1 9B03 ADDA BYTE DIRECT BB1122 ADDA WORD EXTENDED 0 6 ABOO ADDA 0 INDEXED BY X 0 8 18 00 ADDA 0 Y INDEXED BY Y ABO3 ADDA BYTE X INDEXED BY X EOAD 18AB03 ADDA BYTE Y INDEXED BY Y ADD MEMORY TO B EOBO CB03 ADDB BYTE IMMEDIATE 2 DBO3 ADDB BYTE DIRECT 0 4 1122 ADDB WORD EXTENDED EOB7 EBOO ADDB 0 INDEXED BY X 0 9 18 00 ADDB 0 Y INDEXED BY Y EOBC EBO3 ADDB BYTE X INDEXED BY X 18 03 ADDB BYTE INDEXED BY Y ADD 16 BIT TO D 0 1 31122 ADDD WORD IMMEDIATE 0 4 D303 ADDD BYTE DIRECT 0 6 F31122 ADDD WORD EXTENDED 0 9 E300 ADDD 0 INDEXED BY X 18E300 ADDD 0 Y INDEXED BY Y E303 ADDD BYTE X INDEXED BY X EODO 185303 ADDD BYTE INDEXED BY Y EAR TECE The Engineers Collaborative Inc Page 33 TASM11 USER S MANUAL The Engineers Collaborative Inc 68 11 Cross Assembler V1 0 APPENDIX TASM11 REFERENCE MANUAL TASM11 SOURCE FILE SYNTAX OPCODES amp ADDRESSING MODE EXAMPLES AND A WITH MEMORY EOD3 8403 ANDA BYTE IMMEDIATE EOD5 9403 ANDA BYTE DIRECT EOD7 B41122 ANDA WORD EXTENDED EODA A400 ANDA 0 X INDEXED BY X EODC 18A400 ANDA 0 Y INDEXED BY Y EODF A403 ANDA BYTE X INDEXED BY X 1 18A403 ANDA BYTE Y INDEXED BY Y AND B WITH MEMORY 0
11. before the generated code can be trusted When no errors are found TASM11 prints the message Assembly complete errors 0 warnings 0 on the video screen and includes this message at the end of the listing file When errors are detected a message is displayed on the video screen and an error message 15 included in the listing file on the line above the line in which the error was detected Error messages sent to the video screen include a description of the error the line number of the line in error and the name of the file that contains the line in error Only one error is detected per line Before the program ends it prints a message that indicates how many lines contained errors TASM11 is two pass assembler Pass 1 must be completed without errors before pass 2 is started Errors detected on pass are displayed on the video screen only since the output files are generated on pass 2 If no errors are detected during pass 1 TASM11 prints the message Starting Pass 2 on the video screen 7 1 Fatal Errors Fatal errors are errors serious enough that the assembler can not continue to assemble the source statements When a fatal error is detected TASM11 prints the error message on the video screen then exits to DOS Fatal error messages and causes are listed below Fatal error Error can t open This message is displayed when the main source file typed when invoking TASMI1 can not be opened The file name may
12. have been typed incorrectly or the file may not reside on the currently logged drive or the specified drive FATAL ERROR couldn t open include file fname This message is displayed when an include file can t be opened The file name may have been typed incorrectly in the main source file or the file may not reside on the currently logged drive or the specified drive TECE The Engineers Collaborative Inc Page 20 5 11 USER S MANUAL Fatal error Error source file name must follow program name This message is displayed when the operator fails to type the name of the source code file after TASM11 when invoking the assembler Fatal error error writing listing file check disk space Fatal ERROR writing to disk check disk space Fatal error Can t open output listing file check disk space Fatal error Can t open output object code file check disk space These errors may occur part of the way through an assembly if all of the available disk space on the currently logged drive is used To correct this error more space will have to be made available on the currently logged drive Fatal error No mem for fwd refs Fatal error No space for fwd refs These errors may occur if your machine does not have enough available memory to store the required information for the forward references in the source file being assembled To correct the problem the number of forward references in the sour
13. used to prevent certain sections of the source file from appearing in the listing file All lines of the source file after the NOLIST statement in encountered will not appear in the listing file unless a LIST pseudo op is encountered LIST The LIST pseudo op is used to resume the listing of source file lines in the listing file after listing has been stopped with the NOLIST pseudo op 6 6 OPT PSEUDO OP The option OPT pseudo op is included for compatibility with other assemblers Generally the same functions can be performed with other TECE The Engineers Collaborative Inc Page 18 5 11 USER S MANUAL pseudo ops The syntax of the OPT pseudo op is as follows OPT option where the option is any of the following LIST same as the LIST pseudo op or L NOLIST same as the NOLIST pseudo op or NOL CYCLES does nothing in TASM11 or C NOCYCLES does nothing in TASM11 or NOC CONTCYCLES does nothing in TASMII Or CONTC Examples OPT LIST OPT NOLIST 6 7 NULL PSEUDO OPS Null pseudo ops are included in TASM11 for compatibility with other assemblers TASMI1 recognizes them so that errors will not be generated but the program performs no functions when thay are encountered The NULL PSEUDO OPS are NAME NAM SPC CYCLES NOCYCLES CONTCYCLES EAR TECE The Engineers Collaborative Inc Page 19 TASM11 USER S MANUAL 7 0 ERROR MESSAGES Source files must assemble with no errors
14. 000 18A000 A003 18A003 C003 D003 F01122 E000 18E000 E003 18E003 831122 9303 B31122 A300 18A300 A303 18A303 3F 16 06 17 07 STX STX STX STX STX STX STY STY STY STY STY STY SUBA SUBA SUBA SUBA SUBA SUBA SUBA SUBB SUBB SUBB SUBB SUBB SUBB SUBB SUBD SUBD SUBD SUBD SUBD SUBD SUBD SWI TAB TAP TBA TPA BYTE WORD 0 X 0 WORD 0 X 0 WORD 0 X 0 Y BYTE X BYTE BYTE BYTE WORD 0 X 0 WORD BYTE WORD 0 X 0 STORE X DIRECT EXTENDED INDEXED BY INDEXED BY INDEXED BY INDEXED BY KKM KX STORE Y DIRECT EXTENDED NDEXED BY NDEXED BY NDEXED BY NDEXED BY lt x lt lt x lt SUBTRACT MEMORY FROM A MMEDIATE DIRECT EXTENDED NDEXED BY X NDEXED BY Y NDEXED BY X NDEXED BY Y SUBTRACT MEMORY FROM B MMEDIATE DIRECT EXTENDED NDEXED BY X NDEXED BY Y NDEXED BY X NDEXED BY Y SUBTRACT MEMORY FROM D MMEDIATE DIRECT EXTENDED NDEXED BY X NDEXED BY Y NDEXED BY X NDEXED BY Y SOFTWARE INTERRUPT TRANSFER A TO B TRANSFER A TO CC REGISTER TRANSFER B TO A TRANSFER CC REGISTER TO A Page 42 5 11 USER S MANUAL The Engineers Collaborative Inc 68 11 Cross Assembler V1 0 APPENDIX TASM11 REFERENCE MANUAL TASM11 SOU
15. 16 bits on the IBM PC Constants are constructed as follows i followed by an ASCII character followed by hexadecimal constant followed by an octal constant followed by a binary constant digits decimal constant Refer to the listing in appendix a for examples of correct expression syntax 6 0 TASM11 PSEUDO OPERATIONS 6 1 Storage Definition Pseudo Ops DEFINE BYTES DB Argument or Symbol DB Argument The define bytes pseudo op is used to initialize memory locations to the value of the argument It can also be used to associate a symbolic name to the memory location The argument must be either a numeric constant or a character string constant Numeric constants must be a value between 0H and OFFH Examples DB FF DB 0B3H DB 255 DB How now brown cow symbol DB How now brown cow EAR TECE The Engineers Collaborative Inc Page 11 TASM11 USER S MANUAL DEFINE WORD DW Argument or Symbol DW Argument The define word pseudo op is used to initialize two consecutive memory locations to the value of the argument It can also be used to associate a symbolic name to the first of 2 memory locations The argument must be a numeric constant with value between 0H and OFFFFH Examples DW 0 DW 257 DW OFC49H symbol DW DEFINE STORAGE DS Argument or Symbol DS Argument The define storage pseudo op is used to reserve the number of consecutive memory locations specified by the argument It can al
16. C22 TIG TIC33 1 11 TOC2 TOC22 TOC3 TOC33 TOC4 TERS 12 TERS 13 TERS 14 TERS 15 TERS 16 TERS 17 TERS 18 5 19 5 20 TERS 21 TERS 22 TERS 23 TERS 24 5 25 5 26 5 27 5 28 Page 30 5 11 USER S MANUAL Inc 68HC11 Cross Assembler V1 0 REG REG REG REG REG REG REG REG REG REG REG REG REG REG REG REG REG REG REG REG REG REG REG REG REG REG REG REG REG REG REG REG REG REG The Engineers Collaborative APPENDIX A TASM11 REFERENCE MANUAL 01D TOC44 01 TOC5 O1F TOC55 020 TCTL 021 TCTL2 022 TMSK 023 TFLG 024 TMSK2 025 TFLG2 026 PACTL 027 PACNT 028 SPCR 029 SPSR 02A SPDR 02B BAUD 02C SCCR1 02D SCCR2 02 SCSR 02F SCDR 030 ADCTL 031 ADR1 032 ADR2 033 ADR3 034 ADR4 035 RESERVED3 036 RESERVED4 037 RESERVED5 038 RESERVED6 039 OPTION COPRST 03B PPROG 03C HPRIO 03D INIT 03E TESTI 03F CONFIG EAR TECE The Engineers Collaborative Inc Cr CC C CC GC C CC GG REG 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 TASM11 SOURCE FILE SYNTAX OPCODES amp ADDRESSING MODE EXAMPLES
17. DAA DECIMAL ADJUST A DECREMENT E22F 4A DECA PA E230 5A DECB B E231 7A1122 DEC WORD EXTENDED E234 6A00 DEC 0 INDEXED BY X E236 186A00 DEC 0 INDEXED BY Y E239 6A03 DEC INDEXED BY X E23B 186A03 DEC BYTE Y INDEXED BY Y E23E 34 DES DECREMENT STACK POINTER E23F 09 DEX DECREMENT X E240 1809 DEY DECREMENT Y XOR A WITH MEMORY E242 8803 EORA BYTE IMMEDIATE E244 9803 EORA BYTE DIRECT E246 B81122 EORA WORD EXTENDED E249 A800 EORA 0 X INDEXED BY X E24B 18A800 EORA 0 INDEXED BY Y E24E A803 EORA BYTE X INDEXED BY X E250 18A803 EORA BYTE Y INDEXED BY Y XOR B WITH MEMORY E253 C803 EORB BYTE IMMEDIATE E255 D803 EORB BYTE DIRECT E257 F81122 EORB WORD EXTENDED E25A E800 EORB 0 X INDEXED BY X 25 18 800 EORB 0 INDEXED BY Y E25F E803 EORB BYTE X INDEXED BY X E261 18E803 EORB BYTE Y INDEXED BY Y E264 03 FDIV FRACTIONAL DIVIDE 16 BY 16 E265 02 IDIV INTEGER DIVIDE 16 BY 16 EAR TECE The Engineers Collaborative Inc Page 37 5 11 USER S MANUAL The Engineers Collaborative Inc 68HC11 Cross Assembler V1 0 APPENDIX A TASM11 REFERENCE MANUAL TASM11 SOURCE FILE SYNTAX OPCODES amp ADDRESSING MODE EXAMPLES INCREMENT E266 4C INCA PA E267 5C INCB 7B E268 7 1122 INC WORD EXTENDED E26B 6 00 INC 0 INDEXED BY X E26D 186C00 INC 0 INDEXED BY Y E270 6 03 INC BYTE X INDEXED BY X E272 186C03 INC BYTE Y INDEXED BY Y E275 31 INS INCREMENT STAC
18. DW START timer input capture 1 FFFO E079 DW START real time interrupt FFF2 E079 DW START external pin or parallel I O FFF4 E079 DW START pin FFF6 E079 DW START SWI FFF8 E079 DW START illegal opcode trap FFFA E079 DW START COP failure reset FFFC E079 DW START COP clock monitor fail FFFE E079 DW START E079 END START Assembly complete Errors 0 Warnings 0 Aq Engineers Collaborative Inc Page 43 TASM11 USER S MANUAL Symbol Table ADCTL ADR1 ADR2 ADR3 ADR4 BAUD BYTE CFORC CONFIG COPRST Complex DDRC DDRD FIVE HPRIO INIT MASK MESSAGE OC1D 1 One 1 PACNT PACTL PIOC PORTA PORTB PORTC PORTC PORTD PORTE PPROG REGISTERS RESERVED RESERVED2 RESERVED3 RESERVED4 RESERVED5 RESERVED6 SCCR1 SCCR2 SCDR SCSR SEVEN SEVEN 1 SPCR SPDR SPSR START Six TCNT TCNT TCTL TCTL2 TEN TEST TFLG TFLG2 TiC TIC TIC2 22 TIC3 TIC33 TMSK1 TMSK2 TOC1 11 2 TOC22 TOC3 L EAR TECE The Engineers Collaborative Inc 1030 1031 1032 1033 1034 102B 0003 100 10 10 0006 L007 L009 0005 103 1030 00C3 E053 LOOD LOOC 0001 0001 1039 0001 0001 1027 1026 1002 1000 1004 1003 005 1008 LOOA 103 1000 1001 1006 1035 1036 1037 1038 102 02D LO2F LO2E 0007 0007 1028 102 1029 079 0006 100 LOOF 1020 1021 000A
19. E MC68HC11A8RG AD 2 0 GETTING STARTED Before using the TASM11 program for the first time the user should take the time to 1 make one or more copies of the distribution diskette 2 make one or more bootable working copy diskettes and 3 READ THE MANUAL 2 1 The Distribution Diskette The Engineers Collaborative Inc TASM11 Cross Assembler Program is supplied on a 3 1 2 inch double sided double density floppy diskette The file supplied on this diskette is as follows TASMII EXE This file contains the 68HC11 cross assembler program 2 2 Backing up the distribution diskette FFA TECE The Engineers Collaborative Inc Page 5 5 11 USER S MANUAL Use the DOS DISKCOPY command to make at least one backup copy of thedistribution diskette When this is done one of the backup copies should be used to create working copy diskettes as described below At least one backup copy and the original distribution diskette should then be stored in a safe place for use the inevitable day when disaster strikes 2 3 Creating Working Copy Diskettes Use the DOS FORMAT command with the s option to format the number of working copy diskettes that you wish to create The s option copies the files required to make the working copy diskette a bootable or system diskette Use the DOS COPY command to copy all of the files supplied on the distribution diskette to the working copy diskettes Use the DOS COPY command to copy the DOS fi
20. ERENCE MANUAL TASM11 SOURCE FILE SYNTAX OPCODES amp ADDRESSING MODE EXAMPLES LOAD STACK POINTER E2C9 8E1122 LDS WORD IMMEDIATE E2CC 9 03 LDS BYTE DIRECT E2CE BE1122 LDS WORD EXTENDED E2D1 00 LDS 0 X INDEXED BY X E2D3 18AE00 LDS 0 Y INDEXED BY Y E2D6 AF03 LDS BYTE X INDEXED BY X E2D8 18AE03 LDS BYTE Y INDEXED BY Y LOAD X E2DB CE1122 LDX WORD IMMEDIATE E2DE DEO3 LDX BYTE DIRECT 2 0 FE1122 LDX WORD EXTENDED 2 00 LDX 0 INDEXED BY X E2E5 CDEEOO LDX 0 INDEXED BY Y E2E8 LDX BYTE X INDEXED BY X E2EA CDFE03 LDX BYTE Y INDEXED BY Y LOAD Y E2ED 18CE1122 LDY WORD IMMEDIATE E2F1 18DE03 LDY BYTE DIRECT E2F4 18FE1122 LDY WORD EXTENDED E2F8 1 00 LDY 0 INDEXED BY X E2FB 18EE00 LDY 0 Y INDEXED BY Y E2FE 1AEE03 LDY BYTE X INDEXED BY X E30 8bEE03 LDY BYTE Y INDEXED BY Y LOGICAL SHIFT LEFT E304 48 LSLA E305 58 LSLB 06 05 LSLD PD E307 781122 LSL WORD EXTENDED E30A 6800 LSL 0 X INDEXED BY X E30C 186800 LSL 0 Y INDEXED BY Y E30F 6803 LSL BYTE X INDEXED BY X E311 186803 LSL INDEXED BY Y LOGICAL SHIFT RIGHT E314 44 LSRA A E315 54 LSRB B E316 04 LSRD PD E317 741122 LSR WORD EXTENDED E31A 6400 LSR 0 INDEXED BY X E31C 186400 GSR 0 INDEXED BY Y E31F 6403 LSR BYTE X INDEXED BY X E321 186403 LSR BYTE Y INDEXED BY Y E324 3D MUL MULTIPLY 8 X 8 NEGATE 2 S COMPLIMENT E325 40 NEGA
21. K POINTER E276 08 INX INCREMENT X E277 1808 INY INCREMENT Y JUMP E279 7E1122 JMP WORD EXTENDED E27C 6E00 JMP 0 INDEXED BY X E27E 186E00 JMP 0 INDEXED BY Y E281 6E03 JMP BYTE X INDEXED BY X E283 186E03 JMP BYTE Y INDEXED BY Y JUMP TO SUBROUTINE E286 9D03 JSR BYTE DIRECT E288 BD1122 JSR WORD EXTENDED E28B ADOO JSR 0 INDEXED BY X E28D 18 00 JSR 0 INDEXED BY Y E290 ADO3 JSR BYTE X INDEXED BY X E292 18AD03 JSR INDEXED BY Y LOAD ACCUM 295 8603 LDAA BYTE IMMEDIATE E297 9603 LDAA BYTE DIRECT E299 B61122 LDAA WORD EXTENDED E29C A600 LDAA 0 X INDEXED BY X E29E 18A600 LDAA 0 Y INDEXED BY Y 2 1 A603 LDAA BYTE X INDEXED BY X E2A3 18A603 LDAA BYTE Y INDEXED BY Y LOAD ACCUM B E2A6 C603 LDAB BYTE IMMEDIATE E2A8 D603 LDAB BYTE DIRECT E2AA F61122 LDAB WORD EXTENDED E2AD E600 LDAB 0 X INDEXED BY X E2AF 18E600 LDAB 0 Y INDEXED BY Y E2B2 E603 LDAB BYTE X INDEXED BY X E2B4 18E603 LDAB BYTE Y INDEXED BY Y LOAD ACCUM D E2B7 CC1122 LDD WORD IMMEDIATE E2BA DCO03 LDD BYTE DIRECT E2BC FC1122 LDD WORD EXTENDED E2BF ECOO LDD 0 X INDEXED BY X E2C1 18EC00 LDD 0 Y INDEXED BY Y 2 4 LDD INDEXED BY X 2 6 18 LDD BYTE Y INDEXED BY Y EAR TECE The Engineers Collaborative Inc Page 38 5 11 USER S MANUAL The Engineers Collaborative Inc 68HC11 Cross Assembler V1 0 APPENDIX TASM11 REF
22. M11 REFERENCE MANUAL TASM11 SOURCE FILE SYNTAX OPCODES amp ADDRESSING MODE EXAMPLES BIT S TEST A WITH MEMORY E133 8503 BITA BYTE IMMEDIATE E135 9503 BITA BYTE DIRECT E137 B51122 BITA WORD EXTENDED E13A A500 BITA 0 X INDEXED BY X E13C 18A500 BITA 0 Y INDEXED BY Y E13F A503 BITA BYTE X INDEXED BY X E141 18A503 BITA BYTE Y INDEXED BY Y BIT S TEST B WITH MEMORY E144 C503 BITB BYTE IMMEDIATE E146 D503 BITB BYTE DIRECT E148 F51122 BITB WORD EXTENDED E14B E500 BITB 0 X INDEXED BY X E14D 18E500 BITB 0 Y INDEXED BY Y E150 E503 BITB BYTE X INDEXED BY X E152 18E503 BITB BYTE Y INDEXED BY Y E155 2FFE BLE BRANCH IF ZERO E157 25FE BLO BRANCH IF LOWER E159 23FE BLS BRANCH IF LOWER OR SAME E15B 2DFE BLT BRANCH IF ZERO E15D 2BFE BMI IF MINUS E15F 26FE BNE BRANCH IF ZERO E161 2AFE BPL IF PLUS E163 20FE BRA ALWAYS BRANCH IF BIT S CLEAR E165 1303C3FC BRCLR BYTE MASK DIRECT E169 1 00 BRCLR 0 X MASK INDEXED BY X E16D 181F00C3 BRCLR 0 Y MASK INDEXED BY Y FB E172 1F03C3FC BRCLR BYTE X MASK INDEXED BY X E176 181F03C3 BRCLR BYTE Y MASK INDEXED BY Y FB E17B 21FE BRN BRANCH NEVER BRANCH IF BIT S SET E17D 1203C3FC BRSET BYTE MASK DIRECT E181 1 00 BRSET 0 X MASK INDEXED BY X E185 181E00C3 BRSET 0 Y MASK INDEXED BY Y FB E18A 1E03C3FC BRSET BYTE X MASK INDEXED BY X E18E 181E03C3 BRSE
23. MI1 generates two output files a listing file and an object code file These files have the same name as the source code file with different file extensions The listing file has extension PRN and the object code file has extension MIK or optionally Object code files with extension in Motorola 5 record format and object code files with extension are in Intel HEX format The default format is MIK TASM11 is two pass assembler it must read the source file twice to complete the generation of object code On the first pass through the source file statements TASM11 does only the work required to associate values with the symbols that appear in the source file The output files are generated on the second pass If errors are found on the first pass error messages are displayed on the screen and TASM11 terminates before attempting the second pass 3 1 OUTPUT CONTROL SWITCHES The output control switches are 3 letter mnemonics that are typed on the command line following the source code filename when invoking TASM11 These switches control the output generated by TASM11 as follows NLF NO LISTING FILE NLF can be used to prevent the generation of the listing file This switch might be used when first assembling a source code file to see if the file assembles without errors NOF NO OBJECT FILE NOF can be used to prevent the generation of the object code file It might be used in the same manner
24. Motorola S record format named WIDGET MIK If we had typed at the DOS ready prompt TASM11 WIDGET ASM HEX LTP a listing file named WIDGET PRN and an object code file named WIDGET HEX in Intel HEX format would have been created and a copy of the listing file would have been sent to the printer If we had typed TASM11 WIDGET ASM NLF WOE no output files would be created and if errors were detected in the source EAR TECE The Engineers Collaborative Inc Page 8 TASM11 USER S MANUAL file the program would pause after displaying the error message until the operator pressed any key 4 0 TASM11 SOURCE FILES Source code files compatible with TASM11 are standard PC DOS ASCII text files The only control codes that can be present in the files are carriage return CR line feed LF and horizontal tab characters These files may be created by the EDLIN text editor supplied with DOS but it 1s recommended that a more sophisticated editor such as Personal Editor from IBM Wordstar used in the non document mode or the Sidekick notepad editor be used The reader is encouraged to study the example listing in Appendix A to acquire an understanding of source code syntax and format acceptable to TASM11 Source files consist of a series of statements of one of the following forms where denotes optional statement fragments comment Or comment OPCODE arguments comment symbol OPCODE arguments comment PSEUDO OP arg
25. RCE FILE SYNTAX OPCODES amp ADDRESSING MODE EXAMPLES TEST FOR ZERO OR MINUS E43F 4D TSTA E440 5D TSTB 7B E441 7D1122 TST WORD EXTENDED E444 6D00 TST 0 INDEXED BY X E446 186D00 TSI 0 J INDEXED BY Y E449 6D03 TST BYTE X INDEXED BY X E44B 186D03 TST BYTE Y INDEXED BY Y E44E 30 TSX TRANSFER STACK POINTER TO X E44F 1830 TSY TRANSFER STACK POINTER TO Y E451 35 TXS IRNASFER X TO STACK POINTER E452 1835 TYS IRNASFER Y TO STACK POINTER E454 3E WAI WAIT FOR INTERRUPT E455 8F XGDX EXCHANGE D WITH X E456 188F XGDY EXCHANGE D WITH Y FFCO ORG vectors VECTORS FFCO E079 DW START reserved FFC2 E079 DW START reserved 1 FFCA E079 DW START reserved 2 FFC6 E079 DW START reserved 3 FFC8 E079 DW START reserved 4 FFCA E079 DW START reserved 5 FFCC E079 DW START reserved 6 FFCE E079 DW START reserved 7 FFDO E079 DW START reserved 8 FFD2 E079 DW START reserved 9 FFD4 E079 DW START reserved 10 FFD6 E079 DW START sci serial system FFD8 E079 DW START spi serial transfer complete FFDA E079 DW START pulse accumulator input edge FFDC E079 DW START pulse accumulator overflow FFDE E079 DW START timer overflow FFEO E079 DW START timer output compare 5 FFE2 E079 DW START timer output compare 4 FFE4 E079 DW START timer output compare 3 FFE6 E079 DW START timer output compare 2 FFE8 E079 DW START timer output compare 1 FFEA E079 DW START timer input capture 3 FFEC E079 DW START timer input capture 2 FFEE E079
26. T BYTE Y MASK INDEXED BY Y FB SET BIT S E193 1403C3 BSET BYTE MASK DIRECT E196 1C00C3 BSET 0 X MASK INDEXED BY X E199 181 00 3 BSET 0 Y MASK INDEXED BY Y E19D 1C03C3 BSET BYTE X MASK INDEXED BY X 1 0 181C03C3 BSET BYTE Y MASK INDEXED BY Y E1A4 8DFE BSR TO SUBROUTINE E1A6 28FE BVC IF OVERFLOW CLEAR E1A8 29FE BVS IF OVERFLOW SET EAR TECE The Engineers Collaborative Inc Page 35 5 11 USER S MANUAL The Engineers Collaborative Inc 68HC11 Cross Assembler V1 0 APPENDIX TASM11 REFERENCE MANUAL TASM11 SOURCE FILE SYNTAX OPCODES amp ADDRESSING MODE EXAMPLES E1AA 11 CBA COMPARE 1 0 CLC CARRY BIT E1AC OE CLI CLEAR INTERRUPT MASK MEMORY BYTE E1AD 7F1122 CLR WORD EXTENDED E1BO 6F00 CLR 0 INDEXED BY X E1B2 186F00 CLR 0 Y INDEXED BY Y E1B5 6F03 CLR BYTE X INDEXED BY X E1B7 186F03 CLR BYTE Y INDEXED BY Y E1BA 4F CLRA A E1BB 5F CLRB CLEAR B E1BC OA CLV CLEAR OVERFLOW FLAG COMPARE A TO MEMORY E1BD 8103 CMPA BYTE IMMEDIATE E1BF 9103 CMPA BYTE DIRECT 1 1 11122 CMPA WORD EXTENDED 1 4 A100 CMPA 0 X INDEXED BY X E1C6 18A100 CMPA 0 Y INDEXED BY Y E1C9 A103 CMPA BYTE X INDEXED BY X E1CB 18A103 CMPA BYTE Y INDEXED BY Y COMPARE TO MEMORY E1CE C103 CMPB BYTE IMMEDIATE 0 D103 CMPB BYTE DIRECT E1D2 F11122 CMPB WORD EXTENDED E1D5 E100 CMPB 0 X
27. TASM11 USER S MANUAL A Cross Assembler Program for Motorola 68HC11 Microcomputers e TECH The Engineers Collaborative Inc Webite at www tec i com Email support tec i com TASM11 USER S MANUAL IMPORTANT WARRANTY AND LIABILITY INFORMATION The Engineers Collaborative Inc makes no warranties expressed or implied for this software No warranty of fitness for a particular purpose is offered The user is advised to test the software thoroughly before relying on it The user assumes the entire risk of using the product The total liability of The Engineers Collaborative Inc is limited to the purchase price of the product and does not cover any lost profits special incidental or consequential damages or any claim against the purchaser by any party SOFTWARE LICENSE STATEMENT US copyright law and international treaty provisions protect this software Therefore you must treat this software just like a book with the following exception The Engineers Collaborative Inc authorizes you to make archival copies of the software for the sole purpose of backing up our software and protecting your investment from loss By saying just like a book The Engineers Collaborative Inc means that the software cannot be used by two different people in two different places at the same time OTHER The information contained in this manual has been carefully checked and is believed to be accurate and
28. YTE X INDEXED BY X E36D 186903 ROL BYTE Y INDEXED BY Y ROTATE RIGHT E370 46 RORA 71 56 RORB B E372 761122 ROR WORD EXTENDED E375 6600 ROR 0 X INDEXED BY X E377 186600 ROR 0 Y INDEXED BY Y E37A 6603 ROR BYTE X INDEXED BY X E37C 186603 ROR BYTE Y INDEXED BY Y E37F 3B RTI RETURN FROM INTERRUPT E380 39 RTS RETURN FROM SUBROUTINE E381 10 SBA SUBTRACT B FROM A Aq Engineers Collaborative Inc Page 40 5 11 USER S MANUAL The Engineers Collaborative Inc 68 11 Cross Assembler V1 0 APPENDIX TASM11 REFERENCE MANUAL TASM11 SOURCE FILE SYNTAX OPCODES amp ADDRESSING MODE EXAMPLES SUBTRACT WITH CARRY FROM A E382 8203 SBCA BYTE IMMEDIATE E384 9203 SBCA BYTE DIRECT E386 B21122 SBCA WORD EXTENDED E389 A200 SBCA 0 INDEXED BY X E38B 18A200 SBCA 0 Y INDEXED BY Y E38E A203 SBCA BYTE X INDEXED BY X E390 18A203 SBCA BYTE Y INDEXED BY Y SUBTRACT WITH CARRY FROM B E393 C203 SBCB BYTE IMMEDIATE E395 D203 SBCB BYTE DIRECT E397 F21122 SBCB WORD EXTENDED E39A E200 SBCB 0 X INDEXED BY X E39C 18E200 SBCB 0 Y INDEXED BY Y E39F E203 SBCB BYTE X INDEXED BY X 1 18E203 SBCB BYTE Y INDEXED BY Y E3A4 OD SEC SET CARRY FLAG E3A5 OF SEI SET INTERRUPT MASK E3A6 OB SEV SET OVERFLOW FLAG STORE ACCUM E3A7 9703 STAA BYTE DIRECT E3A9 B71122 STAA WORD EXTENDED E3AC A700 STAA 0 X INDEXED BY X E3AE 18A700 STAA 0 Y INDEXED BY Y
29. al Symbol Name The symbol field contains a symbol that contains characters other than the alphanumeric ASCII characters or the symbol name starts with a character other than the alpha characters or the underscore or the period Out of memory space for the symbol table Your machine does not contain enough available memory space to contain the symbol table The number of symbols must be reduced or the amount of available memory increased Symbol Undefined on Pass 2 The most probable cause of this error is that a symbol name was referred to in the arguments field of a source statement but never appeared in the symbol field of another source statement As an example if we had the source statement JMP WATCHDOG and no source statement had WATCHDOOG in the symbol field then we would get an undefined symbol error when TASMI1 read the JMP statement on pass 2 of the assembly Undefined operand on Pass One The operands for the EQU and ORG statements must be defined on pass 1 and must occur in the source file before they are used EAR TECE The Engineers Collaborative Inc Page 22 TASM11 USER S MANUAL Branch out of Range Target addresses for the relative branch instructions must be within 128 to 127 bytes of the first byte of the instruction following the branch instruction This error indicates that the target address of the branch is outside these limits Immediate Addressing Illegal Extended Addressing not al
30. as NLF NST NO SYMBOL TABLE NST prevents the generation of the symbol table The symbol table is an alphabetical listing of all symbols and their associated values The symbol table is appended to the end of the listing file LTP LIST TO PRINTER LTP can be used to send a copy of the listing file to the printer HEX Changes the object code file format to INTEL HEX WOE WAIT ON ERROR WOE is used to prevent error messages from scrolling off the screen before they can be read When used TECE The Engineers Collaborative Inc Page 7 TASM11 USER S MANUAL assembly is halted after an error message has been sent to the screen until the operator presses any key SPF SUPPRESS PAGE FORMATTING This switch is used to suppress normal page formatting TASM11 normally inserts a form feed character into the listing file after each 64 lines or after the number of lines specified by the PGLEN pseudo op then it inserts 5 lines of page header information into the listing file See section 5 5 The SPF switch is used to prevent this page formatting 3 2 EXAMPLES Some examples of invoking TASM11 follow The examples assume that a source code file named WIDGET ASM exists Type at the DOS ready prompt TASMII WIDET ASM tasmll widget asm In this example no output control switches are used therefore a listing file will be created on the currently logged drive named WIDGET PRN and an object code file will be created in
31. ay not be correct Source files should be corrected so that no warnings errors occur before the generated code is trusted A list of warning errors and possible causes are as follows Value Truncated An operand was encountered that was larger than 255 when a byte value was expected The value was truncated to fit in a byte Indexed Addressing Assumed Incorrect indexed addressing syntax was found and the indexed addressing mode was assumed Continuation too long FFA The Engineers Collaborative Inc Page 24 TASM11 USER S MANUAL To eliminate this warning make sure that each source statement is complete on one line 8 0 68HC11 ADDRESSING MODES A summary of 68HC11 addressing modes and instruction syntax is provided in this section The reader is referred to the publications listed in the introduction for additional information Appendix A contains an actual assembly listing of all the 68HC11 instructions and the addressing modes available for each instruction This listing should be used to provide more comprehensive examples of proper 68HC11 source code syntax 8 1 Inherent Addressing Inherent addressing instructions contain the operand information implicitly These are one byte instructions such as ROLA Rotate the A register left thru carry ASLA Arithmetic shift left the A register 8 2 Immediate Addressing In immediate addressing the operand data is contained in the byte s following the opcode b
32. ce file must be reduced Currently TASM11 allocates space for 500 forward references Fatal error Error in Mnemonic table If this error appears the TASM11 EXE program file has been corrupted new copy of the program will have to be obtained from a backup copy or from The Engineers Collaborative Inc 7 2 Non Fatal Errors Non fatal errors are errors that are detected but not serious enough to cause termination of the assembly They most certainly are serious enough to prevent the program under development from performing its intended function however A list of non fatal errors and probable causes are as follows These error messages will appear in the listing file on the line above the source statement in which the error was detected When displayed on the video screen the line number in which the error occurred and the name of file containing the line in error will be printed in front of the error message EAR TECE The Engineers Collaborative Inc Page 21 TASM11 USER S MANUAL Unrecognized Mnemonic Undefined Pseudo Operation Indicates an invalid opcode field in the source code statement The opcode or pseudo op was misspelled or not separated from other fields of the source statement by spaces or tab characters Symbol Redefined An attempt was made to change the definition of an already defined symbol This can happen if more than one source statement has been given the same label or symbol name Illeg
33. complete at the time of printing However no responsibility is assumed for errors that might appear The Engineers Collaborative Inc reserves the right to make changes to the product and or the manual at any time without notice Furthermore The Engineers Collaborative Inc assumes no liability arising out of the use or application of any of its products No part of this document may be copied or reproduced in any form or by any means without prior written consent of The Engineers Collaborative Inc C Copyright 1989 2004 The Engineers Collaborative Inc Web Site at www tec i com Email support tec i com All Rights Reserved Printed in the U S A EAR TECE The Engineers Collaborative Inc Page 2 TASM11 USER S MANUAL 1 0 2 0 2 1 222 2 3 3 0 3 1 3 2 4 0 5 0 6 0 6 1 6 2 6 3 6 4 6 5 6 6 6 7 7 0 7 1 7 2 7 3 8 0 8 1 8 2 8 3 TABLE OF CONTENTS H 5 Gu ANI m 5 h Distribution DVIS ROTC oo ue cositas 5 Backing up the distribution diskette aed 6 Creating a Working Copy Diskette 6 TASMI Qusa a TE 6 O tp t Control Switches 25 oeii aa E cu Q Na Q au S 7 lo eund MEMO c 8 TASMI1 Source Biles eT RR 9 EXDEESSIONS M LC D M N I MH pK LM C NL I Ld 11 TASMTI Pseudo Operatiolis uuu patsa t
34. eet itin m ee 11 Storage Definition Pseudo ops 11 ORG END PSeutdo sops uie dito o E divise o M tan de ona Medi ord 16 5ymbolc saine trai dn e u us dU dens iaa ee ende 17 Include a ve Ec RED RARE E EX ad n Ed ets 17 Listing Control Pseudo ops es pui e aod 18 OPT option Pseildos0p 25i es repensis tpi ees sis ptite 19 Bid 20 Error Messages te NER ofa Serenata a curate BE NOM OO UA 20 Fatal aeo di ae oe 21 Non Fatal 3 esito olde odes tton lud iconos ed udi 22 Warning Errors ES 25 68HC11 Addressing Modes 322 ree tet tree tt ipt 25 Inherent ucc DD a Em 26 Imm diate AddresSIie l Ne cotes du ded dL 26 Direct Adressin aso mni ace idera t d s ee ee a S 26 TECE The Engineers Collaborative Inc Page 3 TASM11 USER S MANUAL Table of Contents cont 8 4 Extended 26 83 Indexed Addressmg o us t tos 27 8 0 Relative Addressing 27 9 0 O tp t File POLTISE oS te o uta 28 Cistin File Format 0 28
35. es must not contain INCLUDE pseudo ops Include files can not be nested The main source file can contain any number of INCLUDE pseudo ops Included files must not contain an END pseudo op If the file to be included does not reside on the currently logged drive the filename must contain the drive specification Examples INCLUDE B MYFILE ASM INCLUDE EQUATES ASM INCLUDE A TIMERISR ASM 6 5 Listing Control Pseudo Ops PAGE The PAGE or optionally just PAG pseudo op causes a form feed character to be inserted into the listing output file This causes the printed listing to skip to the top of the next page PGLEN argument The PGLEN pseudo op sets the number of lines that will be printed on each page of the listing to the value specified by the argument The argument must be a numeric constant FFA TECE The Engineers Collaborative Inc Page 17 TASM11 USER S MANUAL Examples PGLEN 55 PGLEN 66 TITLE SBTTL text Each page of the listing file contains a heading at the top of the page that is of the following form blank line The Engineers Collaborative Inc 68HC11 Cross Assembler V blank line User specified title User specified subtitle blank line The user specifies the text of the title and subtitle by means of the TITLE and SBTTL pseudo ops as shown in the following examples TITLE Text of users title goes here SBTTL text of the users subtitle goes here NOLIST The NOLIST pseudo op can be
36. form constant characters 6FE020 48656C6C DB Hello another way to do it 6F E025 00000000 ZMB 8 zero 8 memory bytes 00000000 E02D 00000000 BSZ 8 another way to do it 00000000 E035 FFFFFFFF FILL OFFH 10 fill ten bytes with OffH FFFFFFFF FFFF E049 ORG 10 ORG WITH EXPRESSION E053 ORG coq another way to do it E053 4E6F7720 MESSAGEDB Now is the time for all good men a long message 69732074 68652074 696D6520 666F7220 616C6C20 676F6F64 206D656E 202E202E 202E EAR TECE The Engineers Collaborative Inc Page 32 5 11 USER S MANUAL The Engineers Collaborative Inc 68 11 Cross Assembler V1 0 APPENDIX TASM11 REFERENCE MANUAL TASM11 SOURCE FILE SYNTAX OPCODES amp ADDRESSING MODE EXAMPLES THE FOLLOWING IS ASSEMBLY OF ALL 68HC11 OPCODES AND ADDRESSING MODES de oc A A E079 1B START ABA ADD ACCUMULATORS E07A 3A ABX ADD B TO X E07B 183A ABY ADD B TO Y ADD WITH CARRY TO A E07D 8903 ADCA BYTE IMMEDIATE 07 9903 ADCA BYTE DIRECT E081 B91122 ADCA WORD EXTENDED E084 A900 ADCA 0 X INDEXED BY X E086 18A900 ADCA 0 INDEXED BY Y E089 A903 ADCA BYTE X INDEXED BY X 18A903 ADCA BYTE INDEXED BY Y ADD WITH CARRY TO B 08 C903 ADCB BYTE IMMEDIATE E090 D903 ADCB BYTE DIRECT E092 F91122 ADCB WORD EXTENDED E095 E900 ADCB 0 INDEXED BY X E097 18E900 ADCB 0 Y INDEXED BY Y E09A E903
37. ing on the OPCODE or PSEUDO OP Constants consist of a sequence of characters optionally preceded by a radix specifier The default radix is ten A radix of 16 may be specified by a leading or by a trailing H If a trailing H is used the first digit of the constant must be a decimal digit As an example the numeric constant 15 may be specified as 15 F or as OFH Constant examples One_hundred EQU 100 a decimal constant One_hundred EQU 64 a hexadecimal constant One hundred EQU 144 constant One hundred EQU 4561100100 a binary constant Two hundred EQU 0C8H another form of hex constant Character constants are enclosed in single or double quotes or As an example the statement TEXT DB The quick brown fox is equivalent to the statement TEXT DB The quick brown fox 5 0 EXPRESSIONS Expressions may consist of symbols constants or the characters or or denote the current value of the program counter joined together by one of the operators amp IA The operators are the same as in C add subtract multiply TECE The Engineers Collaborative Inc Page 10 5 11 USER S MANUAL divide remainder after division amp bitwise logical and bitwise logical bitwise logical exclusive or Expressions are evaluated left to right and there is no provision for parenthesized expressions Arithmetic is carried out in signed two s compliment integer precision
38. le ANSI SYS to the working copy diskettes This file must have been supplied with the disk operating system for your computer Note This file is not required if only TASM11 is to be used but is required for all other The Engineers Collaborative Inc software development tools Use the DOS COPY command to copy the text editor program that you will be using to create 68 11 source code files to the working copy diskettes At this point you have finished creating the working copy diskettes but to use the software tools you must make sure that the extended screen and keyboard device driver ANSLSYS is loaded The easiest way to do this is to boot the system with the working copy diskette in the boot drive 3 0 RUNNING TASMI11 To invoke TASM11 type at the DOS ready prompt d TASM11 d fname asm option 1 option 2 d denotes optional drive specifiers where the TASMI1 program or the source file is to be found and option denotes optional output control switches The output files will always be directed to the currently logged drive fname asm is the source code filename There is no default source file extension so the extension if any must be included when invoking TASM11 Any number of output control options may follow the source file name and these options can be in any order Options must be separated by one or more spaces FFA TECE The Engineers Collaborative Inc Page 6 5 11 USER S MANUAL Normally TAS
39. lowed Unknown Addressing Mode These errors are generated when an illegal or unrecognizeable addressing mode is detected for certain operation codes SYNTAX This is a catch all error message that indicates that the assembler found something that it did not understand but is so confused that it can not give a more specific error message Phasing error Lets hope this error never occurs It indicates that assumptions made by the assembler on pass 1 were proven invalid on pass 2 If this error occurs check for possible problems related to the size of forward references Rearrange your code and try again Missing Delimiter Missing Delimiter Character These errors occur with the DB or FCC pseudo ops when the delimiter character is missing from the end of a string constant EQU requires lable An EQU pseudo op was found that did not have a symbol field EQU statements must have a symbol with which to equate the value specified by the operand EAR TECE The Engineers Collaborative Inc Page 23 TASM11 USER S MANUAL field Bad A FILL pseudo op was found that did not have the proper operands The FILL spseudo op requires two operands separated by a comma Unrecognized OPT An OPT pseudo op was found with an invalid argument or operand 7 3 WARNING ERRORS Warning errors are generated when the assembler finds unexpected values or statement syntax in the source file The resulting code generated may or m
40. ollaborative Inc Page 14 TASM11 USER S MANUAL The form constant characters pseudo op is used to initialize one or more consecutive memory locations to the string characters specified by the argument The characters of the string must be delimited by 9 or Examples FCC Now is the time for all good men Symbol FCC How now brown cow FILL FILL Argumentl Argument2 or Symbol FILL Argumentl Argument2 The fill pseudo op is used to fill the number of consecutive memory locations specified by argument2 with the value specified by argumentl The arguments must be separated by a comma The value of argument must be between 0 and 255 Examples FILL FF 10 fills ten memory locations with 0FFH Symbol FILL 1 3 fills three memory locations with one s 6 2 ORG and END Pseudo Ops ORG argument Set program origin Sets the program counter to the value of the argument This statement must precede the first code generating statement in a source file Additional ORG pseudo ops may be used throughout the source file to create separate program fragments The argument may be a numeric constant or an expression as shown in the examples below Examples ORG 100H sets origin to 256 FFA TECE The Engineers Collaborative Inc Page 15 TASM11 USER S MANUAL ORG 10 2 sets origin to 20 ORG 10 2 sets origin to 5 ORG 10 2 sets origin to 8 ORG 1042 sets origin to 12 ORG 42 sets origin to current value of pc 2 ORG
41. ples FDB FFFF FDB 0B333H 1110111001110000 symbol FDB 1 2 3 4 RESERVE MEMORY BYTES RMB Argument or Symbol RMB Argument The reserve memory bytes pseudo op is used to reserve the number of consecutive memory locations specified by the argument It can also be used to associate a symbolic name to the first of these memory locations The argument must be a numeric constant with value between 0 and 255 The bytes reserved are not initialized FFA TECE The Engineers Collaborative Inc Page 13 TASM11 USER S MANUAL Examples RMB 10 reserves 10 bytes of storage symbol RMB 10H reserves 16 bytes of storage BLOCK STORE ZEROS BSZ Argument Or Symbol BSZ Argument The block store zeros pseudo op is used to reserve the number of consecutive memory locations specified by the argument It can also be used to associate a symbolic name to the first of these memory locations The argument must be a numeric constant with value between 0 and 255 The bytes reserved are each initialized to zero Examples BSZ 10 reserves 10 bytes of storage initialized to zero symbol BSZ 10H 16 bytes of storage initialized to zero ZERO MEMORY BYTES ZMB Argument Or Symbol ZMB Argument The zero memory bytes pseudo op is the same as the BSZ pseudo op described above It is included in TASMI1 for compatibility with other assemblers FORM CONSTANT CHARACTERS FCC Argument Or Symbol FCC Argument TA TECE The Engineers C
42. so be used to associate a symbolic name to the first of these memory locations The argument must be a numeric constant with value between 0 and 255 The bytes reserved are not initialized Examples DS 10 reserves 10 bytes of storage symbol DS 10H reserves 16 bytes of storage FORM CONSTANT BYTES FCB Argument Or Symbol FCB Argument The form constant bytes pseudo op is used to initialize one or more memory locations to the values specified by the argument It can also be used to associate a symbolic name to the memory location EAR TECE The Engineers Collaborative Inc Page 12 5 11 USER S MANUAL The values of the argument must be either numeric constants character constants or symbol names that have been previously defined The values of the argument must be separated by commas Numeric constants must be a value between OH and OFFH Examples FCB FF FCB 01110000 symbol FCB 1 2 3 4 FORM DOUBLE BYTES FDB Argument or Symbol FDB Argument The form double bytes pseudo op is used to initialize two or more consecutive memory locations to the values specified by the argument It can also be used to associate a symbolic name to the memory location The values of the argument must be either numeric constants character constants or symbol names that have been previously defined The values of the argument must be separated by commas Numeric constants must a value between and OFFFFH Exam
43. specified by an END pseudo op in the source file This field contains zero otherwise The checksum is the ones compliment of the 8 bit sum without carry of the byte count the load address and the data bytes 9 3 Intel HEX Object File Format Each line of this file has the following format Bytes 1 Colon 2 amp 3 Number of data bytes in this record 4 amp 5 Load Address high byte 6 amp 7 Load Address low byte 8 amp 9 Unused 00 10 X Data bytes 2 characters each 1 amp X 2 checksum 3 amp x 4 carriage return and linefeed The last line of the file is similar to that described above except the number of data bytes is 0 and the load address is the program starting address if specified by an END pseudo op in the source file This field is zero otherwise The checksum is the twos compliment of the 8 bit sum without carry of all the data bytes the load address and the byte count FFA TECE The Engineers Collaborative Inc Page 28 TASM11 USER S MANUAL The Engineers Collaborative Inc 68HC11 Cross Assembler V1 0 APPENDIX A TASM11 REFERENCE MANUAL TASM11 SOURCE FILE SYNTAX OPCODES amp ADDRESSING MODE EXAMPLES FFFF 0000 E000 B600 1122 0003 00C3 1000 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 100 LOOB CE Test File Fname TEST11 ASM TE 12 17 87 22 a a oe a Ven
44. sting file line will be 16 columns longer than the source file lines If listing files will be printed with 80 column lines then the text of the source file lines should occupy 64 columns or less If listing files will be printed with 132 column lines then the text of the source file lines should occupy 116 columns or less It is up to the user to set up his printer for the most appropriate line length Columns 2 5 of a listing file line contain a 4 character hexadecimal number that corresponds to the current value of the program counter Columns 7 14 contain the hexadecimal representation of the code generated by TASMII Each page of the listing file contains a 6 line heading as explained in the description of the TITLE and SBTTL pseudo ops At the end of the listing file is the alphabetical listing of all symbols and their associated values in hexadecimal representation EAR TECE The Engineers Collaborative Inc Page 27 TASM11 USER S MANUAL 9 2 Motorola S record Object File Format Each line of this file has the following format Bytes 1 amp 2 S1 3 amp 4 The number of data bytes in this record 3 5 amp 6 Load Address high byte 7 amp 8 Load Address low byte 9 X Data bytes 2 characters each 1 amp X 2 checksum 3 amp 4 carriage return and linefeed The last record in the file is the same as above except that it starts with S9 and the load address field contains the program starting address when
45. ter x or y being used and 2 the the 8 bit unsigned offset contained in the instruction SMALL EQU 20 LDX SMALL LDA 0 X load the A reg with the contents of address 20 LDA X load the A reg with the contents of address 27 8 6 Relative Addressing Relative addressing is used by the branch instructions and by the bit test and branch instructions BRCLR and BRSET In relative addressing the last byte of the instruction is added to the program counter to obtain the address of the next instruction if the branch is taken The target address of the branch must be within 128 to 127 bytes of the program counter value following the branch instruction TASM11 calculates the TECE The Engineers Collaborative Inc Page 26 TASM11 USER S MANUAL value of the byte to added to the pc value and generates a branch out of range error message if these limits are exceeded BCS timer branch to the inst labeled timer if the scarry flag is set Idx 1000 load x with address of port a brclr 0 81 timer sbranch to the inst labeled timer if bits 7 and 1 of port a are zero 9 0 OUTPUT FILE FORMAT 9 1 Listing file format Each line of the listing file generated by TASMI1 can be a maximum of 132 characters long The text from each line of the source code file is copied to the corresponding line of the listing file starting at column 16 To create neat appearing printed listing files the user must be aware that each li
46. uments comment symbol PSEUDO OP arguments comment PCODE is any standard 68HC11 operation code and must not start in the first column of a statement Opcodes can be either upper or lower case characters or combinations of both BRCLR and BrClr are considered the same by TASM11 PSEUDO OP is any TASM11 pseudo operation and must not start in the first column of a statement TASM11 pseudo ops are described later in this document They can be either upper or lower case characters or combinations of both Symbols if present must start in column of the statement consist of 1 to 15 ASCII alphanumeric characters and begin with a letter a period or an underscore Capital letters are significant in symbol names That is the assembler will treat Dog dog and doG as unique symbols Comments must be preceded by a semicolon or an asteric when they appear on a line by themselves Comments that appear as the last field of a line do not have to be preceded by a semicolon or asteric but must be preceded by a space or horizontal tab character and can not start with an expression FFA TECE The Engineers Collaborative Inc Page 9 5 11 USER S MANUAL operator character The fields of a statement must be delimited by at least one space or a horizontal tab character The arguments portion of a statement consists of from 1 to 4 symbols numeric constants character constants expressions or combinations depend
47. yte Immediate addressing is designated by a leading LDA 7 load the A register with the number 7 LDX large load the X register with the value of the symbol slarge 8 3 Direct Addressing In direct addressing the address of the operand is contained in the byte following the instruction opcode Since the address in contained in one byte direct addressing can only be used to access memory locations in the first page of memory addresses 0 255 The operand field must contain a numeric FFA TECE The Engineers Collaborative Inc Page 25 TASM11 USER S MANUAL or symbolic constant LDA 0 load the A register with the contents of memory location 0 LDB small the B register with the contents of memory location specified by small 8 4 Extended Addressing In extended addressing the address of the operand is contained in the two bytes following the instruction opcode Extended addressing can be used to access any memory location The operand field must contain a numeric or symbolic constant LDA 256 load the A register with the contents of memory location 256 LDX large load the X register with the contents of memory location specified by large 8 5 Indexed Addressing In the indexed addressing mode one of the index registers x or y is used in calculating the effective address In this case the effective address is variable and depends on two factors 1 the current contents of the index regis

Download Pdf Manuals

image

Related Search

Related Contents

DS-8100-S Series DVR USER'S MANUAL Version 2.0.1  user manual english  Philips Economy Twister Twisted energy saving bulb 871829121723700  Hobart ML-29035 Scale User Manual  Philips DR4S6B10F  [{¡GOLES  Philips SHE9501 In-Ear Headphones      Philips Portable MP3-CD Player EXP2544  

Copyright © All rights reserved.
Failed to retrieve file