[Coco] Strange results reading the palette registers on Coco3
    Robert Gault 
    robert.gault at att.net
       
    Sun Dec  4 23:08:42 EST 2011
    
    
  
Has anyone seen this on their own systems?
Coco3 with or without MPI, with or without disk controller
POKE&HFFB0,0:PRINT PEEK(&HFFB0)
result is $40
POKE&HFFB0,255:PRINT PEEK(&HFFB0)
result is $7F
However if memory is read with an ml program, the result is different.
START	CLRA
	STA	$FFB0
	LDB	$FFB0
	LDA	#255
	STA	$FFB0
	LDA	$FFB0
	STD	DATA
	RTS
DATA	RMB	2
	END	START
If the above is run with appropriate values for DATA and from Basic you:
PRINT PEEK(DATA), PEEK(DATA+1)
the result is $3F and 0.
Just to confuse matters more:
LPOKE&HFFB0,0:PRINT LPEEK(&HFFB0)
result is 0
LPOKE&HFFB0,255:LPEEK(&HFFB0)
result is 255
No matter how you look at this, something is very wrong.
    
    
More information about the Coco
mailing list