9 #define VGA_FBADDR ((void*)phys_to_virt(0xa0000))
11 int vga_setmode(int mode);
12 int vga_setmodex(void);
14 #define vga_planemask(mask) vga_sc_write(VGA_SC_MAPMASK_REG, mask)
17 void vga_setpal(int16_t idx, uint8_t r, uint8_t g, uint8_t b);
18 #pragma aux vga_setpal = \
34 parm[ax][bl][bh][cl] \
36 #endif /* __WATCOMC__ */
38 #define vga_sc_write(reg, data) \
39 outpw(VGA_SC_ADDR_PORT, (uint16_t)(reg) | ((uint16_t)(data) << 8))
40 #define vga_sc_read(reg) \
41 (outp(VGA_SC_ADDR_PORT, reg), inp(VGA_SC_DATA_PORT))
42 #define vga_crtc_write(reg, data) \
43 outpw(VGA_CRTC_PORT, (uint16_t)(reg) | ((uint16_t)(data) << 8))
44 #define vga_crtc_read(reg) \
45 (outp(VGA_CRTC_ADDR_PORT, reg), inp(VGA_CRTC_DATA_PORT))
46 #define vga_crtc_wrmask(reg, data, mask) \
47 outp(VGA_CRTC_DATA_PORT, (crtc_read(reg) & ~(mask)) | (data))