*----------------------------------------------------------- * Title : * Written by : Luigi Coppolino * Date : * Description: While pushing a pushbutton the light goes around * the led bank. *----------------------------------------------------------- ORG $1000 START: ; first instruction of program * Put program code here CLR.B D1 CLR D2 MOVEA.L #HEX,A0 ; A0 points to mapped hardware MOVE.B #0,LED(A0) ; switch off all the leds CLR.L D0 ; previous status MOVE.B #1,D2 MOVE.B D2,LED(A0) LOOP MOVE.B PUSH(A0),D1 ; current status CMP.B #$FF,D1 BEQ LOOP LED_SWITCH ROR.B #1,D2 MOVE.B D2,LED(A0) BRA LOOP SIMHALT ; halt simulator * Put variables and constants here DISP EQU 0 LED EQU $10 SWITCH EQU $12 PUSH EQU $14 HEX EQU $E00000 END START ; last line of source *~Font name~Courier New~ *~Font size~10~ *~Tab type~1~ *~Tab size~4~