subroutines callers (sub or main routine) callees (subroutine) nested subroutines (subcalls) end a call with RTS instruction previous address stored in link register old address pushed on to stack lots of jibba jabba about making subroutines need to restore unspecified registers to previous state, registers assigned for inputs are fair game shift-add multiplication: set res to 0, for each bit in num 1, shift num2 by that much and add to total Hardcore way with no loops uses BIT.W and 8 hard coded bit masks loops way R4 = n1 R5 = n2 R6 = 7 R7 = temp reg R8 = 0 mloop: move R6,R7 shift #1,R7 as for assignments, quick core code for multiplication R4 = num1 R5 = num2 R6 = total aloop: CMP #0,R4 JEQ end DEC R4 ADD.W R5,R6 JMP aloop end: ;we're done here