Solved

About board addressing

Posted on 1998-06-10
1
129 Views
Last Modified: 2010-04-04
I want to address a data adquisition board (CIO-DIO96) on 300H (the board is addressing to 300H throught switchers) and I have tried it with pointers but it is not possible due to the PC memory mapping.
I want to know how could do it.
0
Comment
Question by:JGT
1 Comment
 

Accepted Solution

by:
jhun earned 100 total points
ID: 1351959
Here is a small funtions that reads from a io port:

function ReadFromPort ( adress: word): byte;
begin
   asm
     mov       dx, adress
     in            al, dx      { data from port }
   end;
end;

Because the result of a pascal function with result type is passed in al no futher action is nessecary to pass back the result. If you want to write to the port, replace the in al, dx with out dx, al

Gr. John

0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question