ReactOS  0.4.15-dev-1068-g467feb9
pc.h
Go to the documentation of this file.
1 
2 #pragma once
3 
5 extern ULONG_PTR VgaBase;
7 extern USHORT VGA_640x480[];
8 extern UCHAR PixelMask[8];
9 
10 #define __inpb(Port) \
11  READ_PORT_UCHAR((PUCHAR)(VgaRegisterBase + (Port)))
12 
13 #define __inpw(Port) \
14  READ_PORT_USHORT((PUSHORT)(VgaRegisterBase + (Port)))
15 
16 #define __outpb(Port, Value) \
17  WRITE_PORT_UCHAR((PUCHAR)(VgaRegisterBase + (Port)), (UCHAR)(Value))
18 
19 #define __outpw(Port, Value) \
20  WRITE_PORT_USHORT((PUSHORT)(VgaRegisterBase + (Port)), (USHORT)(Value))
21 
22 VOID
23 NTAPI
26  _In_ ULONG Count);
27 
28 VOID
30 
32 VOID
34  _In_ ULONG Left,
35  _In_ ULONG Top,
37 {
38  PUCHAR PixelPosition;
39 
40  /* Calculate the pixel position */
41  PixelPosition = (PUCHAR)(VgaBase + (Left >> 3) + (Top * (SCREEN_WIDTH / 8)));
42 
43  /* Select the bitmask register and write the mask */
45 
46  /* Dummy read to load latch registers */
47  (VOID)READ_REGISTER_UCHAR(PixelPosition);
48 
49  /* Set the new color */
50  WRITE_REGISTER_UCHAR(PixelPosition, Color);
51 }
52 
53 VOID
54 NTAPI
56  _In_ ULONG CurrentTop,
57  _In_ ULONG TopDelta,
58  _In_ BOOLEAN Restore);
59 
60 VOID
61 NTAPI
62 DoScroll(
63  _In_ ULONG Scroll);
64 
65 VOID
66 NTAPI
68  _In_ CHAR Character,
69  _In_ ULONG Left,
70  _In_ ULONG Top,
71  _In_ ULONG TextColor,
72  _In_ ULONG BackColor);
VOID PrepareForSetPixel(VOID)
Definition: vga.c:81
ASMGENDATA Table[]
Definition: genincdata.c:61
VOID NTAPI InitPaletteWithTable(_In_ PULONG Table, _In_ ULONG Count)
Definition: bootvid.c:170
unsigned char * PUCHAR
Definition: retypes.h:3
char CHAR
Definition: xmlstorage.h:175
#define SCREEN_WIDTH
Definition: pc98video.c:27
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1223
ULONG_PTR VgaBase
Definition: vga.c:59
VOID NTAPI PreserveRow(_In_ ULONG CurrentTop, _In_ ULONG TopDelta, _In_ BOOLEAN Restore)
Definition: bootvid.c:107
#define GRAPH_ADDRESS_PORT
Definition: vga.h:81
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define VGA_BASE_IO_PORT
Definition: vga.h:38
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
ULONG_PTR VgaRegisterBase
Definition: vga.c:58
unsigned char BOOLEAN
USHORT AT_Initialization[]
Definition: bootdata.c:7
#define FORCEINLINE
Definition: ntbasedef.h:216
VOID NTAPI DisplayCharacter(_In_ CHAR Character, _In_ ULONG Left, _In_ ULONG Top, _In_ ULONG TextColor, _In_ ULONG BackColor)
Definition: bootvid.c:13
unsigned char UCHAR
Definition: xmlstorage.h:181
#define VOID
Definition: acefi.h:82
#define IND_BIT_MASK
Definition: vga.h:114
VOID NTAPI DoScroll(_In_ ULONG Scroll)
Definition: bootvid.c:59
NTKERNELAPI UCHAR NTAPI READ_REGISTER_UCHAR(IN PUCHAR Register)
#define _In_
Definition: no_sal2.h:204
unsigned short USHORT
Definition: pedump.c:61
USHORT VGA_640x480[]
Definition: bootdata.c:38
unsigned int * PULONG
Definition: retypes.h:1
unsigned int ULONG
Definition: retypes.h:1
FORCEINLINE VOID SetPixel(_In_ ULONG Left, _In_ ULONG Top, _In_ UCHAR Color)
Definition: pc.h:33
UCHAR PixelMask[8]
Definition: vga.c:27
#define __outpw(Port, Value)
Definition: pc.h:19
static LPHIST_ENTRY Top
Definition: history.c:53
NTKERNELAPI VOID NTAPI WRITE_REGISTER_UCHAR(IN PUCHAR Register, IN UCHAR Value)