MicrOS
registerfunctions.h File Reference
#include <stdint.h>

Go to the source code of this file.

Macros

#define VGA_VRAM   (unsigned char*)0xC00A0000
 
#define VGA_VRAM_2   (unsigned char*)0xC00B8000
 
#define miscPort   0x3c2
 
#define crtcIndexPort   0x3d4
 
#define crtcDataPort   0x3d5
 
#define crtcIndexPortText   0x3b4
 
#define crtcDataPortText   0x3b5
 
#define sequencerIndexPort   0x3c4
 
#define sequencerDataPort   0x3c5
 
#define graphicsControllerIndexPort   0x3ce
 
#define graphicsControllerDataPort   0x3cf
 
#define attributeControllerIndexPort   0x3c0
 
#define attributeControllerReadPort   0x3c1
 
#define attributeControllerWritePort   0x3c0
 
#define attributeControllerResetPort   0x3da
 
#define peekb(S, O)   *(unsigned char *)(16uL * (S) + (O))
 
#define pokeb(S, O, V)   *(unsigned char *)(16uL * (S) + (O)) = (V)
 
#define pokew(S, O, V)   *(unsigned short *)(16uL * (S) + (O)) = (V)
 
#define bit_get(p, m)   ((p) & (m))
 
#define bit_set(p, m)   ((p) |= (m))
 
#define bit_clear(p, m)   ((p) &= ~(m))
 
#define bit_flip(p, m)   ((p) ^= (m))
 
#define bit_write(p, m, v)   ((v) ? bit_set(p,m) : bit_clear(p,m))
 

Functions

void writeRegisters (uint8_t *registers)
 
void writeRegistersText (uint8_t *registers)
 
void readRegisters (unsigned char *regs)
 
void setFont (uint8_t *buf, uint8_t font_height)
 
void set_plane (unsigned p)
 
void set_vga_palette (unsigned char *palette)
 
static int32_t _abs (int32_t _x)
 

Macro Definition Documentation

◆ attributeControllerIndexPort

#define attributeControllerIndexPort   0x3c0

◆ attributeControllerReadPort

#define attributeControllerReadPort   0x3c1

◆ attributeControllerResetPort

#define attributeControllerResetPort   0x3da

◆ attributeControllerWritePort

#define attributeControllerWritePort   0x3c0

◆ bit_clear

#define bit_clear (   p,
 
)    ((p) &= ~(m))

◆ bit_flip

#define bit_flip (   p,
 
)    ((p) ^= (m))

◆ bit_get

#define bit_get (   p,
 
)    ((p) & (m))

◆ bit_set

#define bit_set (   p,
 
)    ((p) |= (m))

◆ bit_write

#define bit_write (   p,
  m,
 
)    ((v) ? bit_set(p,m) : bit_clear(p,m))

◆ crtcDataPort

#define crtcDataPort   0x3d5

◆ crtcDataPortText

#define crtcDataPortText   0x3b5

◆ crtcIndexPort

#define crtcIndexPort   0x3d4

◆ crtcIndexPortText

#define crtcIndexPortText   0x3b4

◆ graphicsControllerDataPort

#define graphicsControllerDataPort   0x3cf

◆ graphicsControllerIndexPort

#define graphicsControllerIndexPort   0x3ce

◆ miscPort

#define miscPort   0x3c2

◆ peekb

#define peekb (   S,
 
)    *(unsigned char *)(16uL * (S) + (O))

◆ pokeb

#define pokeb (   S,
  O,
 
)    *(unsigned char *)(16uL * (S) + (O)) = (V)

◆ pokew

#define pokew (   S,
  O,
 
)    *(unsigned short *)(16uL * (S) + (O)) = (V)

◆ sequencerDataPort

#define sequencerDataPort   0x3c5

◆ sequencerIndexPort

#define sequencerIndexPort   0x3c4

◆ VGA_VRAM

#define VGA_VRAM   (unsigned char*)0xC00A0000

◆ VGA_VRAM_2

#define VGA_VRAM_2   (unsigned char*)0xC00B8000

Function Documentation

◆ _abs()

static int32_t _abs ( int32_t  _x)
inlinestatic

◆ readRegisters()

void readRegisters ( unsigned char *  regs)

◆ set_plane()

void set_plane ( unsigned  p)

◆ set_vga_palette()

void set_vga_palette ( unsigned char *  palette)

◆ setFont()

void setFont ( uint8_t *  buf,
uint8_t  font_height 
)

◆ writeRegisters()

void writeRegisters ( uint8_t *  registers)

◆ writeRegistersText()

void writeRegistersText ( uint8_t *  registers)