I want to Write a program to read a value from the push buttons and display that value on the LEDs. The program should run continuously and as the push buttons are changed, the display changes. I tried many ways but it does not show any thing in Could any one help me to know where is the problem.
LEDS EQU $E00010 ;LEDS adress
BUTTON EQU $E00014 ;BUTTON address
ORG $400 ;start of program area
START
Loop MOVE.B #2,D0
MOVE.B BUTTON,D1 ;move the value of button to D1
MOVE.B D2,LEDS
NOT.B D1 ;take NOT to flip the value in order to present it in LEDS
MOVE.B D1,D2 ;move the value to LEDS
SUB.B #2,D0 ; if D0 =0 then loop again
BEQ Loop
SIMHALT
END START