VirtualBox

source: vbox/trunk/src/VBox/Devices/Graphics/BIOS/vgabios.h@ 49983

Last change on this file since 49983 was 43152, checked in by vboxsync, 12 years ago

VGABIOS: Allow building with DEBUG_VGA again.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.9 KB
Line 
1#ifndef vgabios_h_included
2#define vgabios_h_included
3
4/* Types */
5//typedef unsigned char Bit8u;
6//typedef unsigned short Bit16u;
7//typedef unsigned long Bit32u;
8typedef unsigned short Boolean;
9
10/* Defines */
11
12#define SET_AL(val8) AX = ((AX & 0xff00) | (val8))
13#define SET_BL(val8) BX = ((BX & 0xff00) | (val8))
14#define SET_CL(val8) CX = ((CX & 0xff00) | (val8))
15#define SET_DL(val8) DX = ((DX & 0xff00) | (val8))
16#define SET_AH(val8) AX = ((AX & 0x00ff) | ((val8) << 8))
17#define SET_BH(val8) BX = ((BX & 0x00ff) | ((val8) << 8))
18#define SET_CH(val8) CX = ((CX & 0x00ff) | ((val8) << 8))
19#define SET_DH(val8) DX = ((DX & 0x00ff) | ((val8) << 8))
20
21#define GET_AL() ( AX & 0x00ff )
22#define GET_BL() ( BX & 0x00ff )
23#define GET_CL() ( CX & 0x00ff )
24#define GET_DL() ( DX & 0x00ff )
25#define GET_AH() ( AX >> 8 )
26#define GET_BH() ( BX >> 8 )
27#define GET_CH() ( CX >> 8 )
28#define GET_DH() ( DX >> 8 )
29
30#define SET_CF() FLAGS |= 0x0001
31#define CLEAR_CF() FLAGS &= 0xfffe
32#define GET_CF() (FLAGS & 0x0001)
33
34#define SET_ZF() FLAGS |= 0x0040
35#define CLEAR_ZF() FLAGS &= 0xffbf
36#define GET_ZF() (FLAGS & 0x0040)
37
38#define SCROLL_DOWN 0
39#define SCROLL_UP 1
40#define NO_ATTR 2
41#define WITH_ATTR 3
42
43#define SCREEN_SIZE(x,y) (((x*y*2)|0x00ff)+1)
44#define SCREEN_MEM_START(x,y,p) ((((x*y*2)|0x00ff)+1)*p)
45#define SCREEN_IO_START(x,y,p) ((((x*y)|0x00ff)+1)*p)
46
47/* Macro for stack-based pointers. */
48#define STACK_BASED _based(_segname("_STACK"))
49
50/* Output. */
51extern void __cdecl printf(char *s, ...);
52
53/* VGA BIOS routines called by VBE. */
54extern void biosfn_set_video_mode(uint8_t mode);
55extern uint16_t biosfn_read_video_state_size2(uint16_t state);
56extern uint16_t biosfn_save_video_state(uint16_t CX, uint16_t ES, uint16_t BX);
57extern uint16_t biosfn_restore_video_state(uint16_t CX, uint16_t ES, uint16_t BX);
58
59/* Allow stand-alone compilation. */
60#ifndef VBOX_VERSION_STRING
61#include <VBox/version.h>
62#endif
63
64#endif
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette