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