Home

Zurück zur Assemblerauswahlseite

8086 Assembler:
EQUs und Datendefinitionen für BIOS zur gefälligen Übernahme

Dieser Abschnitt enthält eine Sammlung von EQUs und Datendefinitionen für BIOS

Bei Bedarf bitte die entsprechenden Teile übernehmen

Zur Verbesserung der Lesbarkeit ist die Programmauflistung maschinell in Kleinschrift umcodiert worden. Ich hoffe, es hat sich dabei kein Fehler eingeschlichen!

                subttl rom bios data areas and equates
;-------
; equates
;-------
port_a          equ     60h     ;8255 port a addr
port_b          equ     61h     ;8255 port b addr
port_c          equ     62h     ;8255 port c addr
cmd_port        equ     63h
inta00          equ     20h     ;8259 port
inta01          equ     21h     ;8259 port
eoi             equ     20h
timer           equ     40h
tim_ctl         equ     43h     ;8253 timer control port addr
timer0          equ     40h     ;8253 timer/cnter 0 port addr
tmint           equ     01      ;timer 0 intr recvd mask
dma08           equ     08      ;dma status reg port addr
dma             equ     00      ;dma channel 0 address reg port addr
max_period      equ     540h
min_period      equ     410h
kbd_in          equ     60h     ;keyboard data in addr port
kbdint          equ     02      ;keyboard intr mask
kb_data         equ     60h     ;keyboard scan code port
kb_ctl          equ     61h     ;control bits for keyboard sense data
;-------
; 8088 interrupt locations
;-------
abs0            segment at 0
stg_loc0        label   byte
                org     2*4
nmi_ptr         label   word
                org     5*4
ints_ptr        label   word
                org     8*4
int_addr        label   word
int_ptr         label   dword
                org     10h*4
video_int       label   word
                org     1dh*4
parm_ptr        label   dword   ;pointer to video parms
                org     01eh*4  ;interrupt 1eh
disk_ptr        label   dword
                org     01fh*4  ;location of pointer
ext_ptr         label   dword   ;pointer to extension
                org     7c00h
boot_locn       label   far
abs0            ends
                page
;-------
; stack -- used during initialization only
;-------
stack           segment at 30h
                dw      128 dup(?)
tos             label   word
stack           ends
;-------
; rom bios data areas
;-------
data            segment at 40h
rs232_base      dw      4 dup(?) ;addresses of rs232 adapters
printer_base    dw      4 dup(?) ;addresses of printers
equip_flag      dw      ?       ;installed hardware
mfg_tst         db      ?       ;initialization flag
memory_size     dw      ?       ;memory size in k bytes
io_ram_size     dw      ?       ;memory in i/o channel
                page
;-------
; keyboard data areas
;-------
kb_flag         db      ?
;------ shift flag equates within kb_flag
ins_state       equ     80h     ;insert state is active
caps_state      equ     40h     ;caps lock state has been toggled
num_state       equ     20h     ;num lock state has been toggled
scroll_state    equ     10h     ;scroll lock state has been toggled
alt_state       equ     08h     ;alternate shift key depressed
ctl_shift       equ     04h     ;control shift key depressed
left_shift      equ     02h     ;left shift key depressed
right_shift     equ     01h     ;right shift key depressed

kb_flag_1       db      ?       ;second byte of keyboard status
ins_shift       equ     80h     ;insert key is depressed
caps_shift      equ     40h     ;caps lock key is depressed_shift
num_lock        equ     20h     ;num lock key is depressed
scroll_shift    equ     10h     ;scroll lock key is depressed
hold_state      equ     08h     ;suspend key has been toggled

alt_input       db      ?       ;storage for alternate keypad entry
buffer_head     dw      ?       ;pointer to head of keyboard buffer
buffer_tail     dw      ?       ;pointer to tail of keyboard buffer
kb_buffer       dw      16 dup(?)       ;room for 15 entries
kb_buffer_end   label   word
;------ head = tail indicates that the buffer is empty
num_key         equ     69      ;scan code for number lock
scroll_key      equ     70      ;scroll lock key
alt_key         equ     56      ;alternate shift key scan code
ctl_key         equ     29      ;scan code for control key
caps_key        equ     58      ;scan code for shift lock
left_key        equ     42      ;scan code for left shift
right_key       equ     54      ;scan code for right shift
ins_key         equ     82      ;scan code for insert key
del_key         equ     83      ;scan code for delete key
                page
;--------
; diskette data areas
;--------
seek_status     db      ?       ;drive recalibration status
; bit 3-0 = drive 3-0 needs recal before next seek if bit is = 0
int_flag        equ     080h    ;interrupt occurrence flag
motor_status    db      ?       ;motor status
; bit 3-0 = drive 3-0 is currently running
; bit 7   = current operation is a write, requires delay
motor_count     db      ?       ;time out counter for drive turn off
motor_wait      equ     37      ;two seconds of counts for motor turn off

diskette_status db      ?       ;single byte of return code info for status
time_out        equ     80h     ;attachment failed to respond
bad_seek        equ     40h     ;seek operation failed
bad_nec         equ     20h     ;nec controller has failed
bad_crc         equ     10h     ;bad crc on diskette read
dma_boundary    equ     09h     ;attempt to dma across 64k boundary
bad_dma         equ     08h     ;dma overrun on operation
record_not_fnd  equ     04h     ;requested sector not found
write_protect   equ     03h     ;write attempted on write prot disk
bad_addr_mark   equ     02h     ;address mark not found
bad_cmd         equ     01h     ;bad command passed to diskette i/o

nec_status      db      7 dup(?)        ;status bytes from nec
;-------
; video display data area
;-------
crt_mode        db      ?       ;current crt mode
crt_cols        dw      ?       ;number of columns on screen
crt_len         dw      ?       ;length of regen in bytes
crt_start       dw      ?       ;starting address in regen buffer
cursor_posn     dw      8 dup(?) ;cursor for each of up to 8 pages
cursor_mode     dw      ?       ;current cursor mode setting
active_page     db      ?       ;current page being displayed
addr_6845       dw      ?       ;base address for active display card
crt_mode_set    db      ?       ;current setting of the 3x8 register
crt_pallette    db      ?       ;current pallette setting color card
;-------
; cassette data area
;-------
edge_cnt        dw      ?       ;time count at data edge
crc_reg         dw      ?       ;crc register
last_val        db      ?       ;last input value
;-------
; timer data area
;-------
timer_low       dw      ?       ;low word of timer count
timer_high      dw      ?       ;high word of timer count
timer_ofl       db      ?       ;timer has rolled over since last read
;counts_sec     equ     18
;counts_min     equ     1092
;counts_hour    equ     65543
;counts_day     equ     1573040 = 1800b0h
;--------
; system data area
;--------
bios_break      db      ?       ;bit 7 = 1 if break key has been depressed
reset_flag      dw      ?       ;word = 1234h if keyboard reset underway
data            ends
;-------
; extra data area
;-------
xxdata          segment at 50h
status_byte     db      ?
xxdata          ends
;-------
; video display buffer
;-------
video_ram       segment at 0b800h
regen           label   byte
regenw          label   word
                db      16384 dup(?)
video_ram       ends

Letztes Upload: 13.10.2015 um 14:09:58