BeanieBots
Moderator
PE V5.2.9
Firmware B.0 & B.1
Neither @ptrinc nor @ptrdec behave as expected in the simulator.
@ptrinc seems OK on the 28X2 but @ptrdec does not.
example for @ptrinc:
In simulation, the output goes up to 255 OK but then stays at 255.
I was expecting it to go to 1023 and then roll-over.
When programmed into a chip it behaves as expected.
example for @ptrdec:
In simulation, it decrements to 0 from any initial starting value of ptr but stops at zero. I was expecting it to roll-under back to 1023 and continue to count down.
When programmed into a chip (tried B.0 & B.1) it returns a 'strange' number set with no obvious pattern.
Replacing "b0=@ptrdec" with "b0=@ptr:dec ptr" gives the expected result from the chip but still does not work in the simulator.
In the simulator if ptr starts of at zero, simulation decrements to the expected value of 255 but no further decrements take place after that.
EDIT:
In simulation, replacing "b0=@ptrinc" with "b0=ptr:inc ptr" gives a rollover but it occurs at 255 instead of the expected 1023.
Firmware B.0 & B.1
Neither @ptrinc nor @ptrdec behave as expected in the simulator.
@ptrinc seems OK on the 28X2 but @ptrdec does not.
example for @ptrinc:
Code:
do
b0=@ptrinc
sertxd(#ptr,CR,LF)
pause 200
loop
I was expecting it to go to 1023 and then roll-over.
When programmed into a chip it behaves as expected.
example for @ptrdec:
Code:
do
b0=@ptrdec
sertxd(#ptr,CR,LF)
pause 200
loop
When programmed into a chip (tried B.0 & B.1) it returns a 'strange' number set with no obvious pattern.
Replacing "b0=@ptrdec" with "b0=@ptr:dec ptr" gives the expected result from the chip but still does not work in the simulator.
In the simulator if ptr starts of at zero, simulation decrements to the expected value of 255 but no further decrements take place after that.
EDIT:
In simulation, replacing "b0=@ptrinc" with "b0=ptr:inc ptr" gives a rollover but it occurs at 255 instead of the expected 1023.
Last edited: