[comp.sys.ibm.pc] keyboard fix

grossman@bbn.com (Martin Grossman) (06/17/88)

IBM XT clone (SYNCO PC-1600) (ERSO BIOS 3.22)

1)  I have tried for 2 months to get the PD bios to work on my system.
	Finaly I got it to work in the following combo.
	ERSO bios in standard spot f000:e000
	PD bios in vacant spot f000:4000 (ie last ROM spot checked for)

	I modified the PD bios so it has signature bytes at front and
	when it got control totaly took over....this worked fine BUT
	not all my ram was being checked twice (ie 3 minutes to cold boot)

2) when I recompiled PD Bios to run at f000:e000 everything works but the KB
	is locked up (ie cant get any input to system)

3) finaly after disassembly of ERSO I found out how it enables the kb....
	following is the code that I put into a .COM file to get KB working
	then I added it to the PD bios and all works fine now.

	SOMEONE PLEASE EMAIL ME WHAT THIS IS DOING.

	CALL	DOIT
	INT	20

DOIT:	IN	AL,21
	MOV	BH,AL
	IN	AL,61
	MOV	BL,AL
	MOV	AL,FF
	OUT	21,AL
	IN	AL,61
	AND	AL,7F
	OUT	61,AL
	MOV	CX,0006
	MOV	SI,TABLE
LOOP:	MOV	AL,CS:[SI]
	OUT	68,AL
	INC	SI
	LOOP	LOOP
	IN	AL,60
	IN	AL,60
	MOV	AL,BL
	OUT	61,AL
	MOV	AL,BH
	OUT	21,AL
	RET

TABLE	DB	00h,00h,00h,40h,0DEh,037h ; this doesnt look like AT codes.

email to grossman@cc5.bbn.com