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