Poke error when sequential data is written up to location $7F.

westaust55

Moderator
Confirm that I see the same problem.
If you skip location $7F and resume at $80 then all is seemingly well.

Cannot see anything in the PIC datasheet that would indicate $7F is not available. In fact it states 0 to $7F in bank0.

The $7E may be a carry over from the 28X1/40X1 where the upper limit is $7F in the lower block/bank.

Code:
; This works
	W0 = %1100110000110011

	POKE $7E,WORD W0

	POKE $7C,B0,B1,B2
	
	POKE $7F,B0,B1
	
	POKE $7D,B0,B1  ;  skip poking $B2 into $7F
	
	poke $80, B2



	
	POKE $5F,"1","2","3","4","5","6","7","8","9","0","1","2","3","4","5","6","7","8","9","0","1","2","3","4","5","6","7","8","9","0","1","2" ; skip location $7F
	POKE $80,"3","4","5","6","7","8","9","0"
	POKE $87,"1","2","3","4","5","6","7","8","9","0","1","2","3","4","5","6","7","8","9","0","1","2","3","4","5","6","7","8","9","0","1","2","3","4","5","6","7","8","9","0"
	POKE $AF,"1","2","3","4","5","6","7","8","9","0","1","2","3","4","5","6","7","8","9","0","1","2","3","4","5","6","7","8","9","0","1","2","3","4","5","6","7","8","9","0"
	POKE $D7,"1","2","3","4","5","6","7","8","9","0","1","2","3","4","5","6","7","8","9","0","1","2","3","4","5","6","7","8","9","0","1","2","3","4","5","6","7","8","9","0"
 

hippy

Technical Support
Staff member
This seems to be a compiler issue on particular mult-part poke commands which we will look into.

The work round when this occurs seems to be to break the multi-part poke into separate pieces, for example "Poke $7F,b2" does not generate an error.
 

westaust55

Moderator
Another late night test indicates it is only if location 7F is not the first location.
So multi location "poking" is possible so long as location $7F is the first in the sequence

so this also works/compiles without a syntax error:
Code:
; This works
	W0 = %1100110000110011

	POKE $7E,WORD W0

	POKE $7C,B0,B1,B2
	
	[COLOR="Red"]POKE $7F[/COLOR], B2, B3, B4, B5
 

Technical

Technical Support
Staff member
This is a compiler bug that has been fixed for the next release. To workaround at present simply use separate poke commands for each of these addresses.
 
Top