Category : C++ Source Code
Archive   : VCCRT2.ZIP
Filename : INP.ASM

 
Output of file : INP.ASM contained in archive : VCCRT2.ZIP
page ,132
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


  3 Responses to “Category : C++ Source Code
Archive   : VCCRT2.ZIP
Filename : INP.ASM

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. 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/