VirtualBox

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

Last change on this file since 78292 was 76565, checked in by vboxsync, 6 years ago

Devices: Use VBOX_INCLUDED_SRC_ as header guard prefix with scm.

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