DK 8 LED
;baitap: viett chuong trinh cho vxl thuc hien
;DK 8 LED NOI VOI CONG LPT : CHOP TAT 10 LAN, XEN KE 5 LAN,SANG DAN TAT DAN 2 LAN,1 DIEM SANG CHAY 5 LAN SAU DO ;AP LAI TU DAU
;-------------------------------
.MODEL SMALL
.STACK 100
.data
ten : db 9,"DK 8 LED NOI VOI CONG LPT : CHOP TAT 10 LAN, XEN KE 5 LAN,SANG DAN TAT DAN 2 LAN,1 DIEM SANG CHAY 5 LAN SAU DO ;AP LAI TU DAU$"
.code
main proc
mov ax,@data
mov ds,ax
lea dx,ten
mov ah,9
int 21h
mov dx,378h
;-------------
lap:
mov cx,10
choptat:
mov al,0
out dx,al
call delay
mov al,0ffh
out dx,al
call delay
loop choptat
mov cx,5
xenke:
mov al,0aah
out dx,al
call delay
mov al,55h
out dx,al
call delay
loop xenke
mov cx,2
sang:
mov al,0
sang1:
stc
rcl al,1
out dx,al
call delay
jnc sang1
tat:
clc
rcl al,1
out dx,al
call delay
jc tat
loop sang
mov cx,5
sangchay:
mov al,0
stc
sag:
rcl al,1
out dx,al
jnc sang
loop sangchay
jmp lap
main endp
delay:
push cx
mov cx,20
loop $
pop cx
end main
Bạn đang đọc truyện trên: AzTruyen.Top