*----------------------------------------------------------- * Title : * Written by : Luigi Coppolino * Date : * Description: Seven segment usage (Address E00000 to the leftmost digit * 2 bytes for each digit (the lower one controls the segments * 1 bit per segment *----------------------------------------------------------- ORG $1000 START: ; first instruction of program * Put program code here CLR D1 CLR D0 MOVEA.L #HEX,A0 SPEGNI MOVE.W D1,(A0,D0) ; 0 -> (A0) => every segment is switched off ADD.B #2,D0 CMP #$10,D0 BLT SPEGNI SCRIVI MOVE.B #C,(A0) MOVE.B #I,2(A0) MOVE.B #A,4(A0) MOVE.B #O,6(A0) SIMHALT ; halt simulator * Put variables and constants here HEX EQU $E00000 C EQU %00111001 I EQU %00000110 A EQU %01110111 O EQU %00111111 END START ; last line of source *~Font name~Courier New~ *~Font size~10~ *~Tab type~1~ *~Tab size~4~