Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $regfile " reg51.dat"
- $crystal = 12000000
- Declare Sub Tombol
- Main:
- Call Tombol
- Goto Main
- Sub Tombol:
- If P1.0 = 0 Then Goto Nyala
- If P1.1 = 0 Then Goto Kuning
- If P1.2 = 0 Then Goto Mati
- End Sub
- Nyala:
- Wait 2
- Nyala1:
- 'merah semua
- Call Tombol
- P0 = &HF6
- P2 = &HF6
- Call Tombol
- Wait 1
- 'kidul nyala
- Call Tombol
- P0 = &HF3
- P2 = &HF6
- Call Tombol
- Wait 3
- 'kidul kuning kuning
- Call Tombol
- P0 = &HF5
- P2 = &HF6
- Waitms 500
- P0 = &HF7
- P2 = &HF6
- Waitms 500
- P0 = &HF5
- P2 = &HF6
- Waitms 500
- P0 = &HF7
- P2 = &HF6
- Waitms 500
- P0 = &HF5
- P2 = &HF6
- Waitms 500
- P0 = &HF7
- P2 = &HF6
- Waitms 500
- Call Tombol
- 'merah semua
- Call Tombol
- P0 = &HF6
- P2 = &HF6
- Call Tombol
- Wait 1
- 'kulon nyala
- Call Tombol
- P0 = &HDE
- P2 = &HF6
- Call Tombol
- Wait 3
- 'kulon kuning kuning
- Call Tombol
- P0 = &HEE
- P2 = &HF6
- Waitms 500
- P0 = &HFE
- P2 = &HF6
- Waitms 500
- P0 = &HEE
- P2 = &HF6
- Waitms 500
- P0 = &HFE
- P2 = &HF6
- Waitms 500
- P0 = &HEE
- P2 = &HF6
- Waitms 500
- P0 = &HFE
- P2 = &HF6
- Waitms 500
- Call Tombol
- 'merah semua
- Call Tombol
- P0 = &HF6
- P2 = &HF6
- Call Tombol
- Wait 1
- 'lor nyala
- Call Tombol
- P0 = &HF6
- P2 = &HF3
- Call Tombol
- Wait 3
- 'lor kuning kuning
- Call Tombol
- P0 = &HF6
- P2 = &HF5
- Waitms 500
- P0 = &HF6
- P2 = &HF7
- Waitms 500
- P0 = &HF6
- P2 = &HF5
- Waitms 500
- P0 = &HF6
- P2 = &HF7
- Waitms 500
- P0 = &HF6
- P2 = &HF5
- Waitms 500
- P0 = &HF6
- P2 = &HF7
- Waitms 500
- Call Tombol
- 'merah semua
- Call Tombol
- P0 = &HF6
- P2 = &HF6
- Call Tombol
- Wait 1
- 'etan nyala
- Call Tombol
- P0 = &HF6
- P2 = &HDE
- Call Tombol
- Wait 3
- 'etan kuning kuning
- Call Tombol
- P0 = &HF6
- P2 = &HEE
- Waitms 500
- P0 = &HF6
- P2 = &HFE
- Waitms 500
- P0 = &HF6
- P2 = &HEE
- Waitms 500
- P0 = &HF6
- P2 = &HFE
- Waitms 500
- P0 = &HF6
- P2 = &HEE
- Waitms 500
- P0 = &HF6
- P2 = &HFE
- Waitms 500
- Call Tombol
- Goto Nyala1
- Kuning:
- Wait 2
- Kuning1:
- Call Tombol
- P0 = &HED
- P2 = &HED
- Waitms 500
- P0 = &HFF
- P2 = &HFF
- Waitms 500
- Call Tombol
- Goto Kuning1
- Mati:
- Wait 2
- Mati1:
- Call Tombol
- P0 = &HFF
- P2 = &HFF
- Call Tombol
- Goto Mati1
- End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement