Path: utzoo!attcan!uunet!know!zaphod.mps.ohio-state.edu!swrinde!emory!mephisto!prism!bb16 From: bb16@prism.gatech.EDU (Scott Bostater) Newsgroups: comp.lang.pascal Subject: I/O Port weirdness Message-ID: <14401@hydra.gatech.EDU> Date: 2 Oct 90 14:39:28 GMT Organization: Georgia Institute of Technology Lines: 44 This sort of half belongs in this newsgroup and half in c.s.i.p.hardware, but I didn't want to take the flak for using Pascal instead of C :-) I've run into a problem/bug with TP IDE and the use of I/O ports. I'm trying to read from an I/O port. Sometimes it works, sometimes it doesn't. Program Test; var a: Byte; Begin a := Port[$300]; Writeln( 'a = ', a); End. This simple program has several different outcomes depending on the machine I run it on and whether I use the IDE or use the command line compiler. The program behaves properly when compiled with TPC and executed via TD. Machine IDE Result -------- ------ ---------------------- IBM XT (true blue) Yes Reboots Computer IBM XT (true Blue) No a = 175 80386 clone Yes a = 255 80386 clone No a = 255 During the testing process, I ended up pulling all of the "strange" cards out of the XT so that now there is only a CGA card, Floppy controller, HD controller, and Multifunction I/O board (384K/1s/1p/1g). The port I'm trying to read from is $300, which does not exist in either machine. I would expect to get $FF back from reading it (since the data lines should float high). Has anybody else experienced this problem? Anybody have an idea has to how to fix it? I'ld really like to be able to use the IDE because I'm used to it, but I'd also like to know what's causing the problem. -- Scott Bostater Georgia Tech Research Institute - Radar Systems Analysis "My soul finds rest in God alone; my salvation comes from Him" -Ps 62.1 uucp: ...!{allegra,amd,hplabs,ut-ngp}!gatech!prism!bb16 Internet: bb16@prism.gatech.edu