public class IPHandler
extends java.lang.Object
Constructor and Description |
---|
IPHandler()
Creates the object.
|
Modifier and Type | Method and Description |
---|---|
IPSocket |
getSocketFromMap(int key)
Gets the socket corresponding to the key.
|
void |
handleTrap(MC68000Cpu cpu)
This handles all the "trap" calls related to this device.
|
static java.lang.String |
readCString(MC68000Cpu cpu,
int address)
Reads a "C" type string from memory and converts it to a Java String, with conversion.
|
static int |
writeCString(MC68000Cpu cpu,
int address,
java.lang.String s,
int maxLength)
Writes a null terminated string to memory.
|
public void handleTrap(MC68000Cpu cpu)
cpu
- the cpu used.public IPSocket getSocketFromMap(int key)
key
- key allowing to retrieve the socket from the map.public static final int writeCString(MC68000Cpu cpu, int address, java.lang.String s, int maxLength)
cpu
- the CPU usedaddress
- where to write tos
- the string to writemaxLength
- max length of stringpublic static final java.lang.String readCString(MC68000Cpu cpu, int address)
cpu
- the cpu with the memory array.address
- where to read string in the memory.