1 Star 1 Fork 0

Xthoa / uFexos1

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
bios.h 2.50 KB
一键复制 编辑 原始数据 按行查看 历史
Xthoa 提交于 2021-01-26 09:12 . 'v7.a'
#include "types.h"
//Bios Startup Data
struct BiosData{
//Start from 0x400
u16 com1,com2,com3,com4;
u16 lpt1,lpt2,lpt3;
u8 ebda_lo;
u8 ebda_hi;
//0x410
u16 equipf;
u8 kbd_link_err_cnt;
u16 memsize; //KB
u8 resv_1;
u8 ps2_bios_ctrlf;
u8 kbdflg;
u8 kbdflg1;
u8 keypad_entry;
u16 kbdbuf_head; //offset from 0x400
u16 kbdbuf_tail;
u8 kbdbuf[32];
u8 frive_recalib_stat;
u8 diskette_motor_stat;
//0x440
u8 motor_shutoff_cnt; //decremented by INT8
u8 last_diskette_opr_stat;
u8 nec_diskette_ctrl_stat[7];
u8 cur_video_mode;
u16 scr_cols;
u16 video_buf_sz; //Bytes
u16 cur_video_page_ofst;
//0x450
u16 cursposes[8]; //reflect disimmediately
//0x460
u8 curs_end_line; //D n t m d f !
u8 curs_start_line; // o ' o i y
u8 act_disp_page_num;
u16 crt6845_baseport_adr;
//3b4=mono,3d4=color
u8 crt6845_mode_ctrl_reg_val; //port 0x3X8
u8 cga_cur_palatte; //port 0x3D9
//0x467
u8 multiple_uses_field[5];
//dword cs:ip for 286 return from protect mode
//dword temp storage for ss:sp during shutdown
//dword day counter on all products after AT
//dword ps/2 ptr -> reset code with mem preserved
//5 bytes cassette tape control before AT
u32 daily_timer;
//incremented by INT8; read/set by INT1A
//0x470
u8 clock_rollover_flg;
u8 bios_brk_flg;
u16 spft_reset_flg; //via ctrl-alt-del or jmp ffff:0
u8 stat_hdisk_opr;
u8 attach_hdisk_cnt;
u8 xt_fixed_disk_drive_ctrl;
u8 port_ofst_cur_fixed_disk_adapt;
u8 timeout_lpt[4];
u8 timeout_com[4];
//0x480
u16 kbdbuf_start;
u16 kbdbuf_end;
u8 scr_rows;
union{
u16 char_height;
struct{
u8 char_rep;
u8 key_rep_delay; //initial
};
};
u8 cur_fn_key_num;
u8 kbd_stat_3;
u8 video_data;//mcga and vga
u8 dcc_tab_idx;
//display combination code table index (ega)
u8 diskette_data_rate_selected;
u8 hdisk_stat; //ret by ctrlr
u8 hdisk_err; //|^|
u8 hdisk_int_ctrl;
u8 comb_disk_card;
//0x490
u8 drive_media_stat[4];
u8 track_seek_drv0;
u8 track_seek_drv1;
u8 kbd_type;
u8 kbd_led;
u32 ptr_usr_wait_complete_flg;
u32 user_wait_timeout; //ms
//0x4a0
u8 rtc_wait_func;
u8 lana_dma_channel;
u8 lana_stat[2];
u32 hdisk_intvec;
u32 bios_video_tab_ptr;
u8 resv_2[8];
//below: convertible
u8 kdb_nmi_ctrl_flg;
u32 kdb_brk_pend;
u8 port60_queue;
u8 scan_code_key;
u8 nmibuf_head;
u8 nmibuf_tail;
u8 nmibuf[16];
u16 day_cnt;
//0x4f0
u8 intra_app_share_area[16];
};
#define bda ((struct BiosData*)0x400)
//Booting Config
struct BootConf{
u8 :1;
u8 apic :1;
u8 dump :1;
u8 :5;
};
#define bootconf ((struct BootConf*)0x7dc0)
C
1
https://gitee.com/xthoa/u-fexos1.git
git@gitee.com:xthoa/u-fexos1.git
xthoa
u-fexos1
uFexos1
master

搜索帮助