DataMuseum.dk

Presents historical artifacts from the history of:

Commodore CBM-900

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

See our Wiki for more about Commodore CBM-900

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦bf8976d05⟧ TextFile

    Length: 641 (0x281)
    Types: TextFile
    Notes: UNIX file
    Names: »jl7.c«

Derivation

└─⟦f27320a65⟧ Bits:30001972 Commodore 900 hard disk image with partial source code
    └─⟦2d53db1df⟧ UNIX V7 Filesystem
        └─ ⟦this⟧ »hr/src/jlib/jl7.c« 

TextFile

#include	<jlib.h>

extern	int	myfd;
extern	struct	jqueue	sendq,
			runq,
			s_replyq;

int	S_SetPhy(wid, x, y)
int	wid;
int	x, y;
{
	MsgReceiver = SMGR;
	MsgCmd    = SM_SETPHY;
	MsgWid    = wid;
	MsgData1  = x;
	MsgData2  = y;
	sendmess();
	return(0);
}

RECT	S_GetPhy(wid)
int	wid;
{
	RECT		rect;
	struct xfer	xfer;

	MsgReceiver = SMGR;
	MsgCmd    = SM_GETPHY;
	MsgWid    = wid;
	sendmess();
	jdoze(&s_replyq);
	Msg = runq.jq_head->j_m;
	if(MsgWid != wid)
		warn("S_GetPhy: bad wid");

	xfer.x_count = sizeof( RECT );
	xfer.x_src = SMGR;
	xfer.x_srcp = (char *) MsgPtr;
	xfer.x_dstp = &rect;
	ioctl(myfd, CIOGETD, &xfer);
	return rect;
}