ееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееееh tod_min equ byte ptr .81h tod_sec equ byte ptr .82h open_vec equ word ptr .88h num_vir_cons equ 4 ; number of virtual consoles ;************************************************************************ ;* * ;* SCREEN PARAMETERS * ;* 4/7/83 dwg * ;************************************************************************ columns_per_screen equ 80 rows_per_screen equ 24 screen_siz equ rows_per_screen * columns_per_screen ;in words screens_size equ ((2 * screen_siz + 15)/16) * num_vir_cons ;storage for all the screens ;in paragraphs bell_feature equ 0 motor_feature equ 0 hstsiz equ 256 ;physical sector size cpm86_bios equ 0 cpm equ 0 ccpm equ 1 nul equ 00h soh equ 01h stx equ 02h etx equ 03h eott equ 04h enq equ 05h ack equ 06h bel equ 07h bs equ 08h ht equ 09h lf equ 0ah vt equ 0bh ff equ 0ch cr equ 0dh so equ 0eh shi equ 0fh dle equ 10h dc1 equ 11h dc2 equ 12h dc3 equ 13h dc4 equ 14h nak equ 15h syn equ 16h etb equ 17h can equ 18h em equ 19h subb equ 1ah esc equ 1bh fs equ 1ch gs equ 1dh rds equ 1eh us equ 1fh del equ 7fh xon equ dc1 xoff equ dc3 EJECT ;************************************************************************ ;* * ;* CCP/M-86 SYSTEM EQUATES * ;* 4/7/83 dwg * ;************************************************************************ true equ 0ffffh false equ 0 ; CCP/M-86 system calls used by the XIOS ;process control functions: p_delay equ 141 ;delay specified number of ticks p_dispatch equ 142 ;let other another process run p_pdadr equ 156 ;get double word pointer of process ;descriptor p_term equ 143 ;terminate process ;device control functions: dev_poll equ 131 ;poll device dev_flagwait equ 132 ;flag wait dev_flagset equ 133 ;flag set ;Time function: t_seconds equ 155 ;get date,hours,minutes,seconds eject ; Definition of flag table used by by CCP/M and this XIOS ;CCP/M flags: ;0 - is reserved tick_flag equ 1 ;tick flag number sec_flag equ 2 ;seconds flag number min_flag equ 3 ;minutes flag number ;XIOS flags: fdc_flag equ 4 ;disk operation flag key_flag equ 5 ;key available flag bell_flag equ 6 eject ;************************************************************************ ;* * ;* PROCESS DESCRIPTOR * ;* * ;************************************************************************ ; The Process Descriptor (PD) along with the ; associated User Data Area (UDA), describe ; the current state of a Process under CCP/M-86. ; The process descriptor is always within the System ; Data Segment. ; Process Descriptor: ; +-----+-----+-----+-----+-----+-----+-----+-----+ ; 00| link | thread |stat |prior| flag | ; +-----+-----+-----+-----+-----+-----+-----+-----+ ; 08| name | ; +-----+-----+-----+-----+-----+-----+-----+-----+ ; 10| uda |disk | user| reserved | ; +-----+-----+-----+-----+-----+-----+-----+-----+ ; 18| resereved | parent | ; +-----+-----+-----+-----+-----+-----+-----+-----+ ; 20|cons | reserved |list | reserved | ; +-----+-----+-----+-----+-----+-----+-----+-----+ ; 28| reserved | ; +-----+-----+-----+-----+-----+-----+-----+-----+ ; link - used for placement into System Lists ; thread - link field for Thread List ; stat - current process activity ; prior - priority ; flag - process state flags ; name - name of process ; uda - segment address of user data area ; disk - current default disk ; user - current default user number ; mem - pointer to MD list of memory owned ; by this process ; parent - process that created this process ; cons - default console device (doesn't imply ownership) ; list - default list device (doesn't imply ownership) eject p_link equ word ptr 0 p_thread equ word ptr p_link + word p_stat equ byte ptr p_thread + word p_prior equ byte ptr p_stat + byte p_flag equ word ptr p_prior + byte p_name equ byte ptr p_flag + word p_uda equ word ptr p_name + 8 p_disk equ byte ptr p_uda + word p_user equ byte ptr p_disk + byte p_mem equ word ptr p_user + 3 p_parent equ word ptr p_mem + 8 p_cons equ byte ptr p_parent + word p_list equ byte ptr p_cons + 4 pd_len equ 30H ; Values of Process descriptor p_status field: ps_run equ 0 ;in ready list root ps_poll equ 1 ;in poll list ps_delay equ 2 ;in delay list ps_swap equ 3 ;in swap list ps_term equ 4 ;terminating ps_sleep equ 5 ;sleep processing ps_dq equ 6 ;in dq list ps_nq equ 7 ;in nq list ps_flagwait equ 8 ;in flag table ps_ciowait equ 9 ;waiting for character ; Bit flags in Process descriptor p_flag field: pf_sys equ 00001h ;system process pf_keep equ 00002h ;do not terminate pf_kernal equ 00004h ;resident in kernal pf_pure equ 00008h ;pure memory descibed pf_table equ 00010h ;from pd table pf_resource equ 00020h ;waiting for resource pf_raw equ 00040h ;raw console i/o pf_ctlc equ 00080h ;abort pending pf_active equ 00100h ;active tty pf_tempkeep equ 00200h ;don't terminate yet... pf_ctld equ 00400h ;explicit detach occured pf_childabort equ 00800h ;child terminated abnormally pf_noctls equ 01000h ;control S not allowed pf_dskld equ 02000h ;process was loaded from disk eject ;************************************************************************ ;* * ;* Console Control Block * ;* * ;************************************************************************ ;* ;* The CCB is used by the system to control the virtual ;* consoles. There must be one correctly initialiazed CCB ;* in the XIOS per virtual console. ;* ;* +---------+---------+---------+---------+ ;* 00 | owner | reserved | ;* +---------+---------+---------+---------+ ;* 04 | reserved | ;* +---------+---------+---------+---------+ ;* 08 | mimic | reserved | ;* +---------+---------+---------+---------+ ;* 0C | reserved | state | ;* +---------+---------+---------+---------+ ;* 10 | maxbufsiz | reserved | ;* +---------+---------+---------+---------+ ;* 14 | reserved | ;* +---------+---------+---------+---------+ ;* 18 | reserved | ;* +---------+---------+---------+---------+ ;* 1C | reserved | ;* +---------+---------+---------+---------+ ;* 20 | reserved | ;* +---------+---------+---------+---------+ ;* 24 | reserved | ;* +---------+---------+---------+---------+ ;* 28 | reserved | ;* +---------+---------+---------+---------+ ;* ;* ;* ;* owner - current owner of device ;* if 0, no owner ;* mimic - list dev that mimics us. ;* 0ffh means no mimic device ;* state - current state of virtual console ;* maxbufsiz - maximum file size for buffered mode eject c_owner equ word ptr 00h c_mimic equ byte ptr 08h c_state equ word ptr 0Eh c_maxbufsiz equ word ptr 10h ccblen equ 2ch ;CCB state flags csm_buffered equ 00001h csm_background equ 00002h csm_purging equ 00004h csm_noswitch equ 00008h csm_abort equ 00020h csm_filefull equ 00040h csm_ctrlS equ 00080h csm_ctrlO equ 00100h csm_ctrlP equ 00200h eject ;************************************************************************ ;* * ;* Memory Descriptor * ;* * ;************************************************************************ ;* GENCCPM creates an MD per memory partition specified, ;* links them together and roots the list at the Memory Free ;* list location in SYSDAT. ;* The XIOS in the INIT: routine can trim this list to ;* be in the bounds of actual memory ;* +---------+---------+---------+---------+ ;* 04 | link | start | ;* +---------+---------+---------+---------+ ;* 08 | length | reserved | ;* +---------+---------+---------+---------+ ;* 0C | reserved | ;* +-------------------+ ;* link - offset of next MD, 0 if end of list ;* start - beginning paragraph of free memory ;* length - size of partition in paragraphs md_link equ word ptr 0 md_start equ word ptr md_link + word md_length equ word ptr md_start + word mdlen equ md_length + 4 EJECT ;************************************************************************ ;* * ;* SCREEN STRUCTURES * ;* 4/7/83 dwg * ;************************************************************************ ; Each virtual console has a structure of the following ; format associated with it. (SS = Screen Structure) ; The data in this structure is dependent on the type of screen ; supported and any escape sequence handling in IO_CONOUT. ; Note: SS_CURSOR is the byte offset of the cursor relative ; to the screen segment. SS_ROW, SS_COLUMN are relative to 0 ; and are word offsets, i.e., if SS_ROW is 0 and SS_COLUMN is 1, ; they refer to bytes 2 and 3 in the video RAM or a background ; screen's data area. num_pf_keys equ 17 ; f1 - f12, left rght ulft up dn pfk_entry_length equ 20 ; max bytes in function string ss_cursor equ word ptr 0 ;points at data/attrib ss_oldcursor equ word ptr ss_cursor + word ss_escape equ word ptr ss_oldcursor + word ;escape routine to return to ss_screen_seg equ word ptr ss_escape + word ;data for screen image ss_xy equ word ptr ss_screen_seg + word ;overlay row, col ss_row equ byte ptr ss_xy ;current row ss_column equ byte ptr ss_row + byte ;current col ss_oldxy equ word ptr ss_xy + word ;overlay old row, col ss_oldrow equ byte ptr ss_oldxy ;old row ss_oldcolumn equ byte ptr ss_oldxy + byte ;old col ss_attribute equ byte ptr ss_oldxy + word ss_mode equ byte ptr ss_attribute + byte ; the following items were added to provide flexibility for the future ss_const equ word ptr ss_mode + byte ss_conin equ word ptr ss_const + word ; the following items were added in support of function key expansion ss_pfk_offset equ word ptr ss_conin + word ss_pfk_base equ word ptr ss_pfk_offset + word ; the following items were added in support of escape sequence switching ss_sp_ch_tab equ word ptr ss_pfk_base + word ss_sp_fn_tab equ word ptr ss_sp_ch_tab + word ss_esc_tab equ word ptr ss_sp_fn_tab + word ss_escfun_tab equ word ptr ss_esc_tab + word ; the following items were added in support of esc seq pgmg of func keys ss_fpgm_off equ word ptr ss_escfun_tab + word ss_fpgm_count equ byte ptr ss_fpgm_off + word ; the following items were added in support of non-contention for ; the function key table and the shunt resource which is used both by ; the conin_pfk_activity and the escape seq function inq. ss_shunt equ byte ptr ss_fpgm_count+ byte ss_fun_wrt_lock equ byte ptr ss_shunt+byte ss_len equ ss_fun_wrt_lock + byte ; ss_mode byte bit values ssm_reverse equ 00000001B ;1 = if reverse video ;0 = in normal ssm_no_wrap equ 00000010B ;0 = wrap at EOL, 1 = discard ssm_no_cursor equ 00000100B ;0 = cursor, 1 = cursor ssm_log equ 00001000B ;0 = normal, 1 = data log ssm_numlock equ 00010000B ;1 = numlock on ssm_capslock equ 00100000B ;1 = capslock on EJECT ; ; poll.equ ; ; polling numbers for rtm poll ; listst_poll_no equ 0 const_poll_no equ listst_poll_no+1 diskst1_poll_no equ const_poll_no+1 diskst2_poll_no equ diskst1_poll_no+1 co_poll_no equ diskst2_poll_no+1 serial_inp_poll_no equ co_poll_no+1 serial_out_poll_no equ serial_inp_poll_no+1 conin_shunt_poll_no equ serial_out_poll_no+1 EJECT ; Read and Write disk parameter equates ; ; At the disk read and write function entrys ; all disk I/O parameters are on the stack ; and the stack at these entrys appears as ; follows: ; ; +-------+-------+ ; +14 | DRV | MCNT | Drive and Multi sector count ; +-------+-------+ ; +12 | TRACK | Track number ; +-------+-------+ ; +10 | SECTOR | Physical sector number ; +-------+-------+ ; +8 | DMA_SEG | DMA segment ; +-------+-------+ ; +6 | DMA_OFF | DMA offset ; +-------+-------+ ; +4 | RET_SEG | BDOS return segment ; +-------+-------+ ; +2 | RET_OFF | BDOS return offset ; +-------+-------+ ; SP+0 | RET_ADR | Local entry return address ; +-------+-------+ ; ; These parameters may be indexed and modifide ; directly on the stack and will be removed ; by the BDOS after the function is complete drive equ byte ptr 14[bp] mcnt equ byte ptr 15[bp] track equ word ptr 12[bp] sector equ word ptr 10[bp] rwdmaseg equ word ptr 8[bp] rwdmaoff equ word ptr 6[bp] xlt equ 0 ;tranalation table offset in dph dpb equ 8 ;disk parameter block offset in dph spt equ 0 ;sectors per track offset in dpb psh equ 15 ;physical shift factor offset in dpb mf equ byte ptr 5 eject ; ERROR SYSTEM EQUATES PATH_ENTRY EQU word ptr 0 PATH_EXIT EQU word ptr 2 LAST_RETRY EQU word ptr 4 LAST_RETURN EQU word ptr 6 USE EQU word ptr 8 RETRY_SUM EQU word ptr 10 RETRY1_SUM EQU word ptr 12 RECAL_SUM EQU word ptr 14 PATH_ONLY EQU 4 ; STRUCTURES SIZES PATH_RETRY EQU 8 PATH_RETRY_HIST EQU 16 ; the extra bytes are for sid's display FIRST_CALL_FLAG EQU 01H ; end of ccpmxios.equ