Page 1 of 1

binary storage in same file?

Posted: Thu Aug 12, 2004 9:54 am
by Edwin Knoppert
In PowerBASIC i can obtain data using a lable and using CodePtr( mylabel ) like:

MyLabel:
!db 2,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
etc...

With the above i only need to remember it's size.
Can i make use of db statements in PureBasic in a similar way?
1) db statements results in the smallest not-encoded code.
2) Need to have direct access using a pointer to mylabel or so.
3) Would not like to use a method like T.s = T.s & "abcd"...
4) The size can become really big, like megabytes, to handle?
5) Don't want to use includebinary since then i'll need a separate file.

Thanks,

Posted: Thu Aug 12, 2004 10:52 am
by Rings
hehe,

Code: Select all

Debug "Adress is " + Hex(?MyLabel)+ " Len of Data is ="+Str(?MyLabel2-?MyLabel)

MyLabel:
!Db $90,$90,144 ;$90 iss NOP

MyLabel2:
Debug "Yes "

Posted: Thu Aug 12, 2004 11:04 am
by Edwin Knoppert
Thanks!

Will test soon..

:)

Posted: Thu Aug 12, 2004 4:19 pm
by blueznl
if it's DATA and you're planning to WRITE to it as well and you want it to run under future versions of windows (xp) you may need to put your data in a datasection...

Posted: Thu Aug 12, 2004 5:01 pm
by Edwin Knoppert
I only need to obtain it (read only)

Posted: Fri Aug 13, 2004 8:30 am
by Rings
if you want to include some protection-tricks in the code to irritate Disassemblers, than this is the way to do it ;)

Posted: Fri Aug 13, 2004 9:40 am
by thefool
how to disturb the dissassemblers?

I've found many informations on disturbing debuggers, but not dissassemblers. But again, How? interesting :D

Posted: Fri Aug 13, 2004 2:52 pm
by Rings
thefool wrote:how to disturb the dissassemblers?

I've found many informations on disturbing debuggers, but not dissassemblers. But again, How? interesting :D
well described in the following book (i own) :
http://www.nostarch.com/frameset.php?startat=crackproof

Posted: Fri Aug 13, 2004 3:52 pm
by thefool
Thanks :)

Posted: Fri Aug 13, 2004 4:15 pm
by NoahPhense
Thanks Rings.. looks like a good book, ordering now..

- np