Program Zilog-80
”FIRE LOOP”
Bergerak ke Kanan Atau ke Kiri Saja
Mhd Zainal Arif H
A. Zainal Bergerak ke Kanan
ADRS OBJ C STMT Source Statement
1. ”Program FIRE LOOP”
2. segmen menyala satu persatu sampai tombol STEP ditekan
3. Tombol yang lain akan menyebabkan LOOP lagi
4.1800
5 ORG 1800 H 1800 214018
6 INI LD HL, TABEL 1803 DD210019
7 LD IX, OUTBF 1807 CD3018
8 LOOP CALL CLRBF 180A 5E
9 LD E, (HL) 180B 1C
10 INC E 180C 28F2
5 ORG 1800 H 1800 214018
6 INI LD HL, TABEL 1803 DD210019
7 LD IX, OUTBF 1807 CD3018
8 LOOP CALL CLRBF 180A 5E
9 LD E, (HL) 180B 1C
10 INC E 180C 28F2
11 JR Z,INI 180E 1D
12 DEC E 180F 1600
13 LD D,0 1811 DD19
14 ADD IX,DE
12 DEC E 180F 1600
13 LD D,0 1811 DD19
14 ADD IX,DE
15 1813 23
16 INC HL 1814 7E
17 LD A,(HL) 1815 DD7700
18 LD (IX),A 1818 DD210019
19 LD IX,OUTBF 181C 0603
20 LD B,SPEED
16 INC HL 1814 7E
17 LD A,(HL) 1815 DD7700
18 LD (IX),A 1818 DD210019
19 LD IX,OUTBF 181C 0603
20 LD B,SPEED
21
22
23
24 181E CD2406
25 LIGHT CALL SCAN1 1821 3801
26 JR C, NSCAN 1823 4F
27 LD C,A
25 LIGHT CALL SCAN1 1821 3801
26 JR C, NSCAN 1823 4F
27 LD C,A
28
29 1824 10F8
30 NSCAN DJNZ LIGHT
30 NSCAN DJNZ LIGHT
31 1826 79
32 LD A,C 1827 FE10
33 CP 10H 1829 2802
34 JR Z,STOP
32 LD A,C 1827 FE10
33 CP 10H 1829 2802
34 JR Z,STOP
35
36 182B 23
37 INC HL 182C 23
38 INC HL 182D 2B
39 STOP DEC HL 182E 18D7
40 JR LOOP
37 INC HL 182C 23
38 INC HL 182D 2B
39 STOP DEC HL 182E 18D7
40 JR LOOP
41
42
43 CLRBF 1830 0606
44 LD B,6 1832 DD360000
45 CLR LD (IX),0 1836 DD23
46 INC IX 1838 10F8
47 DJNZ CLR 183A 11FAFF
48 LD DE,-6 183D DD19
49 ADD IX, DE 183F C9
50 RET
44 LD B,6 1832 DD360000
45 CLR LD (IX),0 1836 DD23
46 INC IX 1838 10F8
47 DJNZ CLR 183A 11FAFF
48 LD DE,-6 183D DD19
49 ADD IX, DE 183F C9
50 RET
51
52
53
54 1840 05
55 TABLE DEFB 5 1841 9B
56 DEFB Z 1842 04
57 DEFB 4 1843 3F
58 DEFB A 1844 03
59 DEFB 3 1845 30
60 DEFB I 1846 02
61 DEFB 2 1847 3D
62 DEFB N 1848 01
63 DEFB 1 1849 3F
64 DEFB A 184A 00
65 DEFB 0 184B 85
66 DEFB L 184C FF
67 DEFB 0FFH
55 TABLE DEFB 5 1841 9B
56 DEFB Z 1842 04
57 DEFB 4 1843 3F
58 DEFB A 1844 03
59 DEFB 3 1845 30
60 DEFB I 1846 02
61 DEFB 2 1847 3D
62 DEFB N 1848 01
63 DEFB 1 1849 3F
64 DEFB A 184A 00
65 DEFB 0 184B 85
66 DEFB L 184C FF
67 DEFB 0FFH
B. Zainal Bergerak ke Kiri
ADRS OBJ C STMT Source Statement
1. ”Program FIRE LOOP”
2. Segmen menyala satu persatu sampai tombol STEP ditekan
3. Tombol yang lain akan menyebabkan LOOP lagi
4. 1800
5 ORG 1800 H 1800 214018
6 INI LD HL, TABEL 1803 DD210019
7 LD IX, OUTBF 1807 CD3018
8 LOOP CALL CLRBF 180A 5E
9 LD E, (HL) 180B 1C
10 INC E 180C 28F2
11 JR Z,INI 180E 1D
12 DEC E 180F 1600
13 LD D,0 1811 DD19
14 ADD IX,DE
5 ORG 1800 H 1800 214018
6 INI LD HL, TABEL 1803 DD210019
7 LD IX, OUTBF 1807 CD3018
8 LOOP CALL CLRBF 180A 5E
9 LD E, (HL) 180B 1C
10 INC E 180C 28F2
11 JR Z,INI 180E 1D
12 DEC E 180F 1600
13 LD D,0 1811 DD19
14 ADD IX,DE
15 1813 23
16 INC HL 1814 7E
17 LD A,(HL) 1815 DD7700
18 LD (IX),A 1818 DD210019
19 LD IX,OUTBF 181C 0603
20 LD B,SPEED
16 INC HL 1814 7E
17 LD A,(HL) 1815 DD7700
18 LD (IX),A 1818 DD210019
19 LD IX,OUTBF 181C 0603
20 LD B,SPEED
21
22
23
24 181E CD2406
25 LIGHT CALL SCAN1 1821 3801
26 JR C, NSCAN 1823 4F
27 LD C,A
25 LIGHT CALL SCAN1 1821 3801
26 JR C, NSCAN 1823 4F
27 LD C,A
28
29 1824 10F8
30 NSCAN DJNZ LIGHT
30 NSCAN DJNZ LIGHT
31 1826 79
32 LD A,C 1827 FE10
33 CP 10H 1829 2802
34 JR Z,STOP
32 LD A,C 1827 FE10
33 CP 10H 1829 2802
34 JR Z,STOP
35
36 182B 23
37 INC HL 182C 23
38 INC HL 182D 2B
39 STOP DEC HL 182E 18D7
40 JR LOOP
37 INC HL 182C 23
38 INC HL 182D 2B
39 STOP DEC HL 182E 18D7
40 JR LOOP
41
42
43 CLRBF 1830 0606
44 LD B,6 1832 DD360000
45 CLR LD (IX),0 1836 DD23
46 INC IX 1838 10F8
47 DJNZ CLR 183A 11FAFF
48 LD DE,-6 183D DD19
49 ADD IX, DE 183F C9
50 RET
44 LD B,6 1832 DD360000
45 CLR LD (IX),0 1836 DD23
46 INC IX 1838 10F8
47 DJNZ CLR 183A 11FAFF
48 LD DE,-6 183D DD19
49 ADD IX, DE 183F C9
50 RET
51
52
53
54 1840 00
55 TABLE DEFB 0 1841 9B
56 DEFB Z 1842 01
57 DEFB 1 1843 3F
58 DEFB A 1844 02
59 DEFB 2 1845 30
60 DEFB I 1846 03
61 DEFB 3 1847 3D
62 DEFB N 1848 04
63 DEFB 4 1849 3F
64 DEFB A 184A 05
65 DEFB 5 184B 85
66 DEFB L 184C FF
67 DEFB 0FFH
55 TABLE DEFB 0 1841 9B
56 DEFB Z 1842 01
57 DEFB 1 1843 3F
58 DEFB A 1844 02
59 DEFB 2 1845 30
60 DEFB I 1846 03
61 DEFB 3 1847 3D
62 DEFB N 1848 04
63 DEFB 4 1849 3F
64 DEFB A 184A 05
65 DEFB 5 184B 85
66 DEFB L 184C FF
67 DEFB 0FFH
1 komentar:
bingung ngeliat nyaa...
Posting Komentar