Re: Bug in 1581 ???

From: silverdr_at_wfmh.org.pl
Date: Sun, 18 Mar 2012 16:51:16 +0100
Message-Id: <F00C7EEB-458D-4D98-A526-181F66510CE7@wfmh.org.pl>
On 2012-02-08, at 17:46, Ruud@Baltissen.org wrote:

> It doesn't do any harm but doesn't make sense as well:
>> 		lda	#9
>> 		sta	ContrStat
>> 
>> 		lda	ContrStat
> Why the last "LDA"?

I don't know what is the ContrStat but some HW registers behave differently when writing and differently when reading from them. While it looks strange - I recall such examples where writing was supposed to set something and reading to verify the result, or set/update status flags, etc. Also combinations of ROM/RAM can have similar pieces of code around them. I recall a friend of mine who liked "dirty" programming, was doing similar things. Storing something under KERNAL but reading from the ROM at the same locations. Just to confuse the others, I guess. I recall how he was getting "$" for directory listing from a ROM location instead of immediate addressing...

If it is a pure RAM location then it doesn't seem to make sense to me either.

-- 
SD!
       Message was sent through the cbm-hackers mailing list
Received on 2012-03-18 16:00:36

Archive generated by hypermail 2.2.0.