]> 4ch.mooo.com Git - 16.git/blob - 16/x/mxwm.asm
p16 is being worked on a bunch by me wwww [16_ca needs huge amounts of work and I...
[16.git] / 16 / x / mxwm.asm
1 ;-----------------------------------------------------------\r
2 ;\r
3 ; MXWM.ASM - Set write mode function\r
4 ; Copyright (c) 1993,1994 by Alessandro Scotti\r
5 ;\r
6 ;-----------------------------------------------------------\r
7 WARN    PRO\r
8 INCLUDE MODEX.DEF\r
9 \r
10 PUBLIC  mxWriteMode\r
11 \r
12 MX_TEXT         SEGMENT USE16 PARA PUBLIC 'CODE'\r
13                 ASSUME cs:MX_TEXT, ds:NOTHING, es:NOTHING\r
14 \r
15 ;-----------------------------------------------------------\r
16 ;\r
17 ; Sets the write mode.\r
18 ;\r
19 ; Input:\r
20 ;       Mode    = write mode (0,1,2,3)\r
21 ; Output:\r
22 ;       none\r
23 ;\r
24 mxWriteMode     PROC    FAR\r
25         ARG     Mode:BYTE:2     = ARG_SIZE\r
26         .enter  0\r
27 \r
28         mov     dx, GDC\r
29         mov     ah, [Mode]\r
30         and     ah, 00000011b\r
31         or      ah, 01000000b\r
32         mov     al, 05h\r
33         out     dx, ax\r
34 \r
35         .leave  ARG_SIZE\r
36 mxWriteMode     ENDP\r
37 \r
38 MX_TEXT         ENDS\r
39 END\r