Multicolor scrolling textu v borderi

Zdrojový kód


3      5b00            *s
4      5b00            ;==============================================================;
5      5b00            ;== Verzia 38 == Pismo v borderi == 06.3.91 == Busy software ==;
6      5b00            ;==============================================================;
7      5b00                   org  #80ff
8      80ff 3981       z      dw   rut
9      8101 f3         p      di
10     8102 31e080            ld   sp,#80e0
11     8105 21ed71            ld   hl,#71ed
12     8108 229383            ld   (video),hl
13     810b 219383            ld   hl,video
14     810e 119583            ld   de,video+2
15     8111 01dc03            ld   bc,38*26
16     8114 edb0              ldir
17     8116 36c9              ld   (hl),#c9
18     8118             
19     8118 213582     d      ld   hl,e0
20     811b 112582            ld   de,reg0
21     811e 011000            ld   bc,16
22     8121 edb0              ldir
23     8123             
24     8123 3e80       im2    ld   a,#80
25     8125 ed47              ld   i,a
26     8127 ed5e              im2
27     8129 fb                ei
28     812a 2640       loop   ld   h,#40
29     812c 1600              ld   d,#00
30     812e eda0              ldi
31     8130 eda0              ldi
32     8132 eda0              ldi
33     8134 eda0              ldi
34     8136 76                hlt
35     8137 18f1              jr   loop
36     8139             
37     8139 f5         rut    push af
38     813a c5                push bc
39     813b d5                push de
40     813c e5                push hl
41     813d 013301            ld   bc,#0133
42     8140 0b         www    dec  bc
43     8141 78                ld   a,b
44     8142 b1                or   c
45     8143 20fb              jr   nz,www
46     8145 1801       s44    jr   sss
47     8147 00                nop
48     8148 00         sss    nop
49     8149             
50     8149 ed4b2582          ld   bc,(reg0)
51     814d ed5b2782          ld   de,(reg2)
52     8151 79                ld   a,c
53     8152 0efe              ld   c,#fe
54     8154 cd9383            call video
55     8157             
56     8157 3e                db   #3e
57     8158 01         cc1    db   #01
58     8159 3d                dec  a
59     815a c2f181            jp   nz,cc2
60     815d             
61     815d 2a2d82            ld   hl,(con1)
62     8160 cd0f82            call poc
63     8163 2a2f82            ld   hl,(con2)
64     8166 cd0f82            call poc
65     8169 2a3182            ld   hl,(con3)
66     816c cd0f82            call poc
67     816f 2a3382            ld   hl,(con4)
68     8172 cd0f82            call poc
69     8175             
70     8175 3e                db   #3e
71     8176 01         cc5    db   #01
72     8177 3d                dec  a
73     8178 2032              jr   nz,cc4
74     817a             
75     817a 21f982     addtxt ld   hl,text
76     817d 7e                ld   a,(hl)
77     817e b7                or   a
78     817f 2019              jr   nz,adtxt
79     8181             
80     8181 214582     addeff ld   hl,e1
81     8184 7e                ld   a,(hl)
82     8185 3c                inc  a
83     8186 2003              jr   nz,adef
84     8188 213582            ld   hl,e0
85     818b 112582     adef   ld   de,reg0
86     818e 011000            ld   bc,16
87     8191 edb0              ldir
88     8193 228281            ld   (addeff+1),hl
89     8196             
90     8196 21f982            ld   hl,text
91     8199 7e                ld   a,(hl)
92     819a 23         adtxt  inc  hl
93     819b 227b81            ld   (addtxt+1),hl
94     819e 6f                ld   l,a
95     819f 2600              ld   h,#00
96     81a1 119781            ld   de,znaky-#0184
97     81a4 29                add  hl,hl
98     81a5 29                add  hl,hl
99     81a6 19                add  hl,de
100    81a7 22b081            ld   (addzn+1),hl
101    81aa             
102    81aa 3e04              ld   a,#04
103    81ac 327681     cc4    ld   (cc5),a
104    81af             
105    81af 215555     addzn  ld   hl,#5555
106    81b2 4e                ld   c,(hl)
107    81b3 23                inc  hl
108    81b4 22b081            ld   (addzn+1),hl
109    81b7 dd21ba83          ld   ix,video+39
110    81bb 0606              ld   b,#06
111    81bd cb01              rlc  c
112    81bf cb01              rlc  c
113    81c1 cb01       znloop rlc  c
114    81c3 1671              ld   d,#71
115    81c5 5a                ld   e,d
116    81c6 62                ld   h,d
117    81c7 6a                ld   l,d
118    81c8 3007              jr   nc,znpoke
119    81ca ed5b2982          ld   de,(out0)
120    81ce 2a2b82            ld   hl,(out2)
121    81d1 dd7200     znpoke ld   (ix+0*38),d
122    81d4 dd7326            ld   (ix+1*38),e
123    81d7 dd744c            ld   (ix+2*38),h
124    81da dd7572            ld   (ix+3*38),l
125    81dd 119800            ld   de,4*38
126    81e0 dd19              add  ix,de
127    81e2 10dd              djnz znloop
128    81e4             
129    81e4 219583            ld   hl,video+2
130    81e7 119383            ld   de,video
131    81ea 01b603            ld   bc,25*38
132    81ed edb0              ldir
133    81ef 3e03              ld   a,#03
134    81f1 325881     cc2    ld   (cc1),a
135    81f4 2f                cpl
136    81f5 e603              and  #03
137    81f7 324681            ld   (s44+1),a
138    81fa             
139    81fa e1         rend   pop  hl
140    81fb d1                pop  de
141    81fc c1                pop  bc
142    81fd 3ebf              ld   a,#bf
143    81ff dbfe              in   a,(#fe)
144    8201 0f                rrca
145    8202 3003              jr   nc,mrs
146    8204 f1                pop  af
147    8205 fb                ei
148    8206 c9                ret
149    8207             
150    8207 ed56       mrs    im1
151    8209 af                xor  a
152    820a ed47              ld   i,a
153    820c c3b3f4            jp   #f4b3
154    820f             
155    820f 7e         poc    ld   a,(hl)
156    8210 cb7f              bit  7,a
157    8212 2009              jr   nz,pp1
158    8214 3c                inc  a
159    8215 cb5f              bit  3,a
160    8217 280a              jr   z,pocend
161    8219 3e87              ld   a,#87
162    821b 1806              jr   pocend
163    821d 3d         pp1    dec  a
164    821e cb7f              bit  7,a
165    8220 2001              jr   nz,pocend
166    8222 af                xor  a
167    8223 77         pocend ld   (hl),a              #00..#07
168    8224 c9                ret                      #87..#80
169    8225             
170    8225 0001       reg0   dw   #0100               hodnota v registri
171    8227 0203       reg2   dw   #0302               (podla poradia)
172    8229 7941       out0   dw   #4179               out na   >41-79
173    822b 5951       out2   dw   #5159               register  51-59
174    822d 0000       con1   dw   0                   4*pocitadlo
175    822f 0000       con2   dw   0
176    8231 0000       con3   dw   0
177    8233 0000       con4   dw   0                   Spolu 16 bajtov
178    8235             
179    8235 05070705   e0     dw   #0705,#0507         0
180    8239 79415951          dw   #4179,#5159
181    823d 00000000          dw   #00,#00,#00,#00
            00000000    
182    8245             
183    8245 00870000   e1     dw   #8700,0,#4141,#7979 1
            41417979    
184    824d 25822682          dw   reg0,reg0+1
185    8251 00000000          dw   #00,#00
186    8255             
187    8255 00000000          dw   0,0,#4179,#4179     2
            79417941    
188    825d 00002582          dw   0,reg0,reg0,reg0+1
            25822682    
189    8265             
190    8265 00020000          dw   #0200,0,#4179,#7941 3
            79414179    
191    826d 25820000          dw   reg0,0,0,0
            00000000    
192    8275             
193    8275 87000000          dw   #87,0,#4179,#4179   4
            79417941    
194    827d 00002582          dw   0,reg0,reg0,reg0+1
            25822682    
195    8285             
196    8285 00010203          dw   #0100,#0302         5
197    8289 79415951          dw   #4179,#5159
198    828d 25822682          dw   reg0,reg0+1
199    8291 27822882          dw   reg2,reg2+1
200    8295             
201    8295 05010000          dw   #0105,0,#4179,#7941 6
            79414179    
202    829d 00000000          dw   0,0,0,0
            00000000    
203    82a5             
204    82a5 00048783          dw   #0400,#8387         7
205    82a9 79415951          dw   #4179,#5159
206    82ad 25822682          dw   reg0,reg0+1
207    82b1 27822882          dw   reg2,reg2+1
208    82b5             
209    82b5 00000000          dw   0,0,#7979,#7979     8
            79797979    
210    82bd 25822582          dw   reg0,reg0,reg0,#00
            25820000    
211    82c5             
212    82c5 00040087          dw   #0400,#8700         9
213    82c9 79417951          dw   #4179,#5179
214    82cd 27822582          dw   reg2,reg0
215    82d1 25822682          dw   reg0,reg0+1
216    82d5             
217    82d5 ff                db   #ff
218    82d6             
219    82d6 736b7873   t2     db   'skxsm~~~~~~~~~~~~'
            6d7e7e7e    
            7e7e7e7e    
            7e7e7e7e    
            7e          
220    82e7 7e7e7e7e          db   '~~~~~~~~~~~~~~~~~'
            7e7e7e7e    
            7e7e7e7e    
            7e7e7e7e    
            7e          
221    82f8 00                db   #00
222    82f9 62757379   t1     db   'busy}soft}'
            7d736f66    
            747d        
223    8303 70726573          db   'present}'
            656e747d    
224    830b 6d64617d          db   'mda}demo'
            64656d6f    
225    8313 7b7b7b7d          db   '{{{}}}}'
            7d7d7d      
226    831a 00                db   #00
227    831b             
228    831b            text   =    t1
229    831b             
230    831b            znaky
231    831b 0f140f00   ag     db   #0f,#14,#0f,#00
232    831f 1f150a00          db   #1f,#15,#0a,#00
233    8323 1f111100          db   #1f,#11,#11,#00
234    8327 1f110e00          db   #1f,#11,#0e,#00
235    832b 1f151500          db   #1f,#15,#15,#00
236    832f 1f141400          db   #1f,#14,#14,#00
237    8333 1f111300          db   #1f,#11,#13,#00
238    8337             
239    8337 1f041f00   hl     db   #1f,#04,#1f,#00
240    833b 001f0000          db   #00,#1f,#00,#00
241    833f 03011f00          db   #03,#01,#1f,#00
242    8343 1f041b00          db   #1f,#04,#1b,#00
243    8347 1f010100          db   #1f,#01,#01,#00
244    834b             
245    834b 1f0c1f00   ms     db   #1f,#0c,#1f,#00
246    834f 1f101f00          db   #1f,#10,#1f,#00
247    8353 1f111f00          db   #1f,#11,#1f,#00
248    8357 1f141c00          db   #1f,#14,#1c,#00
249    835b 1f131f00          db   #1f,#13,#1f,#00
250    835f 1f161d00          db   #1f,#16,#1d,#00
251    8363 1d151700          db   #1d,#15,#17,#00
252    8367             
253    8367 101f1000   tz     db   #10,#1f,#10,#00
254    836b 1f011f00          db   #1f,#01,#1f,#00
255    836f 1e011e00          db   #1e,#01,#1e,#00
256    8373 1e031e00          db   #1e,#03,#1e,#00
257    8377 1b041b00          db   #1b,#04,#1b,#00
258    837b 1c071c00          db   #1c,#07,#1c,#00
259    837f 13151900          db   #13,#15,#19,#00
260    8383             
261    8383 03000300          db   #03,#00,#03,#00
262    8387 04040400          db   #04,#04,#04,#00
263    838b 00000000          db   #00,#00,#00,#00
264    838f ffffffff          db   #ff,#ff,#ff,#ff
265    8393            k
266    8393            video  ds   38*25
267    8749            kk
268    8749            ll     =    kk-z
269    8749            l      =    k-z
270    8749                   end

 addeff 8181  *  addtxt 817a  *  addzn  81af  *  adef   818b  *
 adtxt  819a  *  ag     831b  *  cc1    8158  *  cc2    81f1  *
 cc4    81ac  *  cc5    8176  *  con1   822d  *  con2   822f  *
 con3   8231  *  con4   8233  *  d      8118  *  e0     8235  *
 e1     8245  *  hl     8337  *  im2    8123  *  k      8393  *
 kk     8749  *  l      0294  *  ll     064a  *  loop   812a  *
 mrs    8207  *  ms     834b  *  out0   8229  *  out2   822b  *
 p      8101  *  poc    820f  *  pocend 8223  *  pp1    821d  *
 reg0   8225  *  reg2   8227  *  rend   81fa  *  rut    8139  *
 s44    8145  *  sss    8148  *  t1     82f9  *  t2     82d6  *
 text   82f9  *  tz     8367  *  video  8393  *  www    8140  *
 z      80ff  *  znaky  831b  *  znloop 81c1  *  znpoke 81d1  *

Bytes:660  labels:48  errors:0   


Popis
Tento program scrolluje dany text v borderi. Kedze ULA v borderi umoznuje zobrazovanie pixelov sirokych 8 bodov, je pismo pomerne siroke a scrolluje dost rychlo. Tento scroll bol pouzity v MDA deme.

Poznámky
Program je casovany pre Spektrum 128k a +2. Mal by fungovat aj na +2A a +3.

Poslal
Busy