The address of the CP/M data segment is returned in ES:BX by the S_SYSDAT call (9Ah). It is laid out as follows:
See also: CP/M-86 4.1 XIOS data area.
Offset Size Data Description ============================================================================ 00 DW cpmfunc_0 ; Addresses in the code segment of BDOS DW cpmfunc_1 ; function handlers. Numbers 0,2,4... DW cpmfunc_2 ; are genuine; numbers 1,3,5... are ... ; dummies and point at "retn" DW cpmfunc_13 ; instrctions. 1C DB build_date ; ASCII, 8 bytes 24 DD bootfunc2 ; If this address is nonzero, then it is ; the address of a function that should ; be called on boot; perhaps support for ; another module like the DOS emulator, or ; for Resident System Processes. ; All existing systems seem to have 0 here. 28 DD xiosentry ; Far pointer to the XIOS main entry. 2C DD xiosboot ; Far pointer to the XIOS cold boot routine. 30 DD bdosentry ; Far pointer to the internal BDOS call ; handler (which should be entered with DS ; already pointing at this segment and a ; local stack). 34 DD timeslice ; Far pointer to a routine called by the ; XIOS when the system tick occurs. 38 DD sysflag ; Far pointer to a routine called by the ; XIOS when a system flag changes. 3C DD keyboard ; Far pointer to a routine called by the ; XIOS when keyboard input occurs. 40 DD dosmod ; Far pointer to the DOS emulator cold ; boot function, if present. Else zero. 44 DW ccpdseg ; (in the boot file) Paragraph address of ; the CCP data segment. ; This is a standard CP/M-86 zero page, ie. ; it starts with the following data: ; DW ccp_codeseg_len ; DB 0 ; DW ccp_codeseg_base_para ; DB 0 ; DW ccp_dataseg_len ; DB 0 ; DW ccp_dataseg_base_para ; ; Once the boot file has loaded, this word ; seems to be used to track memory allocations. 46 DW cseg ; First paragraph used by the system file ; (ie, the BDOS code segment) 48 DW cseg_end ; First paragraph not used by the system file ; (ie, end of the BDOS data segment) 4A DW fgproc ; Segment of process table entry for ; foreground process (offset will be 0) 4C DW sysflaglist ; List of processes waiting on system flags 4E DW curproc ; Segment of process table entry for ; current process 50 DW proctable ; Segment of process table 52 DD ? 56 DB prcount ; Number of processes in the system, 1-4. 57 DW bdosver ; BDOS version, 1041h ; (see Interrupt List, AX=4452h) 59 BYTE ? ; System variable 140 5A DS 4 ; CP/M search path - up to 4 drives, terminated ; with 0FFh if fewer than 4 present. ; 0 for default drive, 1-16 for A: to P: 5E DB tempdrive ; Drive for temporary files 5F DW daycount ; Days since 31-12-1977 61 DB hours ; Time, hours (BCD) 62 DB minutes ; Time, minutes (BCD) 63 DB seconds ; Time, seconds (BCD) 64 DB curx ; Current screen X-coordinate 65 DB maxx ; Screen width - 1 66 DB maxy ; Screen height - 1 67 DB pagemode ; Should programs pause every screenful?John Elliott 18-9-2000