*----------------------------------------------------------- * Title : * Written by : Luigi Coppolino * Date : * Description: each click to the button for IRQ1 makes the light go * around the led bank 1 step per click; IRQ2 ... 2 steps * per click. *----------------------------------------------------------- ORG $1000 START: ; first instruction of program * Put program code here ;prepare IRQ vector for autovector 1 move.l #irq1,$64 move.l #irq2,$68 MOVE.B #2, D1 MOVE.B #32, D0 TRAP #15 MOVEA.L D1,A0 CLR D2 MOVE.B #$80,(A0) ; switch off all the leds but one andi.w #$00,SR ;put CPU in User mode LOOP nop nop BRA LOOP LED_SWITCH irq1 MOVE.L D2,-(SP) MOVE.L D1,-(SP) MOVE.L D0,-(SP) MOVE.B #2, D1 MOVE.B #32, D0 TRAP #15 MOVEA.L D1,A0 MOVE.B (A0),D2 ; D2 is the status of LEDs ROR.B #1,D2 MOVE.B D2,(A0) MOVE.L (SP)+,D0 MOVE.L (SP)+,D1 MOVE.L (SP)+,D2 rte irq2 MOVE.L D2,-(SP) MOVE.L D1,-(SP) MOVE.L D0,-(SP) MOVE.B #2, D1 MOVE.B #32, D0 TRAP #15 MOVE.B (A0),D2 ; D2 is the status of LEDs ROR.B #2,D2 MOVE.B D2,(A0) MOVE.L (SP)+,D0 MOVE.L (SP)+,D1 MOVE.L (SP)+,D2 rte END START ; last line of source *~Font name~Courier New~ *~Font size~10~ *~Tab type~1~ *~Tab size~4~