#1 16-07-2011 11:47

fm_bill
Registered: 02-07-2010
Posts: 3

a problem when write_memory with -1

Hello,
I have a problem when use 05DF:write_memory to write -1 in Vice City.

This is the code i used:

05DF: write_memory 0@ size 4 value 0xFFFFFFFF virtual_protect 0

but when i compiled it, '0xFFFFFFFF' became '04 FF', and it wrote only one byte in the memory.

So i changed the code:

2@ = -1
05DF: write_memory 0@ size 4 value 2@ virtual_protect 0

it works. but is there any other solutions?

Offline

#2 16-07-2011 13:27

Seemann
Registered: 07-08-2006
Posts: 2,156

Re: a problem when write_memory with -1

Did you try?

05DF: write_memory 0@ size 4 value -1 virtual_protect 0

Offline

#3 17-07-2011 17:27

fm_bill
Registered: 02-07-2010
Posts: 3

Re: a problem when write_memory with -1

Seemann wrote:

Did you try?

05DF: write_memory 0@ size 4 value -1 virtual_protect 0

i did but it didn't work

Offline

#4 17-07-2011 17:34

Deji
From: UK
Registered: 09-11-2008
Posts: 189
Website

Re: a problem when write_memory with -1

What's the value of 0@?

Offline

#5 18-07-2011 11:37

fm_bill
Registered: 02-07-2010
Posts: 3

Re: a problem when write_memory with -1

Deji wrote:

What's the value of 0@?

it's a buffer in the cs file.

i think it is because of an unsigned extension (movzx)

Offline

Board footer

Powered by FluxBB