]> 4ch.mooo.com Git - 16.git/blob - 16/xw_/mxrp.asm
16_ca needs huge amounts of work and I should remember what needs to be done soon...
[16.git] / 16 / xw_ / mxrp.asm
1                 PUBLIC  MXROTATEPALETTE
2 MX_TEXT         SEGMENT PARA PUBLIC USE16 'CODE'
3                 ASSUME CS:MX_TEXT, DS:DGROUP, SS:DGROUP
4 MXROTATEPALETTE:
5         push            bp
6         mov             bp,sp
7         sub             sp,300H
8         push            ds
9         push            si
10         push            es
11         push            di
12         mov             bx,word ptr 8[bp]
13         add             bx,bx
14         add             bx,word ptr 8[bp]
15         lds             si,dword ptr 0aH[bp]
16         push            ss
17         pop             es
18         lea             di,-300H[bp]
19         cld
20         mov             ax,word ptr 6[bp]
21         mov             dx,ax
22         test            ax,ax
23         je              L$2
24         jl              L$1
25         add             ax,ax
26         add             dx,ax
27         sub             bx,dx
28         add             si,bx
29         push            si
30         mov             cx,dx
31         rep movsb
32         mov             es,word ptr 0cH[bp]
33         mov             di,si
34         dec             di
35         pop             si
36         dec             si
37         mov             cx,bx
38         std
39         rep movsb
40         push            ss
41         pop             ds
42         lea             si,-300H[bp]
43         les             di,dword ptr 0aH[bp]
44         mov             cx,dx
45         cld
46         rep movsb
47         jmp             L$2
48 L$1:
49         add             ax,ax
50         add             dx,ax
51         neg             dx
52         sub             bx,dx
53         mov             cx,dx
54         rep movsb
55         les             di,dword ptr 0aH[bp]
56         mov             cx,bx
57         rep movsb
58         push            ss
59         pop             ds
60         lea             si,-300H[bp]
61         mov             cx,dx
62         rep movsb
63 L$2:
64         pop             di
65         pop             es
66         pop             si
67         pop             ds
68         mov             sp,bp
69         pop             bp
70         retf            8
71 MX_TEXT         ENDS
72                 END