;get data from SWs on P1 and send it to LEDs on P2 on MDE 8051 Trainer ;Tested by Mazidi ;Modified from Examples in Chap 4 of 8051 Microcontroller book by Mazidis & McKinlay ;Using wires connect the P1 to Swiches and P2 to LEDs. ;Any data on switches will go to LEDs ORG 0 MOV A,#0 MOV P2,A ;P2 as output MOV A,#0FFH MOV P1,A ;P1 AS INPUT BACK: MOV A,P1 ;get data from SWs on P1 MOV P2,A ;send it to LEDs on P2 SJMP BACK ;keep doing it END