Hey all,
I will an procedure for read/write: 1 byte port, 2 byte port for PBDOS.
How can I change the code for :
'Return an byte from the specific port
DECLARE FUNCTION InpB(BYVAL PortAddress AS BYTE) AS INTEGER
'Return an word from the specific port
DECLARE FUNCTION InpW(BYVAL PortAddress AS WORD) AS INTEGER
'Write an byte to the specific port
DECLARE SUB OutB(BYVAL PortAddress AS BYTE, BYVAL Value AS INTEGER)
'Write an word to the specific port
DECLARE SUB OutW(BYVAL PortAddress AS WORD, BYVAL Value AS INTEGER)
Question :
Is that for read/write 8-bits or 16-bits ports?
SUB pbOut(BYVAL port AS INTEGER, BYVAL value AS INTEGER)
! mov AX, value
! mov DX, port
! out DX, AL
END SUB
FUNCTION pbInp(BYVAL port AS INTEGER) AS INTEGER
! mov DX, port
! in AL, DX
! mov FUNCTION[0], AL
END FUNCTION
Please help me for changes how this code for PBDOS
Greetz
Stephane
------------------
ICQ: 123632482
I will an procedure for read/write: 1 byte port, 2 byte port for PBDOS.
How can I change the code for :
'Return an byte from the specific port
DECLARE FUNCTION InpB(BYVAL PortAddress AS BYTE) AS INTEGER
'Return an word from the specific port
DECLARE FUNCTION InpW(BYVAL PortAddress AS WORD) AS INTEGER
'Write an byte to the specific port
DECLARE SUB OutB(BYVAL PortAddress AS BYTE, BYVAL Value AS INTEGER)
'Write an word to the specific port
DECLARE SUB OutW(BYVAL PortAddress AS WORD, BYVAL Value AS INTEGER)
Question :
Is that for read/write 8-bits or 16-bits ports?
SUB pbOut(BYVAL port AS INTEGER, BYVAL value AS INTEGER)
! mov AX, value
! mov DX, port
! out DX, AL
END SUB
FUNCTION pbInp(BYVAL port AS INTEGER) AS INTEGER
! mov DX, port
! in AL, DX
! mov FUNCTION[0], AL
END FUNCTION
Please help me for changes how this code for PBDOS
Greetz
Stephane
------------------
ICQ: 123632482
Comment