Code: XDEF Entry XREF __SEG_END_SSTACK ; variable/data w MY_EXTENDED_RAM: SECTION ARR dc.b $0A,$12,$14,$0C,$0 port_p equ $258 ddrp equ $25A MY_CONSTANT_ROM: SECTION ; constant/definition section ; code section MyCode: SECTION main: _Startup: Entry: ldaa #$1e ;load the proper direction modes to acc. A staa ddrp ;push the direction modes into port P DDR loop: ldx #ARR ;load the start of sequence of bytes to spin the motor into ;register X loop1: ldaa 1,x+ ;load into A the first value of the array cmpa #0 ;check that we are not at the end of the array beq loop ;if we are at the end of the array, reload the first array ;value staa port_p ;push the value in accumulator A to port P, spinning the ;motor one quarter turn ldy #30000 ;load into register Y the amount by which we will delay ;loop execution delay1: dey ;decrement our delay value by 1 bne delay1 ;if we have not decreased our delay value to zero, continue ;decrementing our array value bra loop1 ;repeat the code which turns the motor