PutToneCode	SEGMENT 'CODE'

	ASSUME CS:PutToneCode,DS:NOTHING

PortOut	PROC	FAR

; Write to a CPU port
; This function writes 'value' to CPU port 'port'.

; PROCEDURE PortOut(Port : WORD; Value : WORD);

PUBLIC		PortOut

;define parameters on the stack ('last' at offset 6 etc.)

Port		EQU	[BP+8]
Value		EQU	[BP+6]

;	Prologue

	PUSH	BP					;save old frame pointer
	MOV		BP,SP				;point to current stack top

;	Procedure

	MOV		DX,Port				;put port address in DX register
	MOV		AX,Value			;put value into AX
	OUT		DX,AX				;word output AX to port DX

;	Epilogue

	POP		BP					;restore prior frame pointer
	RET		4					;pop the 4 bytes of argument from the stack

PortOut	ENDP

PutToneCode	ENDS

	END
0)	)?3?6	0>oPGV	WabgogPjpmyoPz}P @	@pp@_0 O	@P 