]> 4ch.mooo.com Git - 16.git/blob - 16/xw__/mxvs.asm
16_ca needs huge amounts of work and I should remember what needs to be done soon...
[16.git] / 16 / xw__ / mxvs.asm
1 .387
2                 PUBLIC  MXSETVIRTUALSCREEN
3                 PUBLIC  MXGETVIRTUALSCREEN
4                 EXTRN   MX_CODESEGMENT:BYTE
5                 EXTRN   MX_BYTESPERLINE:BYTE
6                 EXTRN   MXROWADDRESS:BYTE
7                 EXTRN   MXSETSYSCLIPREGION:BYTE
8 MX_TEXT         SEGMENT PARA PUBLIC USE16 'CODE'
9                 ASSUME CS:MX_TEXT, DS:DGROUP, SS:DGROUP
10 L$1:
11         add             byte ptr [bx+si],al
12 L$2:
13         add             byte ptr [bx+si],al
14 MXSETVIRTUALSCREEN:
15         push            bp
16         mov             bp,sp
17         sub             sp,0
18         push            ds
19         mov             ds,word ptr cs:MX_CODESEGMENT
20         mov             ax,1
21         cmp             word ptr 8[bp],140H
22         jb              L$3
23         push            ax
24         mov             dx,4
25         xor             ax,ax
26         div             word ptr 8[bp]
27         cmp             word ptr 6[bp],ax
28         pop             ax
29         ja              L$3
30         mov             ax,word ptr 8[bp]
31         and             ax,0fff8H
32         mov             word ptr L$1,ax
33         shr             ax,1
34         shr             ax,1
35         mov             word ptr MX_TEXT:MX_BYTESPERLINE,ax
36         shr             ax,1
37         push            ax
38         call            far ptr MXROWADDRESS
39         mov             ax,word ptr 6[bp]
40         mov             word ptr L$2,ax
41         push            word ptr 8[bp]
42         push            word ptr 6[bp]
43         call            far ptr MXSETSYSCLIPREGION
44         xor             ax,ax
45 L$3:
46         pop             ds
47         mov             sp,bp
48         pop             bp
49         retf            4
50 MXGETVIRTUALSCREEN:
51         push            bp
52         mov             bp,sp
53         sub             sp,0
54         push            ds
55         push            si
56         mov             ax,word ptr cs:L$1
57         lds             si,dword ptr 0aH[bp]
58         mov             word ptr [si],ax
59         mov             ax,word ptr cs:L$2
60         lds             si,dword ptr 6[bp]
61         mov             word ptr [si],ax
62         xor             ax,ax
63         pop             si
64         pop             ds
65         mov             sp,bp
66         pop             bp
67         retf            8
68 MX_TEXT         ENDS
69                 END