.; Bonner Labs Runoff format .; Note: some of the defaults have been changed from the RTS distribution: .; in the kit: -f isn't default, -k defaults to 15, and default list .; file type is LS. .ps64,76.lm0.rm76.nopaging.nhy.no flags underline 1 X68000 .p0 X68000 assembles code for the Motorola 68000/08/10/12 series of microprocessors. Its command line format is: .b1.nf.lm+5 $ X68000 [-abs] [-all] [-c] [+e] [-e-] [-e errspec] [-fp flotype] - .lm+9 [-f] [-g] [-i] [-k namsiz][ [+l] [-l-] [-l listspec] [+n] - [-n-] [-n symspec] [+o] [-o-] [-o objspec] [-p processor] - [-q-] [-set symbol] [-s adrspec] [-tmp tmpspec] - [-version] inspec .f.lm-14.b1 2 Flags .lm13.rm73.ts13.p-13 -abs generate absolute code. Default is relocatable. .p -all put all names (local+global) into the symbol table. Default is globals only. .p -c distinguish between upper- and lower-case letters in names. Default is to ignore case distinctions. .p +e write assembly errors to file_: inspec's filename + .ER if inspec filetype is S, otherwise to XA.ER. .p -e- write assembly errors to the terminal (stdout). .p -e errspec write assembly errors to file errspec. .p -fp#flotype select floating-point type_: flotype=0 for Digital style, (default), 1 for AMD9511 style, 2 for ANSI/IEEE standard. .p -f force second (listing+object) pass even if (non-fatal) errors are detected on the first pass. This is the default. .p -g treat undefined symbols as externals. Default_: as errors. .p -i read flags from terminal (stdin). One per line, ending at ctrl/Z. .p -k#namsiz define significant length of symbol names. Format is n.m, where n is the number of characters (default 9), and m the number of pages of symbols kept in memory (default_: 0=all). .p +l write the listing to file_: inspec's filename + .LIS if inspec filetype is S, otherwise to XA.LIS. .p -l- write the listing to the terminal (stdout). .p -l#listspec write the listing to file listspec. .p +n write the symbol table to file_: inspec's filename + .SM if inspec filetype is S, otherwise to XA.SM. .p -n- write the symbol table to the terminal (stdout). .p -n#symspec write the symbol table to file symspec. .p +o write the object code to file_: inspec's filename + .O if inspec filetype is S, otherwise to XA.O. .p -o- write the object code to the terminal (stdout). .p -o#objspec write the object code to file objspec. .p -p#processor declare the processor type_: m68000, m68008, m68010, m68012 or data. The default is data, which accepts data storage directives only. .p -q suppress startup and completion messages. .p -set#symbol set a symbol to have an initial value given by string symbol, which takes the form name=value. .p -s#adrspec start a PSECT to a given address. Format of adrspec is psect__name=address, where psect__name is __text, __data, or __zpage. .p -tmp#tmpspec use tmpspec as a prefix for the temporary files created by the assembler. Default is CTEMP. .p -version show X68000's version number etc.. No assembly is done. .lm0.b1 2 Parameter .b1 inspec is the full filename of the file to be assembled. The default filetype is none. The normal filetype used is .S, which will enable the output filenames to be automatically selected if the +e, +l, +o, and/or +n flags are used. .b1 2 Instruction__mnemonics .p0 X68000 recognises the following mnemonics: .LM+4.b1.nf.ts12,19,26,33,40,47,54,61,68,75 ABCD ADD ADDA ADDI ADDQ ADDX AND ANDI ASL ASR BCC BCHG BCLR BCS BEQ BGE BGT BHI BKPT* BLE BLS BLT BMI BNE BPL BRA BSET BSR BTST BVC BVS CHK CLR CMP CMPA CMPI CMPM DBCC DBCS DBEQ DBF DBGE DBGT DBHI DBLE DBLS DBLT DBMI DBNE DBPL DBRA DBT DBVC DBVS DIVS DIVU EOR EORI EXG EXT ILLEGAL JMP JSR LEA LINK LSL LSR MFSR_# MFUSP_# MOVE MOVEA MOVEC* MOVEM MOVEP MOVEQ MOVES* MTCCR_# MTSR_# MTUSP_# MULS MULU NBCD NEG NEGX NOP NOT OR ORI PEA RESET ROL ROR ROXL ROXR RTD* RTE RTR RTS SBCD SCC SCS SEQ SF SGE SGT SHI SLE SLS SLT SMI SNE SPL ST STOP SUB SUBA SUBI SUBQ SUBX SVC SVS SWAP TAS TRAP TRAPV TST UNLK .LM-4.b1 *##68010 and 68012 only. _###for compatibility with Whitesmiths' 68000 codegenerator. .f.p0 Extensions .B, .W, .L, or .S may be added to appropriate instructions to specify the addressing length (default .W). .b1 2 Addressing__modes .ts4,43.nf.b1 mode assembler format ---- ---------------- register direct data register direct Dn, n=0-7 address register direct An, n=0-7, A7=SP .b1 absolute data addressing absolute short address absolute long address .b1 program counter relative relative with offset offset(PC) or (PC,offset) relative with offset + index offset(PC,Rn) or (PC,offset,Rn) .b1 register indirect register indirect (An) register indirect with postincrement (An)+ register indirect with predecrement -(An) register indirect with offset offset(An) or (offset,An) indexed register indirect with offset offset(An,Rn) or (offset,An,Rn) .b1 immediate data addressing immediate _#data quick _#data .b1 implied addressing all processors SR, USP, SP, PC 68010 only VBR, SFC, DFC .b1 2 Directives .b1.ts18 _.ABORT fatal error -- stop assembly _.ADDR itemlist store longword address(es) _.ALIGN expr align address to nearest multiple of expression _.ASCII parity define parity bit for .TEXT storage _.BYTE itemlist store byte(s) _.DEFINE symb=expr set value of symbol to expression, unchangeably _.DOUBLE itemlist store byte(s) _.ELSE conditionally assemble if previous .IF was false _.END [address] end assembly, optionally define start address _.ENDIF end conditional assembly block _.ENDM end macro definition _.ENDR end repeat section _.EVEN place next item at even address _.EXITM exit macro expansion _.EXTERNAL symbols declare symbol(s) as globally defined _.FLOAT list store 4-byte floating point number(s) _.IF expr start conditional block if expr is true _.INCLUDE file include code from another file _.LFLOAT itemlist store 8-byte floating-point number(s) _.LINENO expr set listing line number _.LIST items enable listing of .IF, .INCLUDE, .MACRO, and .TEXT _.MACRO name start macro definition _.OPTION expr choose assembly option _.ORG expr set assembly location to value of expression _.PAGE ["title"] start new listing page, with optional "title" _.PROCESSOR type assemble for a particular processor type: m68000, m68008, m68010, m68012, or data _.PSECT name switch program section to __text or __data _.PUBLIC symbols declare symbols in this module as globals _.REPEAT start repeat block _.SET symb=expr set redefinable symbol value to expression _.TEXT "string" store string(s) _.TITLE "string" define default page header _.WORD itemlist store word(s) .f.B1 2 Examples .b1 $ X68000 -E- +L -F PROG.S .P0 Assembles file PROG.S, displaying errors on the terminal (-E- flag), and a listing to file PROG.LIS (+L flag). The listing will be produced even if there are assembly errors (-F), but no object file will be output (no -O specification). .b2 $ X68000 -OFILE.O -LLP_: -NLP_: -G -Pm68010 FILE.T .p0 Assembles FILE.T, with a listing and symbol table to the lineprinter, and object file FILE.O. Note that the object file must be named explicitly, with the -O flag, since the source filetype is not S, so +O defaulting will not work. Similarly, -L is used to explicitly name the printer for listing and symbol table files. The -G flag defaults all unknown symbols to globals, and -Pm68010 specifies assembly for a 68010 processor (alternatively, an embedded _.PROCESSOR directive could have been used). .b1 2 Bugs .p0 The following bugs are known in X68000 version 1.6.1, and have been reported to Real Time Systems:- .list 1 .le;The list file does not show all of the stored code for data storage directives (.BYTE etc.) which have more than one item or generate more than four bytes. .le;The following instructions are accepted on all processors, although they are valid only on the 68010 and 68012: .b1.lm+13.nf move####ccr,dest movec###sfc,dest movec###dfc,dest movec###usp,dest movec###vbr,dest moves###src,dest rtd#####_#data .lm-13.f.LE;The assembler crashes with an ACCVIO trap if an error occurs on incorrect instructions in certain formats, e.g_. moev 12345,d0. The listing file terminates at or before the error, and CTEMP_%._% workfiles may be left in your directory. .els0