RE: Binary conversion

new topic     » goto parent     » topic index » view thread      » older message » newer message

Don,

The problem was that the IBM iSeries stores 32 bit values in the 
opposite order of the PC.  What I wound up with after a call to a 
program on the iSeries is 4 bytes returned to me in the opposite order.  
You can't use peek4s or peek4u on the memory since peek4s/u is expecting 
the bytes to be in the PC order.

Make sense?
Don Phillips wrote:
> Hey Jonas,
> I saw the other posts, but I am not real sure about what exactly
> it is you are trying to do.
> 
> poke4 is a 32 bit command so you will store 4 bytes of information
> at a specified location.  If this is the case, I do not see why
> you are using peek to get the information back out.  Peek is an 8
> bit command so, as posted, you would get back a 4 length sequence
> representing the 4 bytes that you wrote out earlier.
> 
> Why not use peek4u or peek4s to read the data back out as these
> are the 32 bit routines for accessing memory?
> 
> Write 90: poke4( mem, 90 )
> Read 90: peek4u( mem )
> 
> Don
> 
>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu