]> 4ch.mooo.com Git - 16.git/blob - 16/xw_/mxcc.asm
more
[16.git] / 16 / xw_ / mxcc.asm
1                 PUBLIC  XSUBCLIPLINE
2                 EXTRN   MX_CLIPY1:BYTE
3                 EXTRN   MX_CLIPY2:BYTE
4                 EXTRN   MX_CLIPX2:BYTE
5                 EXTRN   MX_CLIPX1:BYTE
6                 EXTRN   MX_VIDEOSEGMENT:BYTE
7                 EXTRN   MX_BYTESPERLINE:BYTE
8 MX_TEXT         SEGMENT PARA PUBLIC USE16 'CODE'
9                 ASSUME CS:MX_TEXT, DS:DGROUP, SS:DGROUP
10 L$1:
11         or              al,byte ptr [bx+si]
12 L$2:
13     DW  offset L$3
14         or              al,byte ptr [bx+si]
15     DW  offset L$4
16         or              word ptr [bx+si],ax
17     DW  offset L$5
18 ;       ????
19         inc             word ptr [bx+si]
20         add             byte ptr [bp+si],cl
21         add             byte ptr 0a00H[bx+si],al
22         add             byte ptr 900H[bp],dl
23         add             byte ptr -100H[si],ch
24         inc             word ptr [bx+si]
25         add             byte ptr ds:[0c000H],al
26         add             byte ptr ds:[0ce00H],al
27         add             byte ptr [di],al
28         add             ah,bl
29         add             bh,bh
30         inc             word ptr [bx+si]
31         add             bh,bh
32         inc             word ptr [bx+si]
33         add             bh,bh
34         inc             word ptr [bx+si]
35         add             bh,bh
36         inc             word ptr [bx+si]
37         add             bh,bh
38         inc             word ptr [bx+si]
39     DB  0
40 L$3:
41     DW  offset MX_TEXT+0ecH
42     DW  offset MX_TEXT+0eeH
43     DW  offset MX_TEXT+0f1H
44     DW  offset MX_TEXT+0eaH
45     DW  offset MX_TEXT+0f4H
46     DW  offset MX_TEXT+0f7H
47     DW  offset MX_TEXT+104H
48     DW  offset MX_TEXT+0eaH
49     DW  offset MX_TEXT+111H
50     DW  offset MX_TEXT+114H
51     DW  offset MX_TEXT+121H
52 L$4:
53     DW  offset MX_TEXT+132H
54     DW  offset MX_TEXT+0eaH
55     DW  offset MX_TEXT+135H
56     DW  offset MX_TEXT+0eaH
57     DW  offset MX_TEXT+13bH
58     DW  offset MX_TEXT+0eaH
59     DW  offset MX_TEXT+148H
60     DW  offset L$7
61     DW  offset L$10
62     DW  offset L$7
63     DW  offset L$11
64 L$5:
65     DW  offset L$14
66     DW  offset L$15
67     DW  offset L$7
68     DW  offset L$7
69     DW  offset L$16
70     DW  offset L$17
71     DW  offset L$7
72     DW  offset L$7
73     DW  offset L$18
74     DW  offset L$19
75     DW  offset L$22
76     DW  offset L$23
77     DW  offset L$24
78     DW  offset L$7
79     DW  offset L$7
80     DW  offset L$7
81     DW  offset L$7
82     DW  offset L$7
83     DW  offset L$25
84     DW  offset L$26
85     DW  offset L$27
86     DW  offset L$30
87     DW  offset L$7
88     DW  offset L$31
89     DW  offset L$7
90     DW  offset L$7
91     DW  offset L$7
92     DW  offset L$7
93     DW  offset L$7
94     DW  offset L$32
95     DW  offset L$7
96     DW  offset L$33
97     DW  offset L$36
98     DW  offset L$37
99     DW  offset L$7
100     DW  offset L$7
101     DW  offset L$7
102     DW  offset L$7
103     DW  offset L$7
104     DW  offset L$7
105     DW  offset L$38
106     DW  offset L$39
107     DW  offset L$43
108     DW  offset L$44
109     DW  offset L$45
110     DW  offset L$7
111     DW  offset L$46
112     DW  offset L$47
113     DW  offset L$48
114     DW  offset L$51
115     DW  offset L$7
116     DW  offset L$52
117     DW  offset L$7
118     DW  offset L$53
119     DW  offset L$7
120     DW  offset L$54
121     DW  offset L$58
122     DW  offset L$59
123     DW  offset L$7
124     DW  offset L$7
125     DW  offset L$60
126     DW  offset L$61
127 L$6:
128         clc
129         ret
130 L$7:
131         stc
132         ret
133         clc
134         ret
135         jmp             near ptr L$67
136         jmp             near ptr L$68
137         jmp             near ptr L$70
138         call            near ptr L$67
139         cmp             si,word ptr cs:MX_CLIPY1
140         jge             L$6
141         jmp             near ptr L$70
142         call            near ptr L$68
143         cmp             si,word ptr cs:MX_CLIPY1
144         jge             L$6
145         jmp             near ptr L$70
146         jmp             near ptr L$69
147         call            near ptr L$67
148         cmp             si,word ptr cs:MX_CLIPY2
149         jle             L$6
150         jmp             near ptr L$69
151         call            near ptr L$68
152         cmp             si,word ptr cs:MX_CLIPY2
153         jle             L$6
154         jmp             near ptr L$69
155 L$8:
156         stc
157         ret
158 L$9:
159         clc
160         ret
161         jmp             near ptr L$63
162         call            near ptr L$63
163         jmp             near ptr L$68
164         call            near ptr L$63
165         cmp             bx,word ptr cs:MX_CLIPY1
166         jl              L$8
167         jmp             near ptr L$70
168         call            near ptr L$63
169         cmp             bx,word ptr cs:MX_CLIPY1
170         jl              L$8
171         call            near ptr L$70
172         cmp             cx,word ptr cs:MX_CLIPX2
173         jle             L$9
174         jmp             near ptr L$68
175 L$10:
176         call            near ptr L$63
177         cmp             bx,word ptr cs:MX_CLIPY2
178         jg              L$8
179         jmp             near ptr L$69
180 L$11:
181         call            near ptr L$63
182         cmp             bx,word ptr cs:MX_CLIPY2
183         jg              L$8
184         call            near ptr L$69
185         cmp             cx,word ptr cs:MX_CLIPX2
186         jle             L$9
187         jmp             near ptr L$68
188 L$12:
189         clc
190         ret
191 L$13:
192         stc
193         ret
194 L$14:
195         jmp             near ptr L$64
196 L$15:
197         call            near ptr L$64
198         jmp             near ptr L$67
199 L$16:
200         call            near ptr L$64
201         cmp             bx,word ptr cs:MX_CLIPY1
202         jl              L$13
203         jmp             near ptr L$70
204 L$17:
205         call            near ptr L$64
206         cmp             bx,word ptr cs:MX_CLIPY1
207         jl              L$13
208         call            near ptr L$70
209         cmp             cx,word ptr cs:MX_CLIPX1
210         jge             L$12
211         jmp             near ptr L$67
212 L$18:
213         call            near ptr L$64
214         cmp             bx,word ptr cs:MX_CLIPY2
215         jg              L$13
216         jmp             near ptr L$69
217 L$19:
218         call            near ptr L$64
219         cmp             bx,word ptr cs:MX_CLIPY2
220         jg              L$13
221         call            near ptr L$69
222         cmp             cx,word ptr cs:MX_CLIPX1
223         jge             L$12
224         jmp             near ptr L$67
225 L$20:
226         clc
227         ret
228 L$21:
229         stc
230         ret
231 L$22:
232         jmp             near ptr L$66
233 L$23:
234         call            near ptr L$66
235         cmp             di,word ptr cs:MX_CLIPX1
236         jl              L$21
237         call            near ptr L$67
238         cmp             si,word ptr cs:MX_CLIPY1
239         jge             L$20
240         jmp             near ptr L$70
241 L$24:
242         call            near ptr L$66
243         cmp             di,word ptr cs:MX_CLIPX2
244         jg              L$21
245         jmp             near ptr L$68
246 L$25:
247         call            near ptr L$66
248         jmp             near ptr L$69
249 L$26:
250         call            near ptr L$66
251         cmp             di,word ptr cs:MX_CLIPX1
252         jl              L$21
253         call            near ptr L$67
254         cmp             si,word ptr cs:MX_CLIPY2
255         jle             L$20
256         jmp             near ptr L$69
257 L$27:
258         call            near ptr L$66
259         cmp             di,word ptr cs:MX_CLIPX2
260         jg              L$21
261         call            near ptr L$68
262         cmp             si,word ptr cs:MX_CLIPY2
263         jle             L$20
264         jmp             near ptr L$69
265 L$28:
266         clc
267         ret
268 L$29:
269         stc
270         ret
271 L$30:
272         call            near ptr L$63
273         cmp             bx,word ptr cs:MX_CLIPY1
274         jge             L$28
275         jmp             near ptr L$66
276 L$31:
277         call            near ptr L$68
278         cmp             si,word ptr cs:MX_CLIPY1
279         jl              L$29
280         call            near ptr L$66
281         cmp             di,word ptr cs:MX_CLIPX1
282         jge             L$28
283         jmp             near ptr L$63
284 L$32:
285         call            near ptr L$69
286         cmp             cx,word ptr cs:MX_CLIPX1
287         jl              L$29
288         call            near ptr L$66
289         cmp             di,word ptr cs:MX_CLIPX1
290         jge             L$28
291         jmp             near ptr L$63
292 L$33:
293         call            near ptr L$63
294         cmp             bx,word ptr cs:MX_CLIPY2
295         jg              L$29
296         call            near ptr L$68
297         cmp             bx,word ptr cs:MX_CLIPY1
298         jl              L$29
299         cmp             si,word ptr cs:MX_CLIPY2
300         jle             L$28
301         jmp             near ptr L$69
302 L$34:
303         clc
304         ret
305 L$35:
306         stc
307         ret
308 L$36:
309         call            near ptr L$64
310         cmp             bx,word ptr cs:MX_CLIPY1
311         jge             L$34
312         jmp             near ptr L$66
313 L$37:
314         call            near ptr L$67
315         cmp             si,word ptr cs:MX_CLIPY2
316         jl              L$35
317         call            near ptr L$66
318         cmp             di,word ptr cs:MX_CLIPX2
319         jle             L$34
320         jmp             near ptr L$64
321 L$38:
322         call            near ptr L$69
323         cmp             cx,word ptr cs:MX_CLIPX2
324         jg              L$35
325         call            near ptr L$64
326         cmp             bx,word ptr cs:MX_CLIPY1
327         jge             L$34
328         jmp             near ptr L$66
329 L$39:
330         call            near ptr L$67
331         cmp             si,word ptr cs:MX_CLIPY1
332         jl              L$35
333         call            near ptr L$64
334         cmp             bx,word ptr cs:MX_CLIPY2
335         jg              L$35
336         cmp             si,word ptr cs:MX_CLIPY2
337         jle             L$40
338         call            near ptr L$69
339 L$40:
340         cmp             bx,word ptr cs:MX_CLIPY1
341         jge             L$34
342         jmp             near ptr L$66
343 L$41:
344         clc
345         ret
346 L$42:
347         stc
348         ret
349 L$43:
350         jmp             near ptr L$65
351 L$44:
352         call            near ptr L$65
353         cmp             di,word ptr cs:MX_CLIPX1
354         jl              L$42
355         jmp             near ptr L$67
356 L$45:
357         call            near ptr L$65
358         cmp             di,word ptr cs:MX_CLIPX2
359         jg              L$42
360         jmp             near ptr L$68
361 L$46:
362         call            near ptr L$65
363         jmp             near ptr L$70
364 L$47:
365         call            near ptr L$65
366         cmp             di,word ptr cs:MX_CLIPX1
367         jl              L$42
368         call            near ptr L$67
369         cmp             si,word ptr cs:MX_CLIPY1
370         jge             L$42
371         jmp             near ptr L$70
372 L$48:
373         call            near ptr L$65
374         cmp             di,word ptr cs:MX_CLIPX2
375         jg              L$42
376         call            near ptr L$68
377         cmp             si,word ptr cs:MX_CLIPY1
378         jge             L$41
379         jmp             near ptr L$70
380 L$49:
381         clc
382         ret
383 L$50:
384         stc
385         ret
386 L$51:
387         call            near ptr L$63
388         cmp             bx,word ptr cs:MX_CLIPY2
389         jle             L$49
390         jmp             near ptr L$65
391 L$52:
392         call            near ptr L$68
393         cmp             si,word ptr cs:MX_CLIPY2
394         jg              L$50
395         call            near ptr L$65
396         cmp             di,word ptr cs:MX_CLIPX1
397         jge             L$49
398         jmp             near ptr L$63
399 L$53:
400         call            near ptr L$70
401         cmp             cx,word ptr cs:MX_CLIPX1
402         jl              L$50
403         call            near ptr L$63
404         cmp             bx,word ptr cs:MX_CLIPY2
405         jle             L$49
406         jmp             near ptr L$65
407 L$54:
408         call            near ptr L$63
409         cmp             bx,word ptr cs:MX_CLIPY1
410         jl              L$50
411         call            near ptr L$68
412         cmp             si,word ptr cs:MX_CLIPY2
413         jg              L$50
414         cmp             bx,word ptr cs:MX_CLIPY2
415         jle             L$55
416         call            near ptr L$65
417 L$55:
418         cmp             si,word ptr cs:MX_CLIPY1
419         jge             L$49
420         jmp             near ptr L$70
421 L$56:
422         clc
423         ret
424 L$57:
425         stc
426         ret
427 L$58:
428         call            near ptr L$64
429         cmp             bx,word ptr cs:MX_CLIPY2
430         jle             L$56
431         jmp             near ptr L$65
432 L$59:
433         call            near ptr L$67
434         cmp             si,word ptr cs:MX_CLIPY2
435         jg              L$57
436         call            near ptr L$65
437         cmp             di,word ptr cs:MX_CLIPX2
438         jle             L$56
439         jmp             L$64
440 L$60:
441         call            near ptr L$70
442         cmp             cx,word ptr cs:MX_CLIPX2
443         jg              L$57
444         call            near ptr L$64
445         cmp             bx,word ptr cs:MX_CLIPY2
446         jle             L$56
447         jmp             L$65
448 L$61:
449         call            near ptr L$67
450         cmp             si,word ptr cs:MX_CLIPY2
451         jg              L$57
452         call            near ptr L$64
453         cmp             bx,word ptr cs:MX_CLIPY1
454         jl              L$57
455         cmp             si,word ptr cs:MX_CLIPY1
456         jge             L$62
457         call            near ptr L$70
458 L$62:
459         cmp             bx,word ptr cs:MX_CLIPY2
460         jle             L$56
461         jmp             L$65
462 L$63:
463         mov             ax,si
464         sub             ax,bx
465         mov             dx,word ptr cs:MX_CLIPX1
466         sub             dx,di
467         imul            dx
468         mov             bp,cx
469         sub             bp,di
470         idiv            bp
471         add             bx,ax
472         mov             di,word ptr cs:MX_CLIPX1
473         clc
474         ret
475 L$64:
476         mov             ax,si
477         sub             ax,bx
478         mov             dx,word ptr cs:MX_CLIPX2
479         sub             dx,di
480         imul            dx
481         mov             bp,cx
482         sub             bp,di
483         idiv            bp
484         add             bx,ax
485         mov             di,word ptr cs:MX_CLIPX2
486         clc
487         ret
488 L$65:
489         mov             ax,cx
490         sub             ax,di
491         mov             dx,word ptr cs:MX_CLIPY2
492         sub             dx,bx
493         imul            dx
494         mov             bp,si
495         sub             bp,bx
496         idiv            bp
497         add             di,ax
498         mov             bx,word ptr cs:MX_CLIPY2
499         clc
500         ret
501 L$66:
502         mov             ax,cx
503         sub             ax,di
504         mov             dx,word ptr cs:MX_CLIPY1
505         sub             dx,bx
506         imul            dx
507         mov             bp,si
508         sub             bp,bx
509         idiv            bp
510         add             di,ax
511         mov             bx,word ptr cs:MX_CLIPY1
512         clc
513         ret
514 L$67:
515         mov             ax,bx
516         sub             ax,si
517         mov             dx,word ptr cs:MX_CLIPX1
518         sub             dx,cx
519         imul            dx
520         mov             bp,di
521         sub             bp,cx
522         idiv            bp
523         add             si,ax
524         mov             cx,word ptr cs:MX_CLIPX1
525         clc
526         ret
527 L$68:
528         mov             ax,bx
529         sub             ax,si
530         mov             dx,word ptr cs:MX_CLIPX2
531         sub             dx,cx
532         imul            dx
533         mov             bp,di
534         sub             bp,cx
535         idiv            bp
536         add             si,ax
537         mov             cx,word ptr cs:MX_CLIPX2
538         clc
539         ret
540 L$69:
541         mov             ax,di
542         sub             ax,cx
543         mov             dx,word ptr cs:MX_CLIPY2
544         sub             dx,si
545         imul            dx
546         mov             bp,bx
547         sub             bp,si
548         idiv            bp
549         add             cx,ax
550         mov             si,word ptr cs:MX_CLIPY2
551         clc
552         ret
553 L$70:
554         mov             ax,di
555         sub             ax,cx
556         mov             dx,word ptr cs:MX_CLIPY1
557         sub             dx,si
558         imul            dx
559         mov             bp,bx
560         sub             bp,si
561         idiv            bp
562         add             cx,ax
563         mov             si,word ptr cs:MX_CLIPY1
564         clc
565         ret
566 XSUBCLIPLINE:
567         push            bp
568         xor             si,si
569         cmp             dx,word ptr cs:MX_CLIPY2
570         jle             L$71
571         or              si,8
572         jmp             L$72
573 L$71:
574         cmp             dx,word ptr cs:MX_CLIPY1
575         jge             L$72
576         or              si,4
577 L$72:
578         cmp             cx,word ptr cs:MX_CLIPX2
579         jle             L$73
580         or              si,2
581         jmp             L$74
582 L$73:
583         cmp             cx,word ptr cs:MX_CLIPX1
584         jge             L$74
585         or              si,1
586 L$74:
587         cmp             bx,word ptr cs:MX_CLIPY2
588         jle             L$75
589         or              si,80H
590         jmp             L$76
591 L$75:
592         cmp             bx,word ptr cs:MX_CLIPY1
593         jge             L$76
594         or              si,40H
595 L$76:
596         cmp             ax,word ptr cs:MX_CLIPX2
597         jle             L$77
598         or              si,20H
599         jmp             L$78
600 L$77:
601         cmp             ax,word ptr cs:MX_CLIPX1
602         jge             L$78
603         or              si,10H
604 L$78:
605         mov             di,si
606         and             di,0fH
607         and             si,0f0H
608         shr             si,1
609         shr             si,1
610         cmp             di,word ptr cs:L$1[si]
611         jg              L$79
612         mov             si,word ptr cs:L$2[si]
613         shl             di,1
614         add             si,di
615         mov             di,ax
616         mov             si,word ptr cs:[si]
617         xchg            si,dx
618         call            dx
619         mov             ax,di
620         mov             dx,si
621         pop             bp
622         ret
623 L$79:
624         pop             bp
625         stc
626         ret
627 MX_TEXT         ENDS
628                 END