DATA SEGMENT PORTA EQU 00H PORTB EQU 02H PORTC EQU 04H PORT_CON EQU 06H DATA ENDS CODE SEGMENT MOV AX,DATA MOV DS, AX display macro value MOV AL, value MOV DX, PORTA OUT DX,AL call delay endm ORG 0000H START: MOV DX, PORT_CON MOV AL, 10000010B; port C (output), port A (output) in mode 0 and PORT B (INPUT) in mode 0 OUT DX, AL MOV AL, 11000000B MOV DX, PORTA OUT DX,AL x: display 11000000B display 11111001B display 10100100B display 10110000B display 10011001B display 10010010B display 10000010B display 11111000B display 10000000B display 10010000B jmp x delay proc mov cx,50000 l1: loop l1 ret delay endp CODE ENDS END