]> 4ch.mooo.com Git - 16.git/blob - 16/xw__/mxll.asm
16_ca needs huge amounts of work and I should remember what needs to be done soon...
[16.git] / 16 / xw__ / mxll.asm
1 .387
2                 PUBLIC  MXLOADLATCHES
3                 EXTRN   MX_VIDEOSEGMENT:BYTE
4 MX_TEXT         SEGMENT PARA PUBLIC USE16 'CODE'
5                 ASSUME CS:MX_TEXT, DS:DGROUP, SS:DGROUP
6 MXLOADLATCHES:
7         push            ds
8         push            si
9         mov             dx,3ceH
10         mov             ax,0ff08H
11         out             dx,ax
12         mov             ax,3
13         out             dx,ax
14         mov             ax,5
15         out             dx,ax
16         mov             ax,word ptr cs:MX_VIDEOSEGMENT
17         mov             ds,ax
18         mov             si,0ffffH
19         mov             bh,8
20         mov             cx,3
21 L$1:
22         mov             dx,3ceH
23         mov             al,4
24         mov             ah,cl
25         out             dx,ax
26         mov             dx,3c4H
27         mov             al,2
28         mov             ah,bh
29         out             dx,ax
30         mov             al,byte ptr [si]
31         push            ax
32         mov             byte ptr [si],bl
33         mov             al,byte ptr [di]
34         shr             bh,1
35         loop            L$1
36         mov             cx,3
37         mov             bh,8
38         mov             dx,3c4H
39 L$2:
40         mov             al,2
41         mov             ah,bh
42         out             dx,ax
43         pop             ax
44         mov             byte ptr [si],al
45         shr             bh,1
46         loop            L$2
47         pop             si
48         pop             ds
49         ret
50 MX_TEXT         ENDS
51                 END