Posted by : dst Kamis, 29 Januari 2015

ORG 0H

Jalan:    Mov    P0,#11111111B
        Call     Delay
        Mov     P0,#00000000B
        Call     Delay
   
Gantian:Mov    P0,#01010101B
    Call     Delay
    Mov     P0,#10101010B
    Call     Delay
   
Tengah:    Mov    P0, #00011000B
    Call     Delay
    Mov     P0,#11100111B
    Call     Delay
   
Mulai:    Mov    A,  #11111110B
        Mov    R0, #7

Kiri:    Mov    P0, A
        CALL    Delay
        RL    A
        DEC    R0
        CJNE    R0, #0, Kiri
        MOV    R0, #7

Kanan:    MOV    P0, A
           Call     Delay
        RR     A
        DEC     R0
           CJNE     R0, #0, Kanan
        SJMP     Start

Delay:    MOV    R1,    #255
Del1:    MOV    R2,    #255
Del2:     DJNZ    R2,    del2
           DJNZ    R1,    del1
           RET
        END

Leave a Reply

Subscribe to Posts | Subscribe to Comments

- Copyright © Bahasa Pemrograman - Hatsune Miku - Powered by Blogger - Designed by Johanes Djogan -