Port-Mapped I/O and Memory-Mapped I/O is the key method to connect from CPU to I/O Peripherals. Do you need to write applications to access Memory-mapped IO addresses using Delphi/C++? Don’t know where to start? Don’t worry, WINSOFT helped us with a component to do the job quickly.
- Access to I/O and memory-mapped ports on 32 and 64-bit Windows
- PnP device drivers built using Microsoft KMDF WDK framework
- Easy of use, component is fully auto configurable
- Block data transfer enables high-speed data transfer
- DirectAccess mode provides the fastest access to I/O ports (32-bit Windows only)
Versions Supported: Delphi/C++ Builder 5 – 10.4 and Lazarus 2.0.8
Prerequisites: Ensure 11.2 MB minimum free space available in the system.
- Download IOPort Setup and Right-click Open.
- Read the Information Window about features, installation, and copyright. Click Next.
- Browse for the custom destination folder to install and click Next.
- Browse for the custom Start Menu folder and click Next. You can ignore creating by clicking the checkbox Don’t create a Start Menu folder option.
- Review your folder settings and click Install. You can click Back to change your folder settings.
- Once Installation Progress is done click Finish.
- Ensure the IOPort files are shown in the chosen Start Menu Folder by clicking Windows Start Menu.
Installation Steps Demo: IOPort Installation Demo:
- Memory-mapped I/O is mapped into the same address space as program memory and/or user memory and is accessed in the same way.
- Port mapped I/O uses a separate, dedicated address space and is accessed via a dedicated set of microprocessor instructions.
How to build applications using IOPort component:
- Open Rad Studio 10.4.1 and Create a Windows VCL Application. Navigate to Components bar -> System. Check the IOPort Component installed as shown.
2. Drag and Drop the TIOPort component or by adding IOPort.pas into your unit and create these components by code.
TIOPort: Enables to access Windows I/O and memory-mapped ports.
- Active: Enables or disables access to I/O ports..
- DirectAccess: Enables the fastest I/O port access using undocumented Windows functions. Allows direct access to I/O ports from the application instead of calling the device driver for each I/O access. Direct access is supported on 32-bit Windows only.
- Port[Index: DWord]: For reading and writing a byte/word/double word from/to the specified I/O port.
- Register[Index: DWord]: For reading and writing a byte/word/double word/quadword from/to the specified memory-mapped port.
- ReadByteBuff/WriteByteBuff: Method to Read/Write a number of bytes/words/double words from the specified I/O port to a memory buffer.
3. Get the physical memory addresses for Memory mapped IO.
procedure TFormMemory.SpeedButtonShowPhysicalMemoryClick(Sender: TObject);
function GetChar(Value: AnsiChar): AnsiChar;
if Value < ' ' then
Result := '.'
Result := Value;
Address, Length: Integer;
Line, Row, LineCount: Integer;
with Memo, IOPort do
Screen.Cursor := crHourGlass;
Address := StrToInt(EditAddress.Text);
Length := StrToInt(EditLength.Text);
LineCount := Length div 16;
if Length mod 16 > 0 then
for Line := 0 to LineCount - 1 do
LineStr := IntToHex(Address + Line * 16, 8) + ' ';
for Row := 0 to 15 do
LineStr := LineStr + IntToHex(Register[Line * 16 + Row], 2) + ' ';
for Row := 0 to 15 do
LineStr := LineStr + GetChar(AnsiChar(Register[Line * 16 + Row]));
Screen.Cursor := crDefault;
4. Use Methods such as ReadByteRegisterBuf/WriteByteRegisterBuf to read/write a number of bytes/words/double words/quad words from the specified memory-mapped port to a memory buffer.
Sample Application Demo:
Conclusion: Easily you can build Applications using WINSOFT IOPort component to access Windows I/O and Memory-mapped ports and save your effort.