home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS - Coast to Coast
/
simteldosarchivecoasttocoast.iso
/
pcmag
/
vol11n11.zip
/
LABNOT.ZIP
/
OUTINP.ASM
< prev
next >
Wrap
Assembly Source File
|
1992-02-24
|
1KB
|
40 lines
;OutInp.ASM
;Copyright (c) 1992 Jay Munro
;First Published in PC Magazine June 16,1992
;----------------------------------------------------------------------------
;Out and Inp keyword replacements for Visual Basic.
;Syntax:
; Declare Function Inp Lib "LabNotes.DLL" (Byval Port%)
; Declare Sub Out Lib "LabNotes.DLL" (Byval Port%,Byval Value%)
;----------------------------------------------------------------------------
;Note, VBOut will be aliased in .DEF file
.286
.Model Medium
Public VBOut, Inp
Include LabNotes.Inc
.Code
VBOut Proc Far
ShortWinProlog ;use short form prolog, no DS
Mov AL,[BP+6] ;get data to output
Mov DX,[BP+8] ;get port to send to
Out DX,AL ;do it
ShortWinEpilog
Ret 4 ;return clearing stack
VBOut EndP
Inp Proc Far
ShortWinProlog ;use short form, no DS
Mov DX,[BP+6] ;get port to read
In AL,DX ;read one byte
Xor AH,AH ;clear high byte
ShortWinEpilog
Ret 2 ;return clearing the stack
Inp EndP
End