]> 4ch.mooo.com Git - 16.git/blob - 16/xw_/mxgm.asm
serial debug output added. they are added as _DEBUG_INIT and _DEBUG functions.
[16.git] / 16 / xw_ / mxgm.asm
1                 PUBLIC  MXGAMMACORRECT
2 MX_TEXT         SEGMENT PARA PUBLIC USE16 'CODE'
3                 ASSUME CS:MX_TEXT, DS:DGROUP, SS:DGROUP
4 L$1:
5         add             byte ptr [bp+si],cl
6         push            cs
7         adc             word ptr [bp+di],dx
8         adc             ax,1817H
9         sbb             bl,byte ptr [bp+di]
10         sbb             al,1dH
11         pop             ds
12         and             byte ptr [bx+di],ah
13         and             ah,byte ptr [bp+di]
14         and             al,25H
15         and             ax,2726H
16         sub             byte ptr [bx+di],ch
17         sub             word ptr [bp+si],bp
18         sub             bp,word ptr [si]
19         sub             al,2dH
20         das
21         xor             byte ptr [bx+si],dh
22         xor             word ptr [bx+di],si
23         xor             dh,byte ptr [bp+di]
24         xor             si,word ptr [si]
25         xor             al,35H
26         xor             ax,3636H
27         aaa
28         aaa
29         cmp             byte ptr [bx+si],bh
30         cmp             word ptr [bx+di],di
31         cmp             bh,byte ptr [bp+si]
32         cmp             di,word ptr [bp+di]
33         cmp             al,3cH
34         cmp             ax,3e3dH
35         aas
36         aas
37 MXGAMMACORRECT:
38         push            bp
39         mov             bp,sp
40         sub             sp,0
41         push            ds
42         push            si
43         push            es
44         push            di
45         mov             cx,word ptr 6[bp]
46         jcxz            L$3
47         lds             si,dword ptr 0cH[bp]
48         les             di,dword ptr 8[bp]
49         mov             bx,offset L$1
50         cld
51         mov             ax,cx
52         add             cx,cx
53         add             cx,ax
54 L$2:
55         lodsb
56         xlat            word ptr cs:[bx]
57         stosb
58         loop            L$2
59 L$3:
60         pop             di
61         pop             es
62         pop             si
63         pop             ds
64         mov             sp,bp
65         pop             bp
66         retf            0aH
67 MX_TEXT         ENDS
68                 END