Defining long byte sequences

Started by sharpe, August 14, 2011, 08:02:22 PM

Previous topic - Next topic

sharpe

Hi all,

I am trying to do the following:

szSecret      BYTE       77h,0F3h,79h,0F3h,0E7h,1Eh,43h,40h,5Ah,31h,6Ch,47h,73h,0E0h,0C0h,0BFh,2Ch,0BEh,66h,0FBh,0E3h,10h,59h
         BYTE         5Dh,00h,22h,39h,05h,73h,0E1h,0C4h,0B1h,27h,0FCh,70h,0F4h,0F0h,45h,58h,1Bh,4Bh,2Dh,33h,1Eh,39h,0ECh
         BYTE         83h,0E5h,7Bh,0FCh,60h,0ADh,0A6h,4Fh,45h,1Ah,43h,31h,65h,56h,7Bh,0E9h,0C3h,0A9h,3Ch,0BEh,85h,7Ah,47h,24h,22h,14h,0

But when I try and get the length of the variable, I only get the length of the first line.

When I try to put it all on one line, I get an error.

Do any of you know how I can define a long byte sequence like this?

Thanks in advance for your help.

Regards,
sharpe.

dedndave

try this....
szSecret BYTE 77h,0F3h,79h,0F3h,0E7h,1Eh,43h,40h,5Ah,31h,6Ch,47h,73h,0E0h,0C0h,0BFh,2Ch,0BEh,66h,0FBh,0E3h,10h,59h,\
              5Dh,00h,22h,39h,05h,73h,0E1h,0C4h,0B1h,27h,0FCh,70h,0F4h,0F0h,45h,58h,1Bh,4Bh,2Dh,33h,1Eh,39h,0ECh,\
              83h,0E5h,7Bh,0FCh,60h,0ADh,0A6h,4Fh,45h,1Ah,43h,31h,65h,54h,73h,0E1h,0C0h,0B9h,3Bh,0AEh,15h,9Ah,97h,20


you may have to scroll to see the ends of the lines   :U

Gunner

How about this?

szSecret    BYTE         77h,0F3h,79h,0F3h,0E7h,1Eh,43h,40h,5Ah,31h,6Ch,47h,73h,0E0h,0C0h,0BFh,2Ch,0BEh,66h,0FBh,0E3h,10h,59h
          BYTE         5Dh,00h,22h,39h,05h,73h,0E1h,0C4h,0B1h,27h,0FCh,70h,0F4h,0F0h,45h,58h,1Bh,4Bh,2Dh,33h,1Eh,39h,0ECh
          BYTE         83h,0E5h,7Bh,0FCh,60h,0ADh,0A6h,4Fh,45h,1Ah,43h,31h,65h,54h,73h,0E1h,0C0h,0B9h,3Bh,0AEh,15h,9Ah,97h,20h,2Bh,34h,0
szSecret_Size equ $ - szSecret


Now, szSecret_Size will contain the total bytes szSecret contains
~Rob (Gunner)
- IE Zone Editor
- Gunners File Type Editor
http://www.gunnerinc.com

jj2007

Nice trick, Gunner. Another option is \
szSecret2    BYTE         77h,0F3h,79h,0F3h,0E7h,1Eh,43h,40h,5Ah,31h,6Ch,47h,73h,0E0h,0C0h,0BFh,2Ch,0BEh,66h,0FBh,0E3h,10h,59h, \
                   5Dh,00h,22h,39h,05h,73h,0E1h,0C4h,0B1h,27h,0FCh,70h,0F4h,0F0h,45h,58h,1Bh,4Bh,2Dh,33h,1Eh,39h,0ECh, \
          83h,0E5h,7Bh,0FCh,60h,0ADh,0A6h,4Fh,45h,1Ah,43h,31h,65h,54h,73h,0E1h,0C0h,0B9h,3Bh,0AEh,15h,9Ah,97h,20h,2Bh,34h,0

Don't forget the commas (in red).

dedndave

it's not a secret, anymore   :red

sharpe

Hi there,

Thanks for your answers. I still seem to be getting the same result when using commas (", \") at the ends of the lines:

E:\eleven\Eleven.Vars.inc(66) : error A2042: statement too complex

I'll try your Idea Gunner with the size variable, great idea!


jj2007

Quote from: sharpe on August 15, 2011, 05:31:27 AM
I still seem to be getting the same result when using commas (", \") at the ends of the lines:

E:\eleven\Eleven.Vars.inc(66) : error A2042: statement too complex


Just checked and yes, you are right, it doesn't work with MASM (i.e., ml.exe). Apologies - my default assembler is JWasm, and sometimes that causes problems of this kind :red