| 
 | 
DataMuseum.dkPresents historical artifacts from the history of: Commodore CBM-900 | 
 
This is an automatic "excavation" of a thematic subset of
 See our Wiki for more about Commodore CBM-900 Excavated with: AutoArchaeologist - Free & Open Source Software.  | 
top - metrics - download
    Length: 939 (0x3ab)
    Types: TextFile
    Notes: UNIX file
    Names: »asy.c«
└─⟦f27320a65⟧ Bits:30001972 Commodore 900 hard disk image with partial source code
    └─⟦2d53db1df⟧ UNIX Filesystem
        └─⟦this⟧ »frankh/src/asy.c« 
#include <stdio.h>
#define PBCS		0x93		/* Z8036 #2 port B cmd & stat reg */
#define PBDDR		0x57
#define PCDD		0x0D
#define PCDATA		0x1F
#define PBDATA		0x1D
#define CLRIPIUS	0x20		/* Mask to clear IP and IUS */
#define MCCR		0x03
#define	MICR		0x01
#define PBCSR		0x13
#define SIOCRC		0x0F
#define WR0B		0x101
#define	WR1B		0x103
#define WR2B		0x105
#define WR3B		0x107
#define WR4B		0x109
#define WR5B		0x10B
#define WR6B		0x10D
#define WR7B		0x10F
#define WR8B		0x111
#define WR9B		0x113
#define WR10B		0x115
#define WR11B		0x117
#define WR12B		0x119
#define WR13B		0x11B
#define WR14B		0x11D
#define WR15B		0x11F
/*
 *
 *
 *
 *	
 */
main()
{
	register int fd;
	int i, status;
	unsigned int tmp;
	initio();
	fd = open("/dev/port", 2);
	printf("Begin . . .\n");
	printf("wr12 = %x\n", inb(fd, WR12B));
	printf("wr13 = %x\n", inb(fd, WR13B));
	outb(fd, WR12B, 0x90);
	
	outb(fd, WR4B, 0x0C);
	outb(fd, WR8B, 0x41);
	cloio();
}