April Fool? Simulating W26

PeteShep

Member
Came across this after two evenings of pain. Had a search, but couldn't find any reference to it.
I was simulating a bit of maths, with the results in Words when the simulation stopped.

Run/simulate the following and watch the used hi Word values in the simulator.
Code:
#picaxe 28x2

symbol Cnt = W0
symbol Test0 = W24
symbol Test1 = w25
symbol Test2 = w26
symbol Test3 = w27

Cnt = $A0
do while Cnt <> 0
	let Test0 = Cnt
	let Test1 = Cnt
	let Test2 = Cnt
	let Test3 = Cnt
	
	if Test0 <> Cnt or Test1 <> Cnt or Test2 <> Cnt or Test3 <> Cnt then exit
	inc Cnt
loop

end
Starting the count at $A0 gives enough time to change the simulator view to Word and slide down to the higher variables...
Same on software versions V5.5.1 and V5.5.5
I haven't bothered bottoming it all out - just moved to another block of Words, but frustrated doesn't cover it!


Pete.
 

Buzby

Senior Member
Hi Pete,

I've run this in the simulator, but I don't know what I'm looking for.

The Hi bytes looked fine for me, but I only ran for a few minutes.

Please either give us a clue what we are looking for, or a screenshot showing what you've seen.

Cheers,

Buzby
 

Buzby

Senior Member
Hi Pete,

I see it, but no idea yet why. The relevant byte is OK.

Stay tuned !.

Cheers,

Buzby
 

Buzby

Senior Member
Code:
#picaxe 28x2


W26 = $1234
sertxd (#W26,cr,lf)

end
It doesn't get much more simple than this.

$1234 is 4660 decimal. The sertxd prints the correct value of 4660, but the simulator display shows $B48E, which is 46222 decimal.

I seem to remember an issue some months ago about the simulator not handling very big multiplications properly, but I don't think it's related to this.

I'm sure Technical or hippy will shed some light on it.

Cheers,

Buzby
 
Top