]> 4ch.mooo.com Git - 16.git/blob - 16/xw_/mxgp.asm
16_ca needs huge amounts of work and I should remember what needs to be done soon...
[16.git] / 16 / xw_ / mxgp.asm
1                 PUBLIC  MXGETPALETTE
2 MX_TEXT         SEGMENT PARA PUBLIC USE16 'CODE'
3                 ASSUME CS:MX_TEXT, DS:DGROUP, SS:DGROUP
4 MXGETPALETTE:
5         push            bp
6         mov             bp,sp
7         sub             sp,0
8         push            es
9         push            di
10         les             di,dword ptr 0aH[bp]
11         mov             cx,word ptr 6[bp]
12         mov             ax,word ptr 8[bp]
13         mov             dx,3c7H
14         out             dx,al
15         inc             dx
16         inc             dx
17         cld
18 L$1:
19         in              al,dx
20         stosb
21         in              al,dx
22         stosb
23         in              al,dx
24         stosb
25         loop            L$1
26         pop             di
27         pop             es
28         mov             sp,bp
29         pop             bp
30         retf            8
31 MX_TEXT         ENDS
32                 END