| View previous topic :: View next topic |
| Author |
Message |
Nuclear898 Grandmaster Cheater Supreme
Reputation: 0
Joined: 04 Jun 2006 Posts: 1597 Location: The Netherlands
|
Posted: Tue Jun 05, 2007 5:52 am Post subject: [Question] About allocating bytes |
|
|
How do you know if you should allocate bytes for a labeled handle in a script, and how do you know how many bytes you need?
help is much appreciated
|
|
| Back to top |
|
 |
brycez0rz Grandmaster Cheater
Reputation: 1
Joined: 01 Feb 2007 Posts: 910 Location: 14/f/ca
|
Posted: Tue Jun 05, 2007 6:00 am Post subject: |
|
|
| Don't know about the labelling thing, but allocate like 2 bytes per opcode? (I think, cause opcodes are made up of 2 hexadecimal characters, and they're worth one byte each, it works for me anyway.. o.o)
|
|
| Back to top |
|
 |
Symbol I'm a spammer
Reputation: 0
Joined: 18 Apr 2007 Posts: 5094 Location: Israel.
|
Posted: Tue Jun 05, 2007 6:10 am Post subject: |
|
|
pretty much that way...
but u can always allocate 2k bytes it will always be enough =D
i guess for like 2 lines u need like 4 bytes but for like pap/za vac ull need about 500 maybe less anyway as long the script is longer ull need mroe bytes...
if all u do is cmp and jmping so ull need only 4-12 bytes but u can also put 4k bytes =)
|
|
| Back to top |
|
 |
brycez0rz Grandmaster Cheater
Reputation: 1
Joined: 01 Feb 2007 Posts: 910 Location: 14/f/ca
|
Posted: Tue Jun 05, 2007 6:15 am Post subject: |
|
|
| Symbol wrote: | pretty much that way...
but u can always allocate 2k bytes it will always be enough =D
i guess for like 2 lines u need like 4 bytes but for like pap/za vac ull need about 500 maybe less anyway as long the script is longer ull need mroe bytes...
if all u do is cmp and jmping so ull need only 4-12 bytes but u can also put 4k bytes =) |
The inhumanity of allocating 4k bytes for comparing and jumping! D:
|
|
| Back to top |
|
 |
Nuclear898 Grandmaster Cheater Supreme
Reputation: 0
Joined: 04 Jun 2006 Posts: 1597 Location: The Netherlands
|
Posted: Tue Jun 05, 2007 7:35 am Post subject: |
|
|
| wouldnt that make it really slow somehow?
|
|
| Back to top |
|
 |
Labyrnth Moderator
Reputation: 10
Joined: 28 Nov 2006 Posts: 6300
|
Posted: Tue Jun 05, 2007 5:01 pm Post subject: |
|
|
I like using 256, that should be plenty for what you want to inject.
and you dont want to use alloc if you are going to use the script for a trainer.
If it is for AA script i would just use the defaulted alloc size , you will be good with it.
|
|
| Back to top |
|
 |
sponge I'm a spammer
Reputation: 1
Joined: 07 Nov 2006 Posts: 6009
|
Posted: Tue Jun 05, 2007 5:32 pm Post subject: |
|
|
wrong some mnemonics actually take up up to 6 bytes or maybe more... 2 bytes is barely enough... first allocate over and then count the bytes at the allocated area.
_________________
|
|
| Back to top |
|
 |
Labyrnth Moderator
Reputation: 10
Joined: 28 Nov 2006 Posts: 6300
|
Posted: Tue Jun 05, 2007 5:58 pm Post subject: |
|
|
| sponge wrote: | | wrong some mnemonics actually take up up to 6 bytes or maybe more... 2 bytes is barely enough... first allocate over and then count the bytes at the allocated area. |
They said 2k in bytes not 2 bytes
|
|
| Back to top |
|
 |
sponge I'm a spammer
Reputation: 1
Joined: 07 Nov 2006 Posts: 6009
|
Posted: Tue Jun 05, 2007 5:59 pm Post subject: |
|
|
| Quote: | | but allocate like 2 bytes per opcode? |
i was talking about him.
_________________
|
|
| Back to top |
|
 |
Labyrnth Moderator
Reputation: 10
Joined: 28 Nov 2006 Posts: 6300
|
Posted: Tue Jun 05, 2007 6:43 pm Post subject: |
|
|
| sponge wrote: | | Quote: | | but allocate like 2 bytes per opcode? |
i was talking about him. |
Roger Roger....
|
|
| Back to top |
|
 |
rapion124 Grandmaster Cheater Supreme
Reputation: 0
Joined: 25 Mar 2007 Posts: 1095
|
Posted: Tue Jun 05, 2007 7:11 pm Post subject: gg |
|
|
| Whats the diff between 200 and 20000?
|
|
| Back to top |
|
 |
Labyrnth Moderator
Reputation: 10
Joined: 28 Nov 2006 Posts: 6300
|
Posted: Tue Jun 05, 2007 7:26 pm Post subject: |
|
|
| 20000-200 = 19800 Oh i would say about that much.
|
|
| Back to top |
|
 |
samuri25404 Grandmaster Cheater
Reputation: 7
Joined: 04 May 2007 Posts: 955 Location: Why do you care?
|
Posted: Thu Jun 07, 2007 8:17 am Post subject: |
|
|
| sponge wrote: | | wrong some mnemonics actually take up up to 6 bytes or maybe more... 2 bytes is barely enough... first allocate over and then count the bytes at the allocated area. |
Agreed. Each command takes up a certain ammount of bytes, and as Labyrnth said, 256 should be enough for most anything.
|
|
| Back to top |
|
 |
|