I have been using the following code to get comm port addresses from BIOS in QB45:
PRINT "Hex addresses for ports 0 to 3 from BIOS." DEF SEG = 0 FOR