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