-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMEM_VID.C
More file actions
70 lines (60 loc) · 1.8 KB
/
MEM_VID.C
File metadata and controls
70 lines (60 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/*******************************************************************/
/* */
/* Malte System/Direct Video */
/* 1992/05/27 */
/* */
/* Copyright (C) par les Chevaliers de Malte */
/* */
/*******************************************************************/
#ifndef __Malte_Video_Memory__
#define __Malte_Video_Memory__
#include <VIDEO\MEM_VID.H>
#ifndef __PASCAL__
Byte HauteurTexte(void)
#else
Byte TextHeight(void)
#endif
{
Byte Tmp = *(Byte *far) 0x00400085;
return(Tmp == 0 ? 8 : Tmp);
}
#ifndef __PASCAL__
Word NombreTexteX(void)
#else
Word XTextNum(void)
#endif
{
return(*(Byte *far) 0x0040004A);
}
#ifndef __PASCAL__
Byte NombreTexteY(void)
#else
Byte YTextNum(void)
#endif
{
Byte Tmp = *(Byte *far) 0x00400084;
return(Tmp == 0 ? 25 : Tmp+1);
}
#ifndef __PASCAL__
Word NombrePixelX(void) { return(NombreTexteX() << 3); }
#else
Word XPixelNum(void) { return(XTextNum() << 3); }
#endif
#ifndef __PASCAL__
Word NombrePixelY(void) { return(NombreTexteY() * HauteurTexte()); }
#else
Word YPixelNum(void) { return(YTextNum() * TextHeight()); }
#endif
#ifndef __PASCAL__
Word SegmentVideoTexte(void)
#else
Word TextSegment(void)
#endif
{
return(((*(Word *far) 0x00400063) == 0x3B4) ? 0xB000 : 0xB800);
}
Byte MEM_GetVideoMode(void) { return(*(Byte *far) 0x00400049); }
Byte MEM_GetPage(void) { return(*(Byte *far) 0x00400062); }
Word MEM_SizePageVideo(void) { return(*(Word *far) 0x0040004C); }
Word MEM_PortVideo(void) { return(*(Word *far) 0x00400063); }
#endif