THE HC11: A B [========|========] D [=================] X [=================] Y [=================] ; registers A and B are just the ; top and bottom halves of D. ; X and Y are index registers. ; A and B are 8 bits each, ; D, X, and Y are 16 bits. ; This gives you only three ; registers to play with... so you ; will become friends with the ; stack very soon. NOTES: * If you modify D, A and B will be modified. * Integer constants work much like in C. 74, 0112, 0x4A, 0X4a, and 'J' are all the same value to the assembler. * Labels must be in the first column. Everything else should be indented by at least one block. --------------------+------------------- HC11 INSTRUCTION MAL "EQUIVALENT" --------------------+------------------- jsr jal ; jump subroutine rts jr ; except that rts is inherent, i.e. ; it knows where you want to go. ; you don't have to provide a ; destination like in MAL's jr $ra jmp j bra b ; branches are fairly similar, except ; you should compare before branching ; with cmpa,cmpb,cba,cpd,cpx,cpy THE STACK: psha,pshb,pshx,pshy pula,pulb,pulx,puly ; pushing and pulling from the stack ; automatically uses the built-in ; system stack and incra- or decraments ; the stack pointer for you Check Chapter 6 in the M68HC11 Reference Manual for more details. Happy pushing, alex; updated 11/19/01 (talby)