home *** CD-ROM | disk | FTP | other *** search
- ; INSUB - subroutine to read machine port for Pascal programs
- ; INSUB(PORTNO,INVAL)
- ; PORTNO is the machine port number
- ; INVAL is the value (0-255) returned
- cseg segment para public 'code'
- public insub
- insub proc far
- assume cs:cseg,ds:nothing,ss:nothing,es:nothing
- push bp
- mov bp,sp
- mov si,[bp+8] ; point to port
- mov dx,[si] ; load in dx
- in al,dx ; read port
- mov si,[bp+6] ; point to value
- mov ah,0
- mov [si],ax ; save value
- pop bp
- ret 4
- insub endp
- cseg ends
- end
-