主题:求助;peek 的深入理解
SUB findportadd
DEF SEG = 0
CLS
prnport% = 0
FOR q% = 1 TO 4
'PEEK:READ A BYTE FROM memory
prnport% = prnport% + (PEEK(1036 - q%) * (256 ^ (4 - q%)))
NEXT q%
statport% = prnport% + 1
ctrlport% = prnport% + 2
prnportval% = INP(prnport%) 'read a byte from I/O
statportval% = INP(prnport% + 1)
ctrlportval% = INP(prnport% + 2)
DEF SEG
其中,SEG是什么意思? 还有 prnport% = prnport% + (PEEK(1036 - q%) * (256 ^ (4 - q%))) 怎么理解?
END SUB
DEF SEG = 0
CLS
prnport% = 0
FOR q% = 1 TO 4
'PEEK:READ A BYTE FROM memory
prnport% = prnport% + (PEEK(1036 - q%) * (256 ^ (4 - q%)))
NEXT q%
statport% = prnport% + 1
ctrlport% = prnport% + 2
prnportval% = INP(prnport%) 'read a byte from I/O
statportval% = INP(prnport% + 1)
ctrlportval% = INP(prnport% + 2)
DEF SEG
其中,SEG是什么意思? 还有 prnport% = prnport% + (PEEK(1036 - q%) * (256 ^ (4 - q%))) 怎么理解?
END SUB