Message-ID: <341E17C2.12BD@sercomtel.com.br> Date: Tue, 16 Sep 1997 02:23:14 -0300 From: Alessandro Moure Reply-To: moure AT sercomtel DOT com DOT br Organization: LIEB/CIP/CPG/UEL MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Memory address, protected mode, real mode... Arghhhhhhhhhh! Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Precedence: bulk Hi. I have a MCA (multichannel analyzer) board in my computer (gamma-ray spectroscopy) and this board has a TSR wich puts its data available at 0xD000 (L) address. I sweep the channels of the MCA board with 0xD000 + counter. The TSR is 16 bit and I am using DJGPP. The main problem is: How can I get the data? I tried: 1 add = __dpmi_segment_to_descriptor(0xD000 + counter); 2 data = _farpeekl(add,0); 3 __dpmi_free_ldt_descriptor(add); Ok. It won't work cause add in line 2 isn't a dos segment, ETC., then I tried: 1 add = 0xD000; 2 data = _farpeekl(_dos_ds, add*16+counter); Results: In the first code I can get only the first value of each segment, ie, 0,8,16, etc. I can't read all channels one by one. In the second code, I can get only trash. What am I doing wrong? Thnx in advance. I hate to bother u, but I don't know what else to do! []'s Alessandro Moure moure at sercomtel com br 762816 JG27