Hardware Reference
In-Depth Information
' Address of COM1 is at offset &H00
' Address of COM2 is at offset &H02
' Address of COM3 is at offset &H04
' Address of COM4 is at offset &H06
if peeki(&H0+(temp-1)*2)<>0 then
Print "COM"temp" : &H";
print hex$(peeki(&H0+(temp-1)*2))
end if
next temp
'
' Get and display LPT port addresses
'
print division$
for temp=1 to 4
' Address of LPT1 is at offset &H08
' Address of LPT2 is at offset &H0A
' Address of LPT3 is at offset &H0C
' Address of LPT4 is at offset &H0E
if peeki(&H08+(temp-1)*2)<>0 then
print "LPT"temp" : &H";
print hex$(peeki(&H08+(temp-1)*2))
end if
next temp
'
' Determine floppy disk drives installed
'
print division$
high% = peekl(&H10) \ 256
low% = peekl(&H10) MOD 256
if bit(low%,0)=1 then
print "Floppy disk drives : Installed
"
else
print "Floppy disk drives : Not Available"
end if
if bit(low%,6)=0 and bit(low%,7)=0 then print"Number of
drives : 1"
if bit(low%,6)=0 and bit(low%,7)=1 then print"Number of
drives : 2"
if bit(low%,6)=1 and bit(low%,7)=0 then print"Number of
drives : 3"
if bit(low%,6)=1 and bit(low%,7)=1 then print"Number of
drives : 4"
print division$
Out &H70,&H10
x=Inp(&H71)
Print "Drive A: : ";
if x\16=0 Then Print "Not Available"
if x\16=1 Then Print "5.25"chr$(34)" 360 KB"
if x\16=2 Then Print "5.25"chr$(34)" 1.2 MB"
if x\16=3 Then Print "3.5"chr$(34)" 720 KB"
if x\16=4 Then Print "3.5"chr$(34)" 1.44 MB"
if x\16=5 Then Print "3.5"chr$(34)" 2.88 KB"
Print "Drive B: : ";
if (x And &H0F)=0 Then Print "Not Available"
if (x And &H0F)=1 Then Print "5.25"chr$(34)" 360 KB"
if (x And &H0F)=2 Then Print "5.25"chr$(34)" 1.2 MB"
if (x And &H0F)=3 Then Print "3.5"chr$(34)" 720 KB"
Search WWH ::




Custom Search