I've made changes to MkApi.java to support offsets into
byte[].
So a function defined in palmos.api as:
SerReceive(ByteArray buf)
MkApi creates a java function:
SerReceive(byte [] buf, int _buf_offset);
(I also fixed the asm generated)
This allows me to read bytes directly into buffers,
without having to copy the memory.
It appears to work with the large memory model, but I
don't know if it will work with the huge memory model.
I don't know if this is the cleanest way to support
pointer offsets. But it seems reasonable, most java
functions that have a "byte[] buf" arg also have a "int
start" arg.
I have attached the MkApi.java file. The "api" type
that needs to be used for this functionality is "ByteArray"
Pointer offset support