Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get PEEK/POKE, INP/OUT functionality from C#

I am developing a board tester, using Measurement Studio, Visual Studio 2010, and C#.net, running on a Windows XP based SBC, embedded system ISA/PCI bus.  I need to be able to read/write byte/word locations in both the CPU’s memory and I/O space.  In the good old days, this was simple to do using, say, the QBasic/VB instructions PEEK, POKE, INP, and OUT.

 

I’m guessing there must be some way to do this from C# using perhaps the Windows API, Interop, COM objects, and/or a DLL (I’m certainly open to purchasing a third party package if that gets me there quickly).

 

Any suggestions would be greatly appreciated.

0 Kudos
Message 1 of 4
(6,158 Views)
0 Kudos
Message 2 of 4
(6,142 Views)

Thanks for the reply, Curt

 

I see how your suggestion works for implementing a stack, but my requirement is somewhat different.  As an example, here’s the kind of thing I need to do:

 

write 60h to I/O port 220h    (this selects a bank of memory)

write 0ffh to memory location d8000    (this fills the first byte in the selected memory bank with 1’s)

read memory location d800h    (reads back what was written)

 

I hope that clarifies things.

0 Kudos
Message 3 of 4
(6,134 Views)
0 Kudos
Message 4 of 4
(6,110 Views)