Forum
POKE ULONG (*solved*) - Printable Version

+- Forum (https://www.boriel.com/forum)
+-- Forum: Compilers and Computer Languages (https://www.boriel.com/forum/forumdisplay.php?fid=12)
+--- Forum: ZX Basic Compiler (https://www.boriel.com/forum/forumdisplay.php?fid=11)
+---- Forum: Bug Reports (https://www.boriel.com/forum/forumdisplay.php?fid=15)
+---- Thread: POKE ULONG (*solved*) (/showthread.php?tid=497)



POKE ULONG (*solved*) - LCD - 09-15-2012

Hi Boriel,
Code:
poke Uinteger adr,peek(Uinteger,adr+128)
poke Uinteger adr+2,peek(Uinteger,adr+130)
works, it should do the same as
Code:
poke Ulong adr+(a<<5),peek(Ulong,adr+128)
should copy 4 bytes, but the first 2 bytes are not correct.


Re: POKE ULONG - boriel - 09-16-2012

LCD Wrote:Hi Boriel,
Code:
poke Uinteger adr,peek(Uinteger,adr+128)
poke Uinteger adr+2,peek(Uinteger,adr+130)
works, it should do the same as
Code:
poke Ulong adr+(a<<5),peek(Ulong,adr+128)
should copy 4 bytes, but the first 2 bytes are not correct.
Hmmm. I can't understand this example. 'adr' is an Ulong variable? What is 'a'?
Anyway, I guess this is related to a previous fixed bug with poke Uinteger (except I forgot to check for Ulong, Long, Fixed and Float types).


Re: POKE ULONG - LCD - 09-16-2012

boriel Wrote:
LCD Wrote:Hi Boriel,
Code:
poke Uinteger adr,peek(Uinteger,adr+128)
poke Uinteger adr+2,peek(Uinteger,adr+130)
works, it should do the same as
Code:
poke Ulong adr+(a<<5),peek(Ulong,adr+128)
should copy 4 bytes, but the first 2 bytes are not correct.
Hmmm. I can't understand this example. 'adr' is an Ulong variable? What is 'a'?
Anyway, I guess this is related to a previous fixed bug with poke Uinteger (except I forgot to check for Ulong, Long, Fixed and Float types).

Oooops, it should be
Code:
poke Ulong adr,peek(Ulong,adr+128)
forget the a variable.
adr is a uinteger variable and the example should copy 4 bytes from one address to another, but the first 2 bytes are corrupted after copying.


Re: POKE ULONG - boriel - 09-16-2012

Can you download the latest version 1.3.0s920 and check if it is fixed?


Re: POKE ULONG - LCD - 09-16-2012

boriel Wrote:Can you download the latest version 1.3.0s920 and check if it is fixed?
Okay, I will do it later today. Thx!


Re: POKE ULONG - LCD - 09-17-2012

Tested. It works now fine. Thank you again.