]> 4ch.mooo.com Git - 16.git/blob - 16/xw_/mxot.asm
more
[16.git] / 16 / xw_ / mxot.asm
1                 PUBLIC  MXSETFONT
2                 PUBLIC  MXSETTEXTCOLOR
3                 PUBLIC  MXOUTCHAR
4                 PUBLIC  MXOUTTEXT
5                 PUBLIC  MXSETTEXTSTEP
6                 PUBLIC  MXGETTEXTSTEP
7                 EXTRN   MX_CODESEGMENT:BYTE
8                 EXTRN   MXPUTIMAGE:BYTE
9 MX_TEXT         SEGMENT PARA PUBLIC USE16 'CODE'
10                 ASSUME CS:MX_TEXT, DS:DGROUP, SS:DGROUP
11 ; Default 8x8 font
12 fnt_Default     LABEL   BYTE
13         INCLUDE DEFAULT.FNT
14
15 ; Table of system fonts
16 tbl_SystemFont   LABEL   WORD
17         DW      fnt_Default, 8, 8
18
19 MX_MAXSYSFONT   EQU     ($-OFFSET tbl_SystemFont) SHR 2
20
21 mx_FontPtr      DW      OFFSET fnt_Default, SEG MX_TEXT
22 mx_FontWidth    DW      8               ; Font width in pixels
23 mx_FontHeight   DW      8               ; Font height in pixels
24 mx_FontCharSize DW      8               ; Size in bytes of a font character
25 mx_FontColor    DW      00FFh           ; Color: foreground + background*256
26 mx_FontOp       DW      0         ; Raster op
27 mx_DeltaX       DW      8               ; Horizontal step
28 mx_DeltaY       DW      0               ; Vertical step
29
30 L$1:
31         add             byte ptr [bx+si],al
32         add             byte ptr [bx+si],al
33         add             byte ptr [bx+si],al
34         add             byte ptr [bx+si],al
35         ; The label referred to here is an undefined location
36         ;;;;ffff
37         ;jle            0xff8bh
38         movsw
39         and             word ptr -7e67H[di],7e7eH
40         call            bx
41         call            bx
42         out             0ffH,ax
43         jle             L$9
44 ;       ;????
45 ;       ;????
46 ;       ;????
47         jl              L$7
48         adc             byte ptr [bx+si],al
49         adc             byte ptr [bx+si],bh
50 L$2:
51         jl              L$2
52         jl              L$8
53         adc             byte ptr [bx+si],al
54         adc             byte ptr [bx+si],bh
55         adc             byte ptr -2[si],dl
56         push            sp
57         adc             dh,bh
58         adc             byte ptr [bx+si],bh
59 L$3:
60         jl              L$3
61 L$4:
62         ;????
63         jl              L$5
64         inc             byte ptr [bx+si]
65         sbb             byte ptr [si],bh
66         jle             L$11
67         cmp             al,18H
68         add             bh,bh
69         out             0c3H,ax
70     DB  81H, 81H, 0c3H, 0e7H
71 L$5:
72         inc             word ptr [bx+si]
73         cmp             al,66H
74         inc             dx
75         inc             dx
76     DB  66H, 3cH
77 L$6:
78         add             bh,bh
79         ret
80         cwd
81         mov             bp,99bdH
82 L$7:
83         ret
84         inc             word ptr [bx]
85         add             ax,word ptr [di]
86         ; The label referred to here is an undefined location
87         ;;;;;0ffff
88         ;;;;;js         0ffffffe1H
89     DB  84H
90 L$8:
91         test            byte ptr 7cH[bx+si],bh
92         add             byte ptr 7c82H[bp+si],10H
93         cmp             byte ptr [bx+si],dl
94         sbb             al,10H
95         sbb             al,10H
96         adc             byte ptr [bx+si],dl
97         xor             byte ptr [bx+si],dh
98         and             bh,byte ptr ds:[2222H]
99         ;;;;;pushad
100         cwd
101         pop             dx
102         cmp             al,0e7H
103         out             3cH,ax
104         pop             dx
105         cwd
106         add             byte ptr [bx+si],dl
107         xor             byte ptr -10H[bx+si],dh
108 L$9:
109         jo              L$10
110         adc             byte ptr [bx+si],al
111         add             al,0e0H
112         ;;;;lock loopnz L$6
113         adc             byte ptr [bx+si],38H
114         push            sp
115         adc             byte ptr [bx+si],dl
116         push            sp
117         cmp             byte ptr [bx+si],dl
118         dec             ax
119         dec             ax
120         dec             ax
121         dec             ax
122         dec             ax
123         add             byte ptr [bx+si],cl
124         jle             L$4
125         xchg            ax,dx
126         jb              L$10
127         adc             dl,byte ptr [bp+si]
128         add             byte ptr [si],bh
129         and             bl,byte ptr [bx+si]
130         and             al,24H
131         sbb             byte ptr 3cH[si],al
132         add             byte ptr [bx+si],al
133         add             byte ptr [bx+si],al
134     DB  0, 3eH
135     ;;;;DD      ds:[03eh]
136 L$10:
137         add             byte ptr [bx+si],bh
138         push            sp
139     DB  10H
140 L$11:
141         adc             byte ptr [bx+si],dl
142         push            sp
143         cmp             dh,bh
144         add             byte ptr [bx+si],dl
145         cmp             byte ptr 10H[si],dl
146         adc             byte ptr [bx+si],dl
147         add             byte ptr [bx+si],al
148         adc             byte ptr [bx+si],dl
149         adc             byte ptr 38H[si],dl
150         adc             byte ptr [bx+si],al
151         add             byte ptr [bx+si],cl
152         add             al,0feH
153         add             al,8
154         add             byte ptr [bx+si],al
155         add             byte ptr [bx+si],ah
156         inc             ax
157         inc             byte ptr 20H[bx+si]
158         add             byte ptr [bx+si],al
159         add             byte ptr [bx+si],al
160         add             byte ptr -380H[bx+si],0
161         add             byte ptr [bx+si],al
162         and             al,42H
163         inc             word ptr 24H[bp+si]
164         add             byte ptr [bx+si],al
165         add             byte ptr [bx+si],al
166         adc             byte ptr [bx+si],bh
167 L$12:
168         jl              L$12
169         add             byte ptr [bx+si],al
170         add             byte ptr [bx+si],al
171         ;????
172         jl              L$15
173         adc             byte ptr [bx+si],al
174         add             byte ptr [bx+si],al
175         add             byte ptr [bx+si],al
176         add             byte ptr [bx+si],al
177         add             byte ptr [bx+si],al
178         add             byte ptr [bx+si],dl
179         adc             byte ptr [bx+si],dl
180         adc             byte ptr [bx+si],dl
181         add             byte ptr [bx+si],dl
182         add             byte ptr [bx+si],al
183         and             al,24H
184         add             byte ptr [bx+si],al
185     DB  0
186 L$13:
187         add             byte ptr [bx+si],al
188         and             al,24H
189         ;;;;jle         140H
190         ;;;;jle         142H
191 L$14:
192         and             al,0
193         cmp             byte ptr 50H[si],dl
194         cmp             byte ptr [si],dl
195         push            sp
196         cmp             byte ptr [bx+si],dl
197         add             byte ptr [bp+si],al
198         inc             sp
199         or              byte ptr [bx+si],dl
200         and             byte ptr [bp+si],al
201         cmp             byte ptr 38H[si],al
202         ;;;;pusha
203         xchg            ax,sp
204 L$15:
205     DB  88H
206 L$16:
207         ;;;;je          138H
208         and             byte ptr [bx+si],ah
209         inc             ax
210         add             byte ptr [bx+si],al
211         add             byte ptr [bx+si],al
212         add             byte ptr [bx+si],dl
213         and             byte ptr 40H[bx+si],al
214         inc             ax
215         and             byte ptr [bx+si],dl
216         add             byte ptr 20H[bx+si],al
217         adc             byte ptr [bx+si],dl
218         adc             byte ptr [bx+si],ah
219 L$17:
220         inc             ax
221         add             byte ptr [bx+si],al
222         and             al,18H
223         jle             L$18
224         and             al,0
225         add             byte ptr [bx+si],al
226         adc             byte ptr [bx+si],dl
227         jl              L$18
228         adc             byte ptr [bx+si],al
229         add             byte ptr [bx+si],al
230         add             byte ptr [bx+si],al
231         add             byte ptr [bx+si],al
232         adc             byte ptr [bx+si],dl
233         and             byte ptr [bx+si],al
234         add             byte ptr [bx+si],al
235         cld
236     DB  0
237 L$18:
238         add             byte ptr [bx+si],al
239         add             byte ptr [bx+si],al
240         add             byte ptr [bx+si],al
241         add             byte ptr [bx+si],al
242         add             byte ptr [bx+si],dl
243         add             byte ptr [bx+si],al
244         add             al,8
245         adc             byte ptr [bx+si],ah
246         inc             ax
247 L$19:
248         add             byte ptr [bx+si],7cH
249         ;????
250     DB  8aH, 92H
251 L$20:
252         mov             byte ptr tbl_SystemFont[bx+2],al
253     DD  L$21
254 L$21:
255         adc             byte ptr [bx+si],dl
256         adc             byte ptr [bx+si],bh
257         add             byte ptr L$13[bx+si],bh
258         add             al,18H
259         ;;;;pusha
260         cmp             ah,0
261         js              L$14
262         add             al,38H
263         add             al,84H
264         js              L$22
265 L$22:
266         sbb             al,24H
267         inc             sp
268         test            dh,bh
269         add             al,0eH
270         add             ah,bh
271         cmp             al,4
272         add             al,84H
273         js              L$23
274 L$23:
275         js              L$16
276         cmp             al,84H
277         test            byte ptr [bx+si],bh
278         cld
279         add             al,4
280         or              byte ptr [bx+si],dl
281         and             byte ptr [bx+si],ah
282         add             byte ptr -7cH[bx+si],bh
283         test            byte ptr -7cH[bx+si],bh
284         test            byte ptr [bx+si],bh
285         js              L$17
286         test            byte ptr 4[si],bh
287         test            byte ptr [bx+si],bh
288         add             byte ptr [bx+si],al
289         adc             byte ptr [bx+si],al
290         add             byte ptr [bx+si],al
291         adc             byte ptr [bx+si],al
292         add             byte ptr [bx+si],al
293         adc             byte ptr [bx+si],al
294         add             byte ptr [bx+si],dl
295         adc             byte ptr [bx+si],ah
296         or              byte ptr [bx+si],dl
297         and             byte ptr 20H[bx+si],al
298         adc             byte ptr [bx+si],cl
299         add             byte ptr [bx+si],al
300         add             ah,bh
301         add             byte ptr [bx+si],al
302         cld
303         add             byte ptr [bx+si],al
304         inc             ax
305         and             byte ptr [bx+si],dl
306         or              byte ptr [bx+si],dl
307         and             byte ptr [bx+si],al
308         js              L$19
309         add             al,8
310         adc             byte ptr [bx+si],al
311 L$24:
312         adc             byte ptr [bx+si],al
313         jl              L$20
314         mov             dx,0bea6H
315         cmp             byte ptr [si],78H
316         test            byte ptr -7b04H[si],al
317         test            byte ptr -800H[si],al
318         test            byte ptr -7b08H[si],al
319         test            al,bh
320         add             byte ptr -7cH[bx+si],bh
321         add             byte ptr -7b80H[bx+si],78H
322         add             al,dh
323         mov             byte ptr -7b7cH[si],al
324         mov             al,dh
325         add             ah,bh
326         add             byte ptr -7f10H[bx+si],80H
327         cld
328         add             ah,bh
329         add             byte ptr -7f10H[bx+si],80H
330         add             byte ptr [bx+si],78H
331         test            byte ptr -7b64H[bx+si],al
332         test            byte ptr [bx+si],bh
333         test            byte ptr -37cH[si],al
334         test            byte ptr 84H[si],al
335         cmp             byte ptr [bx+si],dl
336         adc             byte ptr [bx+si],dl
337         adc             byte ptr [bx+si],dl
338         cmp             byte ptr [bx+si],al
339         sbb             al,8
340         or              byte ptr [bx+si],cl
341         mov             byte ptr 70H[bx+si],cl
342         test            byte ptr -1f70H[bx+si],cl
343         nop
344         mov             byte ptr -8000H[si],al
345         add             byte ptr -7f80H[bx+si],80H
346         cld
347         add             dh,al
348         stosb
349         xchg            ax,dx
350         add             byte ptr -7d7eH[bp+si],0
351         add             dl,0a2H
352         xchg            ax,dx
353         mov             al,byte ptr 82H[bp]
354         js              L$24
355         test            byte ptr -7b7cH[si],al
356         js              L$25
357 L$25:
358         clc
359         test            byte ptr -7f08H[si],al
360         add             byte ptr 7800H[bx+si],84H
361         test            byte ptr -776cH[si],al
362         jbe             L$26
363 L$26:
364         clc
365         test            byte ptr -6f08H[si],al
366         mov             byte ptr 7800H[si],al
367         test            byte ptr 478H[bx+si],al
368         test            byte ptr [bx+si],bh
369         ;????
370         adc             byte ptr [bx+si],dl
371         adc             byte ptr [bx+si],dl
372         adc             byte ptr [bx+si],dl
373         add             byte ptr -7b7cH[si],al
374         test            byte ptr 7884H[si],al
375         add             byte ptr -7b7cH[si],al
376         test            byte ptr 3048H[si],al
377         add             byte ptr -7d7eH[bp+si],al
378         adc             byte ptr -3956H[bp+si],0
379         add             byte ptr 28H[si],10H
380         sub             byte ptr -7eH[si],al
381         add             byte ptr 44H[si],al
382         inc             sp
383         cmp             byte ptr [bx+si],dl
384         adc             byte ptr [bx+si],dl
385         add             dh,bh
386         add             al,8
387         adc             byte ptr [bx+si],ah
388         inc             ax
389         inc             byte ptr [bx+si]
390         js              L$32
391         inc             ax
392         inc             ax
393         inc             ax
394         inc             ax
395         js              L$27
396 L$27:
397         add             byte ptr 2040H[bx+si],al
398         adc             byte ptr [bx+si],cl
399         add             al,0
400         js              L$29
401         or              byte ptr [bx+si],cl
402         or              byte ptr [bx+si],cl
403         js              L$28
404 L$28:
405         adc             byte ptr [bx+si],ch
406 L$29:
407         inc             sp
408         add             byte ptr [bx+si],0
409         add             byte ptr [bx+si],al
410         add             byte ptr [bx+si],al
411         add             byte ptr [bx+si],al
412         add             byte ptr [bx+si],al
413         add             bh,bh
414         and             byte ptr [bx+si],ah
415         adc             byte ptr [bx+si],al
416         add             byte ptr [bx+si],al
417         add             byte ptr [bx+si],al
418         add             byte ptr [bx+si],al
419         cmp             byte ptr [si],al
420         cmp             al,44H
421         jl              L$30
422 L$30:
423         add             byte ptr 40H[bx+si],al
424         js              L$33
425         inc             sp
426         js              L$31
427 L$31:
428         add             byte ptr [bx+si],al
429 L$32:
430         cmp             al,40H
431         inc             ax
432         inc             ax
433         cmp             al,0
434         add             byte ptr [si],al
435         add             al,3cH
436         inc             sp
437         inc             sp
438         cmp             al,0
439         add             byte ptr [bx+si],al
440         cmp             byte ptr 7cH[si],al
441         inc             ax
442         cmp             al,0
443         add             byte ptr [si],cl
444         adc             byte ptr [si],bh
445         adc             byte ptr [bx+si],dl
446         adc             byte ptr [bx+si],al
447         add             byte ptr [bx+si],al
448         cmp             al,44H
449         inc             sp
450         cmp             al,4
451         cmp             byte ptr [bx+si],al
452         inc             ax
453         inc             ax
454         js              L$35
455         inc             sp
456         inc             sp
457         add             byte ptr [bx+si],al
458         adc             byte ptr [bx+si],al
459         adc             byte ptr [bx+si],dl
460         adc             byte ptr [bx+si],dl
461         add             byte ptr [bx+si],al
462         add             al,0
463         add             al,4
464         add             al,44H
465         cmp             byte ptr [bx+si],al
466 L$33:
467         inc             ax
468         inc             ax
469         push            ax
470         ;;;;pusha
471         push            ax
472         dec             ax
473         add             byte ptr [bx+si],al
474         xor             byte ptr [bx+si],dl
475         adc             byte ptr [bx+si],dl
476         adc             byte ptr [bx+si],dl
477         add             byte ptr [bx+si],al
478         add             byte ptr 54H[bx+si],ch
479         push            sp
480         inc             sp
481         inc             sp
482         add             byte ptr [bx+si],al
483         add             byte ptr 44H[bx+si],bh
484         inc             sp
485         inc             sp
486         inc             sp
487         add             byte ptr [bx+si],al
488         add             byte ptr [bx+si],bh
489         inc             sp
490         inc             sp
491         inc             sp
492         cmp             byte ptr [bx+si],al
493         add             byte ptr [bx+si],al
494 L$34:
495         js              L$42
496         inc             sp
497         js              L$41
498         inc             ax
499     DB  0
500 L$35:
501         add             byte ptr [si],bh
502         inc             sp
503         inc             sp
504         cmp             al,4
505         add             al,0
506         add             byte ptr 60H[si],bl
507         inc             ax
508         inc             ax
509         inc             ax
510         add             byte ptr [bx+si],al
511         add             byte ptr [bx+si],bh
512 L$36:
513         inc             ax
514         jl              L$38
515         jl              L$37
516 L$37:
517         add             byte ptr [bx+si],dl
518 L$38:
519         cmp             byte ptr [bx+si],dl
520         adc             byte ptr [bx+si],dl
521         sbb             byte ptr [bx+si],al
522         add             byte ptr [bx+si],al
523         inc             sp
524         inc             sp
525         inc             sp
526         inc             sp
527         cmp             byte ptr [bx+si],al
528         add             byte ptr [bx+si],al
529         inc             sp
530         inc             sp
531         inc             sp
532         sub             byte ptr [bx+si],dl
533         add             byte ptr [bx+si],al
534         add             byte ptr 44H[si],al
535 L$39:
536         push            sp
537         push            sp
538         ;;;;insb
539         add             byte ptr [bx+si],al
540         add             byte ptr 28H[si],al
541 L$40:
542         adc             byte ptr [bx+si],ch
543         inc             sp
544 L$41:
545     DB  0
546 L$42:
547         add             byte ptr [bx+si],al
548         inc             sp
549         inc             sp
550         inc             sp
551         cmp             al,4
552         jl              L$43
553 L$43:
554         add             byte ptr 4[si],bh
555         cmp             byte ptr 7cH[bx+si],al
556         add             byte ptr [bx+si],al
557         or              byte ptr [bx+si],dl
558         adc             byte ptr [bx+si],dh
559         adc             byte ptr [bx+si],dl
560         or              byte ptr [bx+si],al
561         adc             byte ptr [bx+si],dl
562         adc             byte ptr [bx+si],al
563         adc             byte ptr [bx+si],dl
564         adc             byte ptr [bx+si],al
565         and             byte ptr [bx+si],dl
566         adc             byte ptr [bx+si],bl
567         adc             byte ptr [bx+si],dl
568         and             byte ptr -68H[si],ah
569         add             byte ptr [bx+si],al
570         add             byte ptr [bx+si],al
571         add             byte ptr [bx+si],al
572         add             byte ptr [bx+si],dl
573         sub             byte ptr -7eH[si],al
574         cmp             dh,0
575         jl              L$34
576         add             byte ptr 7c80H[bx+si],4
577         jl              L$44
578 L$44:
579         sub             byte ptr [bx+si],al
580         inc             sp
581         inc             sp
582         inc             sp
583         cmp             byte ptr [bx+si],al
584         cmp             al,0
585         jl              L$54
586         jl              L$53
587         jl              L$45
588 L$45:
589         jle             L$36
590         cmp             byte ptr [si],al
591         cmp             al,44H
592         jl              L$46
593 L$46:
594         and             al,0
595 L$47:
596         cmp             byte ptr [si],al
597         cmp             al,44H
598         jl              L$48
599 L$48:
600         js              L$49
601 L$49:
602         cmp             byte ptr [si],al
603         cmp             al,44H
604         jl              L$50
605 L$50:
606         sbb             byte ptr [bx+si],bl
607         cmp             byte ptr [si],al
608         cmp             al,44H
609         jl              L$51
610 L$51:
611         add             byte ptr [bx+si],al
612         js              L$39
613         cmp             byte ptr 8[bx+si],38H
614         jl              L$40
615         cmp             byte ptr 7cH[si],al
616         inc             ax
617         cmp             al,0
618         dec             ax
619         add             byte ptr [bx+si],bh
620         inc             sp
621         jl              L$55
622         cmp             al,0
623         js              L$52
624 L$52:
625         cmp             byte ptr 7cH[si],al
626         inc             ax
627 L$53:
628         cmp             al,0
629 L$54:
630         add             byte ptr [bx+si],ch
631         add             byte ptr [bx+si],dl
632         adc             byte ptr [bx+si],dl
633         adc             byte ptr [bx+si],al
634         adc             byte ptr [bx+si],ch
635         add             byte ptr [bx+si],dl
636         adc             byte ptr [bx+si],dl
637         adc             byte ptr [bx+si],al
638         add             byte ptr [bx+si],dh
639         add             byte ptr [bx+si],dl
640         adc             byte ptr [bx+si],dl
641         adc             byte ptr [bx+si],al
642         dec             ax
643         add             byte ptr -7cH[bx+si],bh
644         cld
645         test            byte ptr 3000H[si],al
646         xor             byte ptr -7cH[bx+si],bh
647         cld
648         test            byte ptr 3800H[si],al
649         add             ah,bh
650         xor             al,80H
651         cld
652         add             byte ptr [bx+si],al
653         add             byte ptr 8[bp],bh
654         jle             L$59
655 L$55:
656         jle             L$56
657 L$56:
658         jle             L$47
659         nop
660         cld
661         nop
662         nop
663         sahf
664         add             byte ptr -7eH[si],bh
665         cmp             byte ptr 44H[si],al
666         inc             sp
667         cmp             byte ptr [bx+si],al
668         sub             byte ptr [bx+si],al
669         cmp             byte ptr 44H[si],al
670         inc             sp
671         cmp             byte ptr [bx+si],al
672         jo              L$57
673 L$57:
674         cmp             byte ptr 44H[si],al
675         inc             sp
676         cmp             byte ptr [bx+si],al
677         cmp             byte ptr [si],al
678         inc             sp
679         inc             sp
680         inc             sp
681         cmp             byte ptr [bx+si],al
682         jo              L$58
683 L$58:
684         inc             sp
685         inc             sp
686         inc             sp
687         inc             sp
688         cmp             byte ptr [bx+si],al
689         sub             byte ptr [bx+si],al
690         inc             sp
691         inc             sp
692         inc             sp
693         cmp             al,4
694         jl              L$64
695         add             byte ptr -7cH[bx+si],bh
696         test            byte ptr 78H[si],al
697         dec             ax
698         add             byte ptr -7b7cH[si],al
699     DB  84H
700 L$59:
701         ;;;;js          4d8H
702         add             byte ptr [bx+si],dl
703         cmp             byte ptr 40H[bx+si],al
704         inc             ax
705         cmp             byte ptr [bx+si],dl
706         cmp             byte ptr 40H[si],al
707         loopnz          L$66
708         inc             ax
709         cmp             ah,44H
710         jl              L$60
711         jl              L$61
712         jl              L$62
713         add             al,dh
714         mov             byte ptr -7d09H[bp+si],cl
715         add             byte ptr 0c00H[bp+si],12H
716     DB  10H
717 L$60:
718         sbb             byte ptr [bx+si],dh
719 L$61:
720     DB  10H, 90H
721 L$62:
722         ;;;;pusha
723         cmp             al,0
724         cmp             byte ptr [si],al
725         cmp             al,44H
726         jl              L$63
727 L$63:
728         add             byte ptr [bx+si],bl
729         add             byte ptr [bx+si],dl
730         adc             byte ptr [bx+si],dl
731         adc             byte ptr [bx+si],al
732     DB  1cH
733 L$64:
734         add             byte ptr [bx+si],bh
735         inc             sp
736         inc             sp
737         inc             sp
738         cmp             byte ptr [bx+si],al
739         sbb             al,0
740         inc             sp
741         inc             sp
742         inc             sp
743         inc             sp
744         cmp             byte ptr [bx+si],al
745         jl              L$65
746 L$65:
747         js              L$67
748         inc             sp
749 L$66:
750         inc             sp
751         inc             sp
752         add             byte ptr [si],bh
753         inc             sp
754         push            sp
755         dec             sp
756         inc             sp
757         add             byte ptr [bx+si],bl
758         and             al,24H
759         push            ds
760         add             byte ptr ds:[0],bh
761         sbb             al,22H
762         and             bl,byte ptr [si]
763         add             byte ptr ds:[0],bh
764         adc             byte ptr [bx+si],al
765         adc             byte ptr [bx+si],ah
766         inc             ax
767         inc             dx
768         cmp             al,0
769         add             byte ptr [bx+si],al
770         add             ah,bh
771         add             byte ptr [bx+si],0
772         add             byte ptr [bx+si],al
773         cld
774         add             al,4
775         add             byte ptr [bx+si],al
776         inc             ax
777         inc             sp
778         dec             ax
779         push            di
780         and             word ptr 4[bx],ax
781         pop             es
782         inc             ax
783         inc             sp
784         dec             ax
785         push            dx
786         dec             dx
787         pop             ds
788     DB  2
789 L$67:
790         adc             byte ptr [bx+si],al
791         adc             byte ptr [bx+si],dl
792         adc             byte ptr [bx+si],dl
793 L$68:
794         adc             byte ptr [bx+si],al
795         add             byte ptr [si],ah
796 L$69:
797         dec             ax
798         nop
799         dec             ax
800         and             al,0
801         add             byte ptr [bx+si],al
802         dec             ax
803         and             al,12H
804         and             al,48H
805         add             byte ptr [bx+si],al
806         and             cl,byte ptr -77deH[bx+si]
807         and             cl,byte ptr -77deH[bx+si]
808         push            bp
809         stosb
810         push            bp
811         stosb
812         push            bp
813         stosb
814         push            bp
815         stosb
816         ;????
817         ja              L$68
818         out             dx,al
819         ;????
820         ja              L$69
821         out             dx,al
822         sbb             byte ptr [bx+si],bl
823         sbb             byte ptr [bx+si],bl
824         sbb             byte ptr [bx+si],bl
825         sbb             byte ptr [bx+si],bl
826         sbb             byte ptr [bx+si],bl
827         sbb             byte ptr [bx+si],bl
828         clc
829         sbb             byte ptr [bx+si],bl
830         sbb             byte ptr [bx+si],bl
831         sbb             al,bh
832         sbb             al,bh
833         sbb             byte ptr [bx+si],bl
834         sbb             byte ptr ds:[3636H],dh
835         div             byte ptr ss:[3636H]
836         add             byte ptr [bx+si],al
837         add             byte ptr [bx+si],al
838         ;????
839         add             byte ptr ss:[bx+si],al
840         clc
841         sbb             al,bh
842         sbb             byte ptr [bx+si],bl
843         sbb             byte ptr ds:[0f636H],dh
844         push            es
845         div             byte ptr ds:[3636H]
846         add             byte ptr ss:[bx+si],al
847         inc             byte ptr ds:[36f6H]
848         test            byte ptr ss:[0feH],0
849         add             byte ptr ds:[3636H],dh
850         inc             byte ptr ss:[bx+si]
851         add             byte ptr [bx+si],al
852         sbb             byte ptr [bx+si],bl
853         clc
854         sbb             al,bh
855         add             byte ptr [bx+si],al
856         add             byte ptr [bx+si],al
857         add             byte ptr [bx+si],al
858         add             al,bh
859         sbb             byte ptr [bx+si],bl
860         sbb             byte ptr [bx+si],bl
861         sbb             byte ptr [bx+si],bl
862         sbb             byte ptr [bx],bl
863         add             byte ptr [bx+si],al
864         add             byte ptr [bx+si],bl
865         sbb             byte ptr [bx+si],bl
866         sbb             bh,bh
867         add             byte ptr [bx+si],al
868         add             byte ptr [bx+si],al
869         add             byte ptr [bx+si],al
870         add             bh,bh
871         sbb             byte ptr [bx+si],bl
872         sbb             byte ptr [bx+si],bl
873         sbb             byte ptr [bx+si],bl
874         sbb             byte ptr [bx],bl
875         sbb             byte ptr [bx+si],bl
876         sbb             byte ptr [bx+si],al
877         add             byte ptr [bx+si],al
878         add             bh,bh
879         add             byte ptr [bx+si],al
880         add             byte ptr [bx+si],bl
881         sbb             byte ptr [bx+si],bl
882         sbb             bh,bh
883         sbb             byte ptr [bx+si],bl
884         sbb             byte ptr [bx+si],bl
885         sbb             byte ptr [bx],bl
886         sbb             byte ptr [bx],bl
887         sbb             byte ptr [bx+si],bl
888         sbb             byte ptr ds:[3636H],dh
889         aaa
890         aaa
891         xor             byte ptr [bx],bh
892         add             byte ptr [bx+si],al
893         add             byte ptr [bx+si],al
894         add             byte ptr [bx],bh
895         xor             byte ptr [bx],dh
896         test            word ptr ss:[bx+si],0ffH
897         add             byte ptr [bx+si],al
898         add             byte ptr [bx+si],al
899         inc             word ptr [bx+si]
900         div             word ptr ds:[3636H]
901         aaa
902         xor             byte ptr [bx],dh
903         add             byte ptr ss:[bx+si],al
904         inc             word ptr [bx+si]
905         inc             word ptr [bx+si]
906         add             byte ptr [bx+si],al
907         test            word ptr ss:[bx+si],36f7H
908         sbb             byte ptr ss:[bx+si],bl
909         inc             word ptr [bx+si]
910         inc             word ptr [bx+si]
911         add             byte ptr [bx+si],al
912         inc             word ptr ss:[bx+si]
913         add             byte ptr [bx+si],al
914         add             byte ptr [bx+si],al
915         inc             word ptr [bx+si]
916         call            dword ptr [bx+si]
917         sbb             byte ptr [bx+si],bl
918         add             byte ptr [bx+si],al
919         add             byte ptr [bx+si],al
920         push            word ptr ds:[3636H]
921         aas
922         add             byte ptr [bx+si],al
923         add             byte ptr [bx+si],bl
924         sbb             byte ptr [bx],bl
925         sbb             byte ptr [bx],bl
926         add             byte ptr [bx+si],al
927         add             byte ptr [bx+si],al
928         add             byte ptr [bx],bl
929         sbb             byte ptr [bx],bl
930         sbb             byte ptr [bx+si],bl
931         sbb             byte ptr [bx+si],al
932         add             byte ptr [bx+si],al
933         add             byte ptr [bx],bh
934         push            word ptr ss:[3636H]
935         sbb             byte ptr [bx+si],bl
936         call            dword ptr [bx+si]
937         call            dword ptr [bx+si]
938         sbb             byte ptr [bx+si],bl
939         sbb             byte ptr [bx+si],bl
940         sbb             byte ptr [bx+si],bl
941         clc
942         add             byte ptr [bx+si],al
943         add             byte ptr [bx+si],al
944         add             byte ptr [bx+si],al
945         add             byte ptr [bx],bl
946     DB  18H
947 L$70:
948         sbb             byte ptr [bx+si],bl
949         ;????
950         ;????
951         ;????
952         ;????
953         ;????
954         ;????
955         ;????
956         inc             word ptr [bx+si]
957         add             byte ptr [bx+si],al
958         add             bh,bh
959         ;????
960         ;????
961         push            ax
962         ;????
963         ;????
964         ;????
965         ;????
966         ;????
967         ;????
968         ;????
969         ;????
970         ;????
971         ;????
972         ;????
973         ;????
974         ;????
975         ;????
976         ;????
977         ;????
978         ;????
979         ;????
980         inc             word ptr [bx+si]
981         add             byte ptr [bx+si],al
982         add             byte ptr [bx+si],al
983         add             byte ptr -6cH[bp+si],ah
984         mov             byte ptr 62H[si],dl
985         add             al,dh
986         mov             al,dh
987         mov             byte ptr -7f10H[bx+si],cl
988         add             al,bh
989         mov             byte ptr -7f80H[bx+si],al
990         add             byte ptr [bx+si],0
991         cld
992         dec             ax
993         dec             ax
994         dec             ax
995         dec             ax
996         dec             ax
997         add             ah,bh
998         test            byte ptr 20H[bx+si],al
999         inc             ax
1000         test            ah,bh
1001         add             byte ptr [si],bh
1002         inc             ax
1003         cmp             byte ptr 44H[si],al
1004         inc             sp
1005         cmp             byte ptr [bx+si],al
1006         add             byte ptr [bx+si],al
1007         inc             sp
1008         inc             sp
1009         inc             sp
1010         js              L$71
1011         inc             ax
1012         add             byte ptr ds:[848H],dh
1013         or              byte ptr [bx+si],cl
1014         or              byte ptr [bx+si],al
1015         cmp             byte ptr [bx+si],dl
1016         cmp             byte ptr 44H[si],al
1017         cmp             byte ptr [bx+si],dl
1018         cmp             byte ptr -7cH[bx+si],bh
1019         test            ah,bh
1020         test            byte ptr 78H[si],al
1021         js              L$70
1022         test            byte ptr 4848H[si],al
1023         int             3
1024         add             byte ptr 4[bx+si],bh
1025         cmp             byte ptr 44H[si],al
1026         inc             sp
1027         cmp             byte ptr [bx+si],al
1028         add             byte ptr [bx+si],al
1029         ;;;;insb
1030         xchg            ax,dx
1031         xchg            ax,dx
1032         ;;;;insb
1033         add             byte ptr [bx+si],al
1034         add             byte ptr [bx+si],al
1035         cmp             al,byte ptr 5aH[si]
1036         and             bl,byte ptr [si]
1037         sbb             byte ptr [bx+si],ah
1038         inc             ax
1039         js              L$73
1040         and             byte ptr [bx+si],bl
1041 L$71:
1042         add             byte ptr -7cH[bx+si],bh
1043         test            byte ptr -7b7cH[si],al
1044         test            byte ptr [bx+si],al
1045         add             ah,bh
1046         add             ah,bh
1047         add             ah,bh
1048         add             byte ptr [bx+si],al
1049         and             byte ptr [bx+si],ah
1050         clc
1051         and             byte ptr [bx+si],ah
1052         add             al,bh
1053         add             byte ptr [bx+si],ah
1054         adc             byte ptr [bx+si],cl
1055         adc             byte ptr [bx+si],ah
1056         add             byte ptr [si],bh
1057         or              byte ptr [bx+si],dl
1058         and             byte ptr [bx+si],dl
1059         or              byte ptr [bx+si],al
1060         jl              L$72
1061 L$72:
1062         or              al,12H
1063         adc             byte ptr [bx+si],dl
1064         adc             byte ptr [bx+si],dl
1065         adc             byte ptr [bx+si],dl
1066         adc             byte ptr [bx+si],dl
1067         adc             byte ptr [bx+si],dl
1068         adc             byte ptr [bx+si],dl
1069         nop
1070         ;;;;pusha
1071         add             byte ptr [bx+si],dl
1072         add             byte ptr [si],bh
1073 L$73:
1074         adc             byte ptr [bx+si],al
1075         add             byte ptr [bx+si],al
1076         xor             cl,byte ptr [si]
1077         xor             cl,byte ptr [si]
1078         add             byte ptr [bx+si],bh
1079         inc             sp
1080         inc             sp
1081         cmp             byte ptr [bx+si],al
1082         add             byte ptr [bx+si],al
1083         add             byte ptr [bx+si],al
1084         add             byte ptr [bx+si],al
1085         sbb             byte ptr [bx+si],bl
1086         add             byte ptr [bx+si],al
1087         add             byte ptr [bx+si],al
1088         add             byte ptr [bx+si],al
1089         add             byte ptr [bx+si],bl
1090         add             byte ptr [bx+si],al
1091         add             byte ptr ds:[808H],cl
1092         or              byte ptr 28H[bx+si],cl
1093         sbb             byte ptr [bx+si],cl
1094         cmp             byte ptr [si],ah
1095         and             al,24H
1096         and             al,0
1097         add             byte ptr [bx+si],al
1098         cmp             al,4
1099         cmp             al,20H
1100         cmp             al,0
1101         add             byte ptr [bx+si],al
1102         add             byte ptr [bx+si],al
1103         cmp             al,3cH
1104         cmp             al,3cH
1105         add             byte ptr [bx+si],al
1106         add             byte ptr [bx+si],al
1107         add             byte ptr [bx+si],al
1108         add             byte ptr [bx+si],al
1109         add             byte ptr [bx+si],al
1110 L$74:
1111     DW  offset L$1
1112 L$75:
1113     DB  8
1114 L$76:
1115         add             byte ptr [bx+si],cl
1116     DB  0
1117 L$77:
1118     DW  offset L$1
1119 L$78:
1120     DW  seg L$1
1121 L$79:
1122         or              byte ptr [bx+si],al
1123 L$80:
1124         or              byte ptr [bx+si],al
1125 L$81:
1126         or              byte ptr [bx+si],al
1127 L$82:
1128         inc             word ptr [bx+si]
1129 L$83:
1130         add             byte ptr [bx+si],al
1131 L$84:
1132         or              byte ptr [bx+si],al
1133 L$85:
1134         add             byte ptr [bx+si],al
1135 MXSETFONT:
1136         push            bp
1137         mov             bp,sp
1138         sub             sp,0
1139         push            ds
1140         mov             ds,word ptr cs:MX_CODESEGMENT
1141         mov             ax,word ptr 0cH[bp]
1142         test            ax,ax
1143         jne             L$87
1144         mov             ax,word ptr 0aH[bp]
1145         cmp             ax,1
1146         jb              L$86
1147         xor             ax,ax
1148 L$86:
1149         shl             ax,1
1150         shl             ax,1
1151         mov             bx,ax
1152         mov             ax,word ptr L$74[bx]
1153         mov             word ptr L$77,ax
1154         mov             word ptr L$78,cs
1155         mov             al,byte ptr L$75[bx]
1156         xor             ah,ah
1157         mov             word ptr L$79,ax
1158         mov             word ptr L$84,ax
1159         mov             dl,byte ptr L$76[bx]
1160         xor             dh,dh
1161         mov             word ptr L$80,dx
1162         mul             dx
1163         mov             word ptr L$81,ax
1164         mov             word ptr L$84,ax
1165         xor             ax,ax
1166         mov             word ptr L$85,ax
1167         jmp             L$88
1168 L$87:
1169         mov             ax,0ffffH
1170         mov             bx,word ptr 8[bp]
1171         cmp             bx,10H
1172         ja              L$88
1173         mov             dx,word ptr 6[bp]
1174         cmp             dx,20H
1175         ja              L$88
1176         mov             word ptr L$79,bx
1177         mov             word ptr L$80,dx
1178         mov             ax,bx
1179         add             ax,7
1180         shr             ax,1
1181         shr             ax,1
1182         shr             ax,1
1183         mul             dx
1184         mov             word ptr L$81,ax
1185         mov             ax,word ptr 0aH[bp]
1186         mov             word ptr L$77,ax
1187         mov             ax,word ptr 0cH[bp]
1188         mov             word ptr L$78,ax
1189         xor             ax,ax
1190 L$88:
1191         pop             ds
1192         mov             sp,bp
1193         pop             bp
1194         retf            8
1195 MXSETTEXTCOLOR:
1196         push            bp
1197         mov             bp,sp
1198         sub             sp,0
1199         push            ds
1200         mov             ds,word ptr cs:MX_CODESEGMENT
1201         mov             ax,word ptr 8[bp]
1202         mov             word ptr L$82,ax
1203         mov             ax,word ptr 6[bp]
1204         mov             word ptr L$83,ax
1205         xor             ax,ax
1206         pop             ds
1207         mov             sp,bp
1208         pop             bp
1209         retf            4
1210 MXOUTCHAR:
1211         push            bp
1212         mov             bp,sp
1213         sub             sp,202H
1214         push            ds
1215         push            si
1216         push            es
1217         push            di
1218         lds             si,dword ptr cs:L$77
1219         mov             al,byte ptr 6[bp]
1220         xor             ah,ah
1221         mul             word ptr cs:L$81
1222         add             si,ax
1223         mov             ax,ss
1224         mov             es,ax
1225         lea             di,-200H[bp]
1226         mov             dx,word ptr cs:L$82
1227         mov             ax,word ptr cs:L$80
1228         mov             word ptr -202H[bp],ax
1229 L$89:
1230         mov             cx,word ptr cs:L$79
1231         mov             bh,byte ptr [si]
1232         inc             si
1233         cmp             cx,8
1234         jbe             L$90
1235         mov             bl,byte ptr [si]
1236         inc             si
1237 L$90:
1238         mov             al,dl
1239         shl             bx,1
1240         jb              L$91
1241         mov             al,dh
1242 L$91:
1243         mov             byte ptr es:[di],al
1244         inc             di
1245         dec             cx
1246         jne             L$90
1247         dec             word ptr -202H[bp]
1248         jne             L$89
1249         lea             ax,-200H[bp]
1250         push            es
1251         push            ax
1252         push            word ptr 0aH[bp]
1253         push            word ptr 8[bp]
1254         push            word ptr cs:L$79
1255         push            word ptr cs:L$80
1256         push            word ptr cs:L$83
1257         push            cs
1258         call            near ptr MX_TEXT:MXPUTIMAGE
1259         xor             ax,ax
1260         pop             di
1261         pop             es
1262         pop             si
1263         pop             ds
1264         mov             sp,bp
1265         pop             bp
1266         retf            6
1267 MXOUTTEXT:
1268         push            bp
1269         mov             bp,sp
1270         sub             sp,0
1271         push            ds
1272         push            si
1273         lds             si,dword ptr 6[bp]
1274 L$92:
1275         mov             al,byte ptr [si]
1276         test            al,al
1277         je              L$93
1278         inc             si
1279         push            word ptr 0cH[bp]
1280         push            word ptr 0aH[bp]
1281         push            ax
1282         push            cs
1283         call            near ptr MXOUTCHAR
1284         mov             ax,word ptr cs:L$84
1285         add             word ptr 0cH[bp],ax
1286         mov             ax,word ptr cs:L$85
1287         add             word ptr 0aH[bp],ax
1288         dec             word ptr -202H[bp]
1289         jne             L$92
1290 L$93:
1291         xor             ax,ax
1292         pop             si
1293         pop             ds
1294         mov             sp,bp
1295         pop             bp
1296         retf            8
1297         retf
1298 MXSETTEXTSTEP:
1299         push            bp
1300         mov             bp,sp
1301         sub             sp,0
1302         push            ds
1303         mov             ds,word ptr cs:MX_CODESEGMENT
1304         mov             ax,word ptr 8[bp]
1305         mov             word ptr L$84,ax
1306         mov             ax,word ptr 6[bp]
1307         mov             word ptr L$85,ax
1308         pop             ds
1309         mov             sp,bp
1310         pop             bp
1311         retf            4
1312 MXGETTEXTSTEP:
1313         push            bp
1314         mov             bp,sp
1315         sub             sp,0
1316         push            ds
1317         push            si
1318         mov             ax,word ptr cs:L$84
1319         lds             si,dword ptr 0aH[bp]
1320         mov             word ptr [si],ax
1321         mov             ax,word ptr cs:L$85
1322         lds             si,dword ptr 6[bp]
1323         mov             word ptr [si],ax
1324         pop             si
1325         pop             ds
1326         mov             sp,bp
1327         pop             bp
1328         retf            8
1329 MX_TEXT         ENDS
1330                 END