~kris/9p

9hist

0e70a37f56a5415788da1bd377ad66164ae43a4f — David du Colombier 33 years ago b9d6bb3
Plan 9 from Bell Labs 1992-12-11
3 files changed, 25 insertions(+), 1 deletions(-)

M pc/fns.h
M pc/l.s
M pc/mem.h
M pc/fns.h => pc/fns.h +2 -0
@@ 29,6 29,7 @@ void	i8042reset(void);
void	ident(void);
void	idle(void);
int	inb(int);
void	insb(int, void*, int);
ushort	ins(int);
void	inss(int, void*, int);
void	insl(int, void*, int);


@@ 43,6 44,7 @@ int	modem(int);
void	mousectl(char*);
uchar	nvramread(int);
void	outb(int, int);
void	outsb(int, void*, int);
void	outs(int, ushort);
void	outss(int, void*, int);
void	outsl(int, void*, int);

M pc/l.s => pc/l.s +22 -0
@@ 210,6 210,17 @@ TEXT	inb(SB),$0
	RET

/*
 *  input a string of bytes from a port
 */
TEXT	insb(SB),$0

	MOVL	p+0(FP),DX
	MOVL	a+4(FP),DI
	MOVL	c+8(FP),CX
	CLD; REP; INSB
	RET

/*
 *  output a byte
 */
TEXT	outb(SB),$0


@@ 220,6 231,17 @@ TEXT	outb(SB),$0
	RET

/*
 *  output a string of bytes to a port
 */
TEXT	outsb(SB),$0

	MOVL	p+0(FP),DX
	MOVL	a+4(FP),SI
	MOVL	c+8(FP),CX
	CLD; REP; OUTSB
	RET

/*
 * input a short from a port
 */
TEXT	ins(SB), $0

M pc/mem.h => pc/mem.h +1 -1
@@ 100,7 100,7 @@
 *  virtual MMU
 */
#define PTEMAPMEM	(1024*1024)	
#define SEGMAPSIZE	64
#define SEGMAPSIZE	16
#define	PTEPERTAB	(PTEMAPMEM/BY2PG)
#define PPN(x)		((x)&~(BY2PG-1))