PE 08M2 simulation error in @bptrinc

Johnmb

Member
' Run PE simulator for following program

' Load test data

Poke 0, 11, 12, 13, 14, 15, 16, 17, 18 ' PUT DATA IN BYTES 0 THRU 8
Poke 28, 21, 22, 23, 24, 25, 26, 27, 28 ' PUT DATA IN BYTES 28 THRU 35

' Display data in simulation screens

bptr = 28
SerTxd (" A ", #bptr," ", #@bptrinc," ", #bptr, CR, LF)
SerTxd (" B ", #bptr," ", #@bptrinc," ", #bptr, CR, LF)
SerTxd (" C ", #bptr," ", #@bptrinc," ", #bptr, CR, LF)
SerTxd (" D ", #bptr," ", #@bptrinc," ", #bptr, CR, LF)
SerTxd (" E ", #bptr," ", #@bptrinc," ", #bptr, CR, LF)
SerTxd (" F ", #bptr," ", #@bptrinc," ", #bptr, CR, LF)
SerTxd (" G ", #bptr," ", #@bptrinc," ", #bptr, CR, LF)
SerTxd (" H ", #bptr," ", #@bptrinc," ", #bptr, CR, LF)
end

' The data was loaded to memory.
' It was displayed in output buffer:
' LINE bptr data bptr+1
' A 28 21 29
' B 29 22 30
' C 30 23 31
' D 31 24 O<-------bptr is now 0! It reset. Why?
' E 0 11 1
' F 1 12 2
' G 2 13 3
' H 3 14 4
 

Attachments

Technical

Technical Support
Staff member
' D 31 24 O<-------bptr is now 0! It reset. Why?
Because the on-screen simulator is incorrectly overflowing at 32 not 128!
The real chip will be fine, and we will fix this simulation bug for the next release. Thanks for pointing it out.
 
Top