home *** CD-ROM | disk | FTP | other *** search
- /*
-
- upm.h - common data for upm.
-
- (C) MCMXC - Nick Sayer - All rights reserved.
-
- */
-
- #include <stdio.h>
- #include "z80.h"
- extern char *sys_errlist[];
- extern int errno;
-
- extern FILE *disks[16],*devices[5]; /* These are FILEs for CP/M devices */
-
- extern WORD diskbufs[16]; /* These are pointers to disk paramater
- tables. See sel_dsk() */
-
- /* Which devices[] go to which physical devices? */
- #define F_TTY 0
- #define F_LPT 1
- #define F_PTP 2
- #define F_PTR 2
- #define F_UL1 3
- #define F_UC1 3
- #define F_UP1 3
- #define F_UR1 3
- #define F_UR2 4
- #define F_UP2 4
-
- /* Which command line args go to which physical devices? */
- #define F_TY 0
- #define F_LP 1
- #define F_PT 2
- #define F_U1 3
- #define F_U2 4
-
- /*
-
- When CP/M is run on a real system, the warm boot procedure reads
- in the CCP image from disk. Of course, we don't have a real disk,
- so the startup procedure for the emulator places the relocated
- image of the ccp into the following structure. Actually, the
- image size is 5.5K, so it incorporates BDOS as well.
-
- */
-
- #define SIZE_CCP_IMAGE 5632
- extern BYTE ccp_image[SIZE_CCP_IMAGE]; /* Save CCP for warm boot */
- extern WORD ccp_start; /* ... and where to put it */
-
- /*
-
- bios() implements the CP/M bios in C. The BIOS function to execute is
- determined by ((PC&0xff)/3). This assumes the BIOS starts on an even
- page boundary, which in most cases is a requirement anyway. This allows
- all sorts of silly things to happen if programs crunch up in strange
- ways, but that happens a lot with CP/M anyway. This routine takes no
- formal arguments, and has all sorts of side effects on the Z-80
- register pairs and the Z-80 memory space. The return value is non-zero
- if the EXIT BIOS entry (HALT at xx5D) is called.
-
- */
-
- extern char bios();
-