Re: Program to parse HEX into data words
- From: Mal <malligator@xxxxxxxxx>
- Date: Sun, 23 Mar 2008 21:18:56 -0700 (PDT)
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.
.
- Follow-Ups:
- Re: Program to parse HEX into data words
- From: Wes
- Re: Program to parse HEX into data words
- From: datajerk@xxxxxxxxx
- Re: Program to parse HEX into data words
- References:
- Program to parse HEX into data words
- From: Mal
- Re: Program to parse HEX into data words
- From: Joe Horn
- Program to parse HEX into data words
- Prev by Date: Re: HPGCC related ...
- Next by Date: Re: Program to parse HEX into data words
- Previous by thread: Re: Program to parse HEX into data words
- Next by thread: Re: Program to parse HEX into data words
- Index(es):
Relevant Pages
|
|