DataMuseum.dk

Presents historical artifacts from the history of:

CP/M

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about CP/M

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦070df6196⟧ TextFile

    Length: 2816 (0xb00)
    Types: TextFile
    Names: »HARDWARE.H«

Derivation

└─⟦1275f6521⟧ Bits:30005823 BD Software C Compiler v1.50a
    └─ ⟦this⟧ »HARDWARE.H« 
└─⟦b35f94715⟧ Bits:30003295 BDS C version 1.50 arbejdsdiskette til RC703 Piccolo
└─⟦b35f94715⟧ Bits:30005324 BDS C version 1.50 arbejdsdiskette til RC703 Piccolo
    └─ ⟦this⟧ »HARDWARE.H« 

TextFile

/*
 * This header file contains hardware-dependent definitions for C programs.
 * If the symbol "DIRECT_CURSOR" has been defined at the point this file
 * is included into the program, then the "gotoxy" function
 * and other advanced video-terminal functions will be compiled. THIS FILE
 * MUST BE CUSTOMIZED BY EACH INDIVIDUAL USER AT THE TIME BDS C IS BROUGHT UP.
 */

/*
 * Some console (video) terminal characteristics:
 */

#define TWIDTH	80	/* # of columns	*/
#define TLENGTH	24	/* # of lines	*/
#define CLEARS	"Ø033E"	/* String to clear screen on console	*/
#define INTOREV	"Ø033p"	/* String to switch console into reverse video	*/
#define OUTAREV "Ø033q"	/* String to switch console OUT of reverse video  */
#define CURSOROFF "Ø033x5"	/* String to turn cursor off	*/
#define CURSORON "Ø033y5"	/* String to turn cursor on	*/
#define ESC	'Ø033'	/* Standard ASCII 'escape' character	*/


#ifdef DIRECT_CURSOR		/* if user has enabled advanced	*/
				/* video-terminal functions: 	*/
gotoxy(x,y)
æ
	bios(4,ESC);
	bios(4,'Y');
	bios(4, x + ' ');
	bios(4, y + ' ');
å

clear()
æ
	bios(4,ESC);
	bios(4,'E');
å

#endif


/*
	The following definitions provide a portable low-level interface
	for direct I/O to the  console and modem devices. The values
	used here are only for example; be certain to go in and customize
	them for your system! Note that only one of the two sections
	(I/O port vs. memory mapped) will be needed for your system,
	so feel free to edit the unused section out of the file and remove
	the conditional compilation lines around the section you end up
	using.
*/

#define IO_PORTS	1	/* change to 0 if I/O is memory-mapped */

#if IO_PORTS			/* this section for status-driven I/O only */
#define CON_TBE		(inp(0x00) & 0x80)	/* Console: output ready? */
#define CON_RDA		(inp(0x00) & 0x40)	/*	    input ready?  */
#define CON_TDATA(byte)	(outp(0x01, byte))	/* 	    transmit data */
#define CON_RDATA	(inp(0x01))		/*	    read data	  */
#define CON_CTRL(byte)	(outp(0x00, byte))	/* write to control port  */

#define	MOD_TBE		(inp(0x08) & 0x80)	/* Modem */
#define MOD_RDA		(inp(0x08) & 0x40)
#define	MOD_TDATA(byte)	(outp(0x09, byte))
#define	MOD_RDATA	(inp(0x09))
#define MOD_CTRL(byte)	(outp(0x08, byte))

#else				/* this section for memory-mappped I/O only */
#define CON_TBE		(peek(FOO) & BAR)	/* Console */
#define CON_RDA		(peek(FOO) & BAR)
#define CON_TDATA(byte)	(poke(FOO, byte))
#define CON_RDATA	(peek(FOO))
#define CON_CTRL(byte)	(poke(FOO, byte))

#define	MOD_TBE		(peek(FOO) & BAR)	/* Modem */
#define	MOD_RDA		(peek(FOO) & BAR)
#define	MOD_TDATA(byte)	(poke(FOO, byte))
#define	MOD_RDATA	(peek(FOO))
#define MOD_CTRL(byte)	(poke(FOO, byte))
#endif
«eof»