home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Unsorted BBS Collection
/
thegreatunsorted.tar
/
thegreatunsorted
/
programming
/
misc_programming
/
data80.src
< prev
next >
Wrap
Text File
|
1989-12-28
|
28KB
|
505 lines
ifdef A386
biosdata segment use16 at 40h
else
biosdata segment at 40h
endif
;
; SEGMENT 40h, OFFSET 0 - 100h
;
; RS232 PORT ADDRESS 00h
;
comm_addr dw 1 dup(?) ;first port address of rs232
dw 1 dup(?) ;second port address of rs232
dw 2 dup(?) ;resvered
;
; FIRST PRIORITY PORT IS 03f8h, THE SECOND IS 02f8h
;
; PRINTER PORT ADDRESS 08h
;
prn_addr dw 1 dup(?) ;first port address of printer
dw 1 dup(?) ;second port address of printer
dw 1 dup(?) ;third port address of printer
;
; 03bch, 0378h, 0278h
;
; EXTENDED BIOS DATA AREA 0eh
;
extend_bios dw 1 dup(?) ;extended BIOS data area segment
;
; EQUIPMENT FLAG 10h
;
equip_flag dw 1 dup(?) ;bit 15, 14 -- # of printer
;bit 13 -- internal modem installed
;bit 12 -- reserved
;bit 11 - 9 -- # of rs232 card
;bit 8 -- reserved
;bit 7, 6 -- # of diskette drive
;if bit 0 = 1 then 00 = 1 drive
; 01 = 2 drives
; 10 = 3 drives
; 11 = 4 drives
;bit 5, 4 -- video mode
; 00 -- special card
; 01 -- 40 * 25 CGA
; 10 -- 80 * 25 CGA
; 11 -- 80 * 25 mono
;bit 3 -- reserved
;bit 2 -- pointing device installed
;bit 1 -- math. coprocessor installed
;bit 0 -- diskette drive installed
sys_switch db 1 dup(?) ; bit 7 -- reserved
; bit 6 -- 1 CGA
; 0 MDA/EGA
; bit 5 -- manufacture
; bit 4 -- SW 1-6 1 smart on
; 0 smart off
; bit 3 - 2 SW 1-7, 1-8
; 0 0 ROM BIOS, 640K(mode 1)
; 0 1 ROM BIOS, 896K(mode 3)
; 1 0 RAM BIOS, 640K(mode 2)
; 1 1 RAM BIOS, 896K(mode 4)
; bit 1 - 0 reserved
;
; MEMORY SIZE 13h
;
mem_size dw 1 dup(?) ;memory size in Kbyte
;
; ERROR CHECK POINTER 15h
;
err_chkptr db 1 dup(?) ;check pointer
err_chk db 1 dup(?) ;error code of check pointer
;
; KEYBOARD FLAG 17h
;
kb_flag1 db 1 dup(?) ;bit 7 -- insert function active
;bit 6 -- Caps lock active
;bit 5 -- Number lock active
;bit 4 -- Scroll lock active
;bit 3 -- Alt key depressed
;bit 2 -- Control key depressed
;bit 1 -- left shift key depressed
;bit 0 -- right shift key depressed
kb_flag2 db 1 dup(?) ;bit 7 -- Insert key depressed
;bit 6 -- Caps lock depressed
;bit 5 -- Number lock depressed
;bit 4 -- Scroll lock depressed
;bit 3 -- Ctrl + Num lock toggled
;bit 2 -- system key depressed
;bit 1 -- left Alt key depressed
;bit 0 -- left Cntl key depressed
alt_num db 1 dup(?) ;input # of Alt key
kb_bufhead dw 1 dup(?) ;head of keyboard buffer
kb_buftail dw 1 dup(?) ;tail of keyboard buffer
kb_buf dw 16 dup(?) ;16 words of keyboard buffer
;
; DISK DATA 3eh
;
disk_seek db 1 dup(?) ;seek status
;bit 7 -- disk drive interrupt
;bit 6 - 2 -- reserved
;bit 1 = 0 -- drive 1 : recalibrated
; before seek
;bit 0 = 0 -- drive 0 : recalibrated
motor_status db 1 dup(?) ;3f2h, motor status
;bit 7 -- writing
;bit 6 - 2 -- reserved
;bit 1 = 1 -- drive 1 is running
;bit 0 = 1 -- drive 0 is running
motor_count db 1 dup(?) ;motor count
disket_status db 1 dup(?) ;80h -- time out
;40h -- seek error
;20h -- NEC error
;10h -- CRC error
;0ch -- media type not found
;09h -- attach DMA 64k boundary
;08h -- DMA error
;06h -- media change line active
;04h -- record not found
;03h -- write protect
;02h -- address mark found
;01h -- bad command
;00h -- no error
NEC765_status db 7 dup(?) ;7 bytes of NEC765 status
;
; VIDEO DATA 49h
;
video_opmode db 1 dup(?) ;video mode flag
;0 -- 40 * 25
;1 -- 40 * 25
;2 -- 80 * 25
;3 -- 80 * 25
;4 -- 320 * 200
;5 -- 320 * 200
;6 -- 640 * 200
;7 -- 80 * 25
;11h -- 640 * 480
;13h -- 320 * 200
video_col dw 1 dup(?)
regen_buflen dw 1 dup(?) ;regen buffer length, byte
regen_bufhead dw 1 dup(?) ;regen buffer starting address
csr_pos dw 8 dup(?) ;8 words, cursor position of pages
csr_mode dw 1 dup(?) ;current cursor mode
active_pg db 1 dup(?) ;active page
crtc_base dw 1 dup(?) ;6845 base address
mode_ctrl db 1 dup(?) ;3d8h or 3b8h register value
color_palet db 1 dup(?) ;CGA palette setting
;bit 7, 6 -- reserved
;bit 5 -- select color set
;bit 4 -- reserved
;bit 3 -- hightlight (background)
;bit 2 -- red (background)
;bit 1 -- green (background)
;bit 0 -- blue (background)
;
; I/O ROM DATA 067h
;
romio_offset dw ? ; I/O ROM offset
romio_segmt dw ? ; I/O ROM segment
;
; INTERRUPT FLAG 06bh
;
int_flag db ? ; which interrupt happened
;
; bit 7 = 1 -- IRQ 7 -- interrupt f
; bit 6 = 1 -- IRQ 6 -- interrupt e
; bit 5 = 1 -- IRQ 5 -- interrupt d
; bit 4 = 1 -- IRQ 4 -- interrupt c
; bit 3 = 1 -- IRQ 3 -- interrupt b
; bit 2 = 1 -- IRQ 2 -- interrupt a
; bit 1 = 1 -- IRQ 1 -- interrupt 9
; bit 0 = 1 -- IRQ 0 -- interrupt 8
;
; RT/CMOS DATA 06ch
;
timer_low dw ? ; timer count(low word)
timer_high dw ? ; timer count(high word)
over_night db ? ; if timer is over one day - set bit to 1
;
; SYSTEM DATA AND FLAG 071h
;
break_key db ? ; if break is pressed key then set bit 7
warm_start dw ? ; warm start flag(=1234h)
; cache on(=1233H)
;
; I/O ROM DATA 074h
;
disk_status db ? ; fixed disk status
;
; 0000h - no error
; 0001h - invalid function request
; 0002h - bad address mark
; 0003h - write protect
; 0004h - sector not found
; 0005h - reset fault
; 0007h - drive parameter activity failed
; 0008h - DMA failed
; 0009h - DMA boundary error
; 000ah - bad track detected
; 000bh - bad sector flag detected
; 000dh - invalid number of sector on format
; 000eh - control data address mark detected
; 0010h - bad ECC on disk read
; 0011h - ECC corected data error
; 0020h - general controller failure
; 0040h - seek failure
; 0080h - timeout
; 00aah - drive not ready
; 00bbh - undifined error occurred
; 00cch - write fault on selected drive
; 00e0h - status error/error reg = 0
; 00ffh - sense operation failed
;
hdisk_num db ? ; # of hard disk
hdisk_ctrl db ? ; hard disk control byte
hdisk_boot_stat db ? ; reserved
; 80 - disk C error
; ; 40 - disk D error
;
; PRINTER AND RS232 TIMEOUT DATA 078h
;
prn1_time db ? ; first printer timeout count
prn2_time db ? ; second printer timeout count
prn3_time db ? ; third printer timeout count
db ? ; reserved
comm1_time db ? ; first rs232 timeout count
comm2_time db ? ; second rs232 timeout count
db ? ; reserved
db ? ; reserved
;
; KEYBOARD DATA 080h
;
kb_buftop dw ? ; keyboard buffer starting address
kb_bufend dw ? ; keyboard buffer ending address
;
; VIDEO DATA 084h
;
video_row db ? ; row
video_bytcha dw ? ; bytes/character
video_clr db ? ; mode options
;
; bit 7 -- clear/not clear (0/1) display buffer
; bit 6-0 -- reserved
;
video_feat db ? ; reserved
video_tymode db ? ; mode information
;
; bit 7 -- reserved
; bit 6 -- 1 -- enable display switch
; 0 -- disable display switch
; bit 5 -- reserved
; bit 4 -- 1 -- 8 X 16 font
; 0 -- 8 X 8 font
; bit 3 -- 1 -- default palette loading disabled
; 0 -- default palette loading enabled
; bit 2 -- 1 -- monochrome monitor attached
; 0 -- color monitor attached
; bit 1 -- 1 -- video summing enabled
; 0 -- video summing disabled
; bit 0 -- reserved
;
video_config db ? ; combination code
;
; 00h -- 00,00 no display
; 01h -- 00,01 mono
; 02h -- 00,02 CGA
; 03h -- 02,01 mono + CGA
; 04h -- 00,04 EGA
; 05h -- 04,01 MEGA + mono
; 06h -- 00,05 MEGA
; 07h -- 02,05 MEGA + CGA
; 08h -- 00,06 PGC
; 09h -- 01,06 PGC + mono
; 0ah -- 05,06 PGC + MEGA
; 0bh -- 00,08 VGA + color display
; 0ch -- 01,08 VGA + mono
; 0dh -- 00,07 MGA + mono display
; 0eh -- 02,07 MVGA + CGA
; 0fh -- 02,06 MVGA + PGA
; 10h -- 00,0a 5153 or 5154 color
; 11h -- 01,0a
; 12h -- 00,0c analog color
; 13h -- 01,0c
; 14h -- 00,0b analog monochrome
; 15h -- 01,0b
;
; DISK or DISKETTE MEDIA DATA 08bh
;
trans_rate db ? ; data transfer rate save area
;
; bit 7-6 -- last data transfer rate save area
; 00 : 500 kbs
; 01 : 300 kbs
; 10 : 250 kbs
; 11 : 500 kbs
; bit 5-1 -- reserved
; bit 0 -- adapter is DSP or COMBO
;
wdc_status db ? ; WDC status
hdisk_err db ? ; WDC error register
hdisk_intflag db ? ; hard disk interrupt flag
drive_indic db ? ; drive indicators
; bit 7 -- reserved
; bit 6 -- drive b: multi data rate capability determined
; (drive determined)
; bit 5 -- drive b: multi data rate format capability
; (valid when drive determined)
; bit 4 -- 80 track capability
; bit 3 -- reserved
; bit 2 -- drive a: multi data rate capabality determined
; (drive determined)
; bit 1 -- drive a: multi data rate format capabality
; (valid when drive determined)
; bit 0 -- 80 track capabality
;
driva_state db ? ; drive a: diskette state machine
;
; bit 7-6 -- data transfer rate
; 0 0 : 500 kbs
; 0 1 : reserved
; 1 0 : 250 kbs
; 1 1 : reserved
; bit 5 -- double stepping required(360k in 1.2m drive)
; bit 4 -- media/drive established
; bit 3 -- reserved
; bit 2 bit 1 bit 0
; 0 0 0 360k in 360k drive unestablished
; 0 0 1 360k in 1.2m drive unestablished
; 0 1 0 1.2m in 1.2m drive unestablished
; 0 1 1 360k in 360k drive established
; 1 0 0 360k in 1.2m drive established
; 1 0 1 1.2m in 1.2m drive established
; 1 1 0 reserved
; 1 1 1 none of the above
;
drivb_state db ? ; drive b: diskette state machine
;
; as same as drive_a_state
;
driva_oper db ? ; drive a: state operation started
;
; bit 7-6 -- data transfer rate
; (valid when media determined)
; 00 : 500 kbs
; 01 : 300 kbs
; 10 : 250 kbs
; 11 : 500 kbs
; bit 5 -- media double stepping required
; bit 4 -- media determined/established
; bit 3 -- reserved
; bit 2 -- multi data rate capabality determined
; (drive determined)
; bit 1 -- multi data rate format capability
; bit 0 -- 80 track capabality
;
drivb_oper db ? ; drive b: state operation started
;
; as same as drive_a_op
;
driva_cylin db ? ; present cylinder number of drive a:
drivb_cylin db ? ; present cylinder number of drive b:
;
; KEYBOARD FLAGS 096h
;
kb_flag3 db ? ; keyboard mode state and type flag
;
; bit 0 -- 1 -- last code was e1 hidden code
; bit 1 -- 1 -- last code was e0 hidden code
; bit 2 -- 1 -- right crtl key depressed
; bit 3 -- 1 -- right alt key depressed
; alt graphics key depressed(WT only)
; bit 4 -- 1 -- 101/102 keyboard installed
; bit 5 -- 1 -- enhanced keyboard installed
; bit 6 -- 1 -- force Num Lock when read id and enhanced keyboard
; bit 7 -- 1 -- doing read ID(bit 0)
;
kb_ldflag db ? ; key led flags
;
; bit 0 -- 1 -- scroll lock led
; bit 1 -- 1 -- Num lock led
; bit 2 -- 1 -- caps lock led
; bit 3 -- 1 -- reserved(=0)
; bit 4 -- 1 -- acknowledgement received
; bit 5 -- 1 -- resend recrived flag
; bit 6 -- 1 -- mode update
; bit 7 -- 1 -- keyboard transmit error flag
;
; REAL TIME CLOCK DATA 98h
;
wait_offset dw ? ; offset of user wait flag
wait_segmt dw ? ; segment of user wait flag
wait_low dw ? ; low word of user wait flag
wait_high dw ? ; high word of user wait flag
wait_active db ? ; wait active flag
; 00h --> POST acknowledged
; 01h --> busy
; 80h --> POSTED
;
; FIXED DISK INTERRUPT VECTOR SAVED AREA
; VIDEO PARAMETER POINTER A1h
;
db 3 dup (?) ; reserved
hdisk_intvec dw 2 dup (?) ; saved fixed disk interrupt vector
video_parptr dd 1 dup (?) ; pointer to video parameters
; dword 1 video parameter table pointer
; dword 2 reserved
; dword 3 alpha mode auxiliary pointer (initialized to 00:00)
; size description
; _________________________________________________________
; byte bytes per character
; byte block to load, 0 = normal operation
; word number of font, 256d = normal operation
; word character offset, 0 = normal operation
; dword pointer to a font table
; byte display rows. if it contains 'ff', the maximum
; caculated value is used.
; byte list of mode values for which this font can be used
; the end of this list is 'ff'.
; dword 4 graphic mode auxiliary pointer (initialized to 00:00)
; size description
; -------------------------------------------------------------
; byte displayable rows
; word bytes per character
; dword pointer to a font table
; byte list of mode values for which this font can be used.
; the end of list is 'ff'.
db 27 dup (?) ; reserved
;
; Write Protect service routine C7H
;
bios_ds dw ? ; save user DS
vacc_off dw ? ;
vacc_seg dw ? ;
bios_vac db ? ; for BIOS vaccine
; bit 0 - 1 - WDD write Protect
; bit 1 - 1 - FDD write Protect
; bit 2 - 1 - WDD Write Protect mesg
; bit 3 - 1 - FDD Write Protect mesg
; bit 4 - 1 - System is 1100/33
; bit 5-7 reserved
day_count dw ? ; day count
;
; System speed status and Cache status(D0H)
;
status_speed db ? ; bit 7-6 speed status
; 1 1 smart
; 0 1 Top speed
; 0 0 none of above
; bit 5 Weitek 3167 Math coprocessor
; bit 4 for 1100/25/20C
; 1 : 1100/25
; 0 : 1100/20C
; for MSAT/16/20
; 1 : MSAT/20
; 0 : MSAT/16
; bit 3 for 1100/25/20C only
; 1 : cache on
; 0 : cache off
; bit 2 0 : RAM BIOS good
; 1 : RAM BIOS bad
; bit 1 0 : RAM VIDEO good
; 1 : RAM VIDEO bad
; bit 0 0 : console exist
; 1 : console unexist
bios_speed db ? ; bit 7-5 speed parameter(valid when bit 2 = 1)
; 000 6 MHZ
; 001 8 MHZ
; xxx bigger value, more fast
; bit 4 1 : flush cache memory
; 0 :
; bit 3 1 : enable cache system
; 0 : disable cache system
; bit 2 speed select
; 1 : enable speed change
; 0 : disable speed change
; bit 1 1 : enable RAM BIOS write
; 0 : disable RAM BIOS Write
; bit 0 1 : enable RAM BIOS
; 0 : disable RAM BIOS
bios_d db ? ;
; bit 7 0 : not in setup
; 1 : in setup
; bit 6 0 : non CONNER
; 1 : CONNER WDD for 2nd WDD
; bit 5 0 : non CONNER
; 1 : CONNER WDD for 1st WDD
; bit 4 0 : 1st WDD active
; 1 : 2nd WDD active
; bit 3 reserved
; bit 2 0 : cache good
; 1 : cache bad
; bit 1 reversed
; bit 0 0 : jump F000:FFF0H
; 1 : cold start
db 29 dup(?) ; reserved
db 16 dup (?) ; reserved for user
;
; PRINTER SCREEN FLAG 100h
;
prn_scren db ? ;printer screen status byte
;000h --> ready
;001h --> busy
;0ffh --> error
biosdata ends