DONG CO BUOC 1.8 DO

;baitap3: viet chuong trinh cho vxl

;DIEU KHIEN DONG CO BUOC CO GOC BUOC 1.8 DO , NHAN R DE QUAY THUAN 1 VONG, NHAN ENTER DE THOAT

;------------------------

.MODEL SMALL

.stack 100

.data

ten: db "DIEU KHIEN DONG CO BUOC CO GOC BUOC 1.8 DO , NHAN R DE QUAY THUAN 1 VONG, NHAN ENTER DE THOAT$"

.code

    main proc

        mov ax,@data

        mov ds,ax

        lea dx,ten

        mov ah,9

        int 21h 

    nhap:   

        mov ah,0

        int 16h

        cmp al,"R"

        je chay

        cmp al,13

        je thoat

        jmp nhap

    chay:

        mov cx,50

        moc dx,378h

    chay1:   

        mov al,1

        out dx,al

        call delay

        mov al,2

        out dx,al

        call delay

        mov al,4

        out dx,al

        call delay

        mov al,8

        out dx,al

        call delay

        loop chay1

        jmp nhap

        main endp

    thoat:

        mov ah,4ch

        int 21h

    end main           

Bạn đang đọc truyện trên: AzTruyen.Top

Tags: