Re: Program to parse HEX into data words



On Mar 23, 10:17 pm, Joe Horn <joeh...@xxxxxxxxxxx> wrote:
I have a 35s and 48g. Can they--or any currently available HP--parse
data words? What I want to do is write a simple program that will take
a transfer off of a 64-bit bus in HEX, convert it to binary, slice it
into 18-bit words (don't ask, not my decision), then convert it back
to binary and place it on the stack. So, for a 64-bit bus it would be
three 18-bit words and one partial word all on the stack in X,Y,Z, and
T. Thanks.

Both machines could do that, but my guess is that it'd be a lot faster
and easier to do it on a 48g.  If you could give us an example input
and the expected outputs, we could give you several workable
solutions.

-Joe-

Great. Thanks. Okay, so for example say you had the HEX number...

0xB5D94F2C4E65C8E2

That would be equal to the BIN number split into 18-bit words...

1011010111 011001010011110010 110001001110011001 011100100011100010

Broken into words on the stack would be (least significant word in X
register)...

1011010111 (T) (this is the "chunk" left over)
011001010011110010 (Z)
110001001110011001 (Y)
011100100011100010 (X)

And then back to HEX...

2D7 (T)
194F2 (Z)
31399 (Y)
1C8E2 (X)

I hope that was clear enough. I apologize if messed up somewhere along
the way in that example. It's a chore doing one parse by hand let
alone thousands over the course of troubleshooting a chip design.
Thanks.
.



Relevant Pages

  • Re: Program to parse HEX into data words
    ... a transfer off of a 64-bit bus in HEX, convert it to binary, slice it ... to binary and place it on the stack. ... for a 64-bit bus it would be ...
    (comp.sys.hp48)
  • Program to parse HEX into data words
    ... a transfer off of a 64-bit bus in HEX, convert it to binary, slice it ... to binary and place it on the stack. ... for a 64-bit bus it would be ...
    (comp.sys.hp48)
  • Re: my view about schedule( ) and system call , right or wrong ?
    ... In some architectures, the bus address is ... 'buf' is stored somewhere on the stack. ... Each user making a system call has a different stack that is ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: when does a PDO become a PDO ?
    ... If the stack cannot be stopped then you ... In order to insert the filter, the device stack has to be ... >> the bus driver function stack. ... >>> Are you saying that there is no safe way to install a bus filter on a ...
    (microsoft.public.development.device.drivers)
  • Re: ->STR function on 49g+
    ... I assume you want an easier way to enter hex numbers. ... > I want to convert a sequence of characters to a string. ... > Then I get on the stack: ...
    (comp.sys.hp48)