This function works well in QB45 but in QB64 return com port addresses as 0 and I would like to know why!?
Erik.
Code: (Select All)
Color 15
Print "Hex addresses for ports 0 to 7 from BIOS."
Color 14
Def Seg = 0
For x = 0 To 7
z = &H400 + x * 2
p = Peek(z)
q = Peek(z + 1)
a = q * &H100 + p
Select Case x
Case 0
Print " COM" + Str$(x + 1); ": " + Hex$(a); " IRQ 4"
Case 1
Print " COM" + Str$(x + 1); ": " + Hex$(a); " IRQ 3"
Case 2
Print " COM" + Str$(x + 1); ": " + Hex$(a); " IRQ 4"
Case 3
Print " COM" + Str$(x + 1); ": " + Hex$(a); " IRQ 3"
Case 4
z = 0: If a = 0 Then a = &H378: z = -1
Print " LPT" + Str$(x - 3); ": " + Hex$(a); " IRQ 7";
If z Then Print " (no bios)" Else Print
Case 5
z = 0: If a = 0 Then a = &H278: z = -1
Print " LPT" + Str$(x - 3); ": " + Hex$(a); " IRQ 7";
If z Then Print " (no bios)" Else Print
Case 6
z = 0: If a = 0 Then a = &H3BC: z = -1
Print " LPT" + Str$(x - 3); ": " + Hex$(a); " IRQ 5";
If z Then Print " (no bios)" Else Print
End Select
Next
Def Seg
Color 7
End