CCP/M-86 3.1 Data Segment

The address of the CCP/M data segment is returned in ES:BX by the S_SYSDAT call (9Ah). It is laid out as follows:

Offset	Size	Data		Description
============================================================================
00	DD	sup_entry	; Entry to the CCP/M-86 Supervisor module
04	DD	sup_init	; Supervisor cold start
08	DD	rtm_entry	; Entry to the CCP/M-86 RTM module
0C	DD	rtm_init	; RTM cold start
10	DD	mem_entry	; Entry to the CCP/M-86 MEM module
14	DD	mem_init	; MEM cold start
18	DD	cio_entry	; Entry to the CCP/M-86 CIO module
1C	DD	cio_init	; CIO cold start
20	DD	bdos_entry	; Entry to the CCP/M-86 BDOS module
24	DD	bdos_init	; BDOS cold start
28	DD	xios_entry	; Far pointer to the XIOS main entry.
2C	DD	xios_init	; Far pointer to the XIOS cold boot routine.	
30	DD	reserved_entry	; Far pointer to an extra module (if present)
34	DD	reserved_init	; that intercepts certain functions
				; (network redirector?) If not present, 
				; segments are 0.
38	DD	dispatcher	; Handles interrupt returns. Used by XIOS 
				; when it wants to do an IRET.
3C	DD	pdisp		; Handles far returns. Used by the XIOS 
				; when it wants to do a RETF.
40	DW	ccpmseg		; CCP/M start segment
42	DW	rspseg		; Segment of the highest Resident System
				; Process loaded. The first 2 bytes of the
				; indicated segment will be the segment of the
				; previous RSP, or 0 at the end of the list.
44	DW	endseg		; First paragraph beyond the area used by 
				; the OS.
46	DB	modflags	; Bitmapped flags for which modules (as listed
				; above) should have their initialisation
				; function called. Bit 3 is tested for BDOS,
				; bit 4 for CIO, bit 5 for the XIOS.
47	DB	nvcns		; Number of virtual consoles.
48	DB	nprinters	; Number of printers in the system.
49	DB	nccb		; Number of character device control blocks.
4A	DB	n_flags		; Number of system flags.
4B	DB	sys_disk	; Default system disk (search path for
				; command files).
4C	DW	mmp		; Maximum memory per process
4E	DB	0		; Reserved
4F	DB	dayfile		; If nonzero, system displays date and time
				; when a CMD or RSP file is executed.
50	DB	tempdisk	; Temporary file drive, 0=default or 1-16
51	DB	ticks		; System clock ticks/second
52	DW	lul		; Linked list of unused lock entries
54	DW	ccb		; Address of the character device control 
				; block table
56	DW	flags		; Address of the system flag table
58	DW	mdul		; Linked list of unused memory descriptors
5A	DW	mfl		; Linked list of free memory blocks
5C	DW	pul		; Linked list of unused process descriptors
5E	DW	qul		; Linked list of unused queue descriptors
60	DW	0		; Reserved
62	DW	qmau		; Queue buffer memory allocation unit
66	DW	0		; Reserved
68	DW	rlr		; Linked list of processes that are ready to
				; run. First entry is the running process.
6A	DW	dlr		; Linked list of processes that are 
				; waiting on system timers.
6C	DW	drl		; Linked list of processes that have just 
				; become ready to run.
6E	DW	plr		; Linked list of processes waiting on devices
70	DW	0		; Reserved
72	DW	thrdrt		; Linked list of all processes in the system
74	DW	qlr		; Linked list of all system queues
76	DW	mal		; Linked list of active memory allocation 
				; units
78	DW	version		; Offset of version string (segment is CCPMSEG)
7A	DW	vernum		; Version number returned to function 0Ch
7C	DW	ccpmvernum	; Version number returned to function A3h
7E	DW	tod_day		; Days since 31-12-1977
80	DB	tod_hr		; Time, hours (BCD)
81	DB	tod_min		; Time, minutes (BCD)
82	DB	tod_sec		; Time, seconds (BCD)
83	DB	ncon_dev	; Number of consoles
84	DB	nlst_dev	; Number of printers
85	DB	ncio_dev	; Total number of character devices
86	DW	lcb		; List Device control block table offset
88	DW	open_file	; Bitmap of drives with open files on them
8A	DB	lock_max	; Maximum number of locked records per process
8B	DB	open_max	; Maximum number of open files per process
8C	DW	owner_8087	; The process using the 8087. If 0, no 
				; process. If -1, no 8087.
8E	DS	11h		; reserved
9F	DB	xpcns		; Number of physical consoles
A0	DW	off_8087
A2	DW	seg_8087	; Address of the 8087 interrupt vector
A4	DW	sys_87_of
A6	DW	sys_87_sg	; Address of the 8087 exception handler
John Elliott 16 July 2005