_The Doctor__ Posted September 13, 2021 Share Posted September 13, 2021 2 hours ago, zbyti said: `STA $FFFE,X` why on Earth someone wants to lose cycle this way? defect of some assemblers... bane of our existence! Quote Link to comment Share on other sites More sharing options...
_The Doctor__ Posted September 13, 2021 Share Posted September 13, 2021 2 hours ago, drac030 said: Noone. That is the decision of the assembler ($xx-constant, where constant>$xx) without the coder knowing. Sadly, same with STA $FFFE,Y which is much harder to avoid. this! Quote Link to comment Share on other sites More sharing options...
zbyti Posted September 14, 2021 Share Posted September 14, 2021 22 hours ago, drac030 said: Noone. That is the decision of the assembler ($xx-constant, where constant>$xx) without the coder knowing. Sadly, same with STA $FFFE,Y which is much harder to avoid. As far I understand `STA $FFFE,X` was unintentionally but if he thinks he was on ZP why he use Y register? `STA $FFFE,Y` must be intentionally codded then `STA $FFFE,X` can be too. Right? Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted September 14, 2021 Share Posted September 14, 2021 I would think it would keep things intentionally consistent through using the same label. The use of the Y index is simply as the X is in use already and their use can't be swapped due to other routines being called. 1 Quote Link to comment Share on other sites More sharing options...
drac030 Posted September 14, 2021 Share Posted September 14, 2021 As said, there is no LDA/STA zp,Y addressing mode, so abs,Y is used instead when X is not available for a reason. Assemblers usually automatically (and silently) promote LDA $80,Y into LDA $0080,Y, so with some bad luck you can live half your life not even fully realizing that LDA zp,Y does not exist. The wrap-around could of course be intentional if the author is a pervert. But most people are not, thus I think it is more probable that the negative base address comes from the accident I sketched out above, i.e. addressing some zp table with index register increased by some constant, this constant being subtracted from the base address: LDA zptable-$80,X. Then moving "zptable" below $80 shifts out the base address below 0, which most assemblers silently accept. 1 Quote Link to comment Share on other sites More sharing options...
zbyti Posted September 14, 2021 Share Posted September 14, 2021 (edited) But he must wrote LDA zptable-$80,Y also he must know this will be absolute address. Edited September 14, 2021 by zbyti Quote Link to comment Share on other sites More sharing options...
drac030 Posted September 14, 2021 Share Posted September 14, 2021 Possibly (with the margin of probability that he might have overlooked the fact that LDA zp,Y did not exist). But what is the point? PS. "must have written" and "must have known", if I am not mistaken. Quote Link to comment Share on other sites More sharing options...
zbyti Posted September 14, 2021 Share Posted September 14, 2021 (edited) 6 minutes ago, drac030 said: But what is the point? PS. "must have written" and "must have known", if I am not mistaken. Yes my English is bad. Next time I use Google Translator :] Sorry. I'm better at reading then writing. Point is it looked so bizarre to me that I thought it was board data. I was trying to understand why someone code this way. Edited September 14, 2021 by zbyti Quote Link to comment Share on other sites More sharing options...
drac030 Posted September 14, 2021 Share Posted September 14, 2021 (edited) I did not analyze the Colossus Chess code, so I cannot say why this or that instruction was used in that particular place of that particular program. But the most common cases have already been provided: 1) X is already in use, 2) you forget that zp,Y is in fact abs,Y. Edited September 14, 2021 by drac030 Quote Link to comment Share on other sites More sharing options...
Marius Posted October 3, 2021 Share Posted October 3, 2021 Hi all, Since I always hated the 3D in Colossus Chess 4.1, I 'hacked' it so it is now forced into 2D on startup. I always changed the default of the the Line Depth into 5 instead of 2 (that is only interesting for the alternate screen view (not for the strength of the game) And last but not least I changed the default colors to blue and a darkgrey border. Looks much better. If you are interested, let me know. Last but not least: This chess program is really fabulous. In the Playing mode "5" (infinite thinking) you can really get a very decent level in playing from Colossus Chess. You simply do not have to be in a hurry. In not too much time it seeks already 6 PLY and the longer it thinks, the deeper. Quite impressive. 3 Quote Link to comment Share on other sites More sharing options...
devwebcl Posted October 4, 2021 Author Share Posted October 4, 2021 Could you please post it here? So it is publicly available. Quote Link to comment Share on other sites More sharing options...
Marius Posted October 4, 2021 Share Posted October 4, 2021 Hi all, This is Colossus Chess 4.1 with my own 'hack' Blue playfield, grey border 2D chess set by default Line depth = 5 by default (visible in the alternate screen) Colossus Chess 4.1 needs to be on a ED formatted disk (so beware, do not try the save function on your HD partition!!) The 4.1 hack is able to save a chess position on disk. It uses sector $400 and up for that. Use Shift + D for that function. I have tested it, it works. But again BEWARE ... it simply saves DOS independently and directly to these sectors. You won't see anything in the directory, but the data is there! This Load/Save was not done by me. COLCH41.ATR 5 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.