^^ EXTRACTS FROM THE DEVPAC 3.02 MANUAL Typed up by Zebedee / A51 OPTIONS a+ Use PC mode addressing where poss (Override: move.l (label).l,d0) c+ Case sensitivity on (c- off) d+ Enable debug information (x+ in linkable mode only exported symbols) l+ Make code linkable (must be very first line in code) m+ Enable instructions within macros to be listed o1+ Optimize backward branches if within range o2+ Optimize address register indirect with displacement addressing o+ All optimisations enabled ow- Disable all optimisation warnings generated by each optimisation p+ Position independant checks s+ Symbol table t+ Type checking u+ Underline for all local labels instead of dot w- Disable warnings x+ Export Debug (Only outputs the exported (XDEF) symbols CONDITIONAL ASSEMBLY ifeq expression ifne expression ifgt expression ifge expression iflt expression ifle expression ifeq debug logon dc.b 'Enter a command:',0 endc ifne debug logon dc.b 'Yeah, gimme man:',0 endc ARITHMETIC OPERATIONS ADD source,dest Binary addition ADDA source,An Binary addition to an address register ADDI #n, Addition with a constant ADDQ #n, Fast addition of a constant which can be only from 1-8 ADDX source,dest Addition with transfer in X flag CLR Clear an operand CMP source,dest Comparison of two operands CMPA ,An Comparison with an address register CMPI #n, Comparison with a constant CMPM source,dest Comparison of two memory operands DIVS source,dest Sign-true division of a 32 bit destination by a 16 bit source operand. The result of the division is stored in the LO word of the destination, the remainder in the HI word. DIVU source,dest Division without regard to sign, similar to DIVS EXT Dn Sign-true expansion to twice original size (width) data unit. MULS source,dest Sign-true multiplication of two words into one long word MULU source,dest Multiplication without regard to sign, similar to MULS NEG Negation of an operand (twos complement) NEGX Negation of an operand with transfer SUB source,dest Binary subtraction SUBA ,An Binary subtraction from an address register SUBI #n, Subtraction of a constant SUBQ #n, Fast subtraction of a 3 bit constant SUBX source,dest Subtraction with transfer in X flag TST Test an operand and set N and Z flag ARITHMETIC OPERATIONS WITH BCD (BINARY CODED DECIMAL) NUMBERS ABCD source,dest Addition of two BCD numbers NBCD source,dest Negation of a BCD number (nine complement) SBCD source,dest Subtraction of two BCD numbers LOGICAL OPERATIONS AND source,dest Logic AND ANDI #n, Logic AND with a constant EOR source,dest Exclusive OR EORI #n, Exclusive OR with a constant NOT Inversion of an operand OR source,dest Logic OR ORI #n, Logic OR with a constant TAS Check a byte and set bit 7 BIT OPERATIONS BCHG #n, Change bit n (0 is changed to 1 and vice versa) BCLR #n, Clear bit n BSET #n, Set bit n BTST #n, Test bit n, result is displayed in Z flag SHIFTING & ROTATING OPERANDS ASL n, Arithmetic shift to the left (*2^n) ASR n, Arithmetic shift to the right (/2^n) LSL n, Logic shift to the left LSR n, Logic shift to the right ROL n, Rotation left ROR n, Rotation right ROXL n, Rotation left with transfer in X flag ROXR n, Rotation right with transfer in X flag MOVING DATA EXG Rn,Rn Exchange of two register contents (don't confuse with SWAP LEA ,An Load an effective address in address register An LINK An,#n Build stack range MOVE source,dest Carry value over from source to destination MOVE SR, Transfer the status register contents MOVE ,SR Transfer the status register contents MOVE ,CCR Load flags MOVE USP, Transfer the user stack pointer MOVE ,USP Transfer the user stack pointer MOVEA ,An Transfer a value to the address register An MOVEM Regs, Transfer several registers at once MOVEM ,Regs Transfer several registers at once MOVEP source,dest Transfer data to peripherals MOVEQ #n,Dn Quickly transfer an 8 bit constant to the data register Dn PEA Deposit an address on the stack SWAP Dn Swap the halves of the register (the upper 16 bits with the lower) UNLK An Unlink the stack end!