Category : C++ Source Code
Archive   : VCCRT2.ZIP
Filename : INP.ASM
title inp - direct port input
;***
;inp.asm - input byte from I/O port
;
; Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved.
;
;Purpose:
; define inp() - read byte from I/O port
;
;*******************************************************************************
include version.inc
.xlist
include cmacros.inc
.list
sBegin code
assumes cs,code
assumes ds,data
page
;***
;int _inp(port) - read byte from port
;
;Purpose:
; Reads 1 byte from the I/O port specified
;
;Entry:
; unsigned port - port to read byte from
;
;Exit:
; returns the value read
;
;Uses:
; AX, DX
;
;Exceptions:
;
;*******************************************************************************
cProc _inp,
parmw port
cBegin
mov dx,port
in al,dx
xor ah,ah
cEnd
sEnd
end
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/