outport
Function
Write a value to the simulated memory-mapped outport port
Synopsis
char
outport (addr,
void
*addr;
unsigned size;
long
value;
Description
The outport macro moves size bytes of the data value from the port specified
by addr. size can be 1, 2, or 4. The action of this macro is equivalent to the
target program writing to the outport destination.
If no outport exists at the port address, value is written to the journal window.
If a port exists at the port address, value is written to the destination specified
when the outport was created.
Diagnostics
If an error occurs, outport returns a 0; if the macro ends normally, it returns a
1.
Examples
Memory Outport Assign Byte 3 Destination_Is File
"/tmp/junk"
Debugger Macro Call outport(3,1,'h')
Memory Outport Show 3
*/
Debugger Host_Shell cat /tmp/junk
contains 'h' */
Chapter 11: Predefined Macros
size, value)
/* Note the outport contains 'h'
/* Note file
outport
467