A late thought on this thread. I noticed ages ago, but only just got around to thinking about it. GSREAD returns V set if the decoded character is a 7-bit control character, ie &00-&1F or &80-&9F. It's not an accident as it's there in all 8-bit MOSes, and the coding is deliberate:It didn't need to do that, it could easily have done AND #&1F:BPL gsreadok and also dispensed with the CLV.
But the thought is: did/does any software ever use the returned state in V?
Edit: I've also noticed that the |char processing uses the keyboard translation code, so |£ gives |_ ie both characters on the £_ key give &1F, both bar-&5F and bar-&60. None of my clones of GSREAD have ever done that! I would have expected bar-&60 to do the same as all other bar-chars control escapes and do AND &1F, so give &00.
Code:
AND #&1F ; Convert bar-letter to control codeBIT SETV:BVS gsreadok ; SEV=control character.....gsreadcharCLV ; CLV=not control character.gsreadokINY ; Step to next characterORA GSCHAR ; Add in any bit 7 from |! prefixCLC:RTS ; CLC=not end of string
But the thought is: did/does any software ever use the returned state in V?
Edit: I've also noticed that the |char processing uses the keyboard translation code, so |£ gives |_ ie both characters on the £_ key give &1F, both bar-&5F and bar-&60. None of my clones of GSREAD have ever done that! I would have expected bar-&60 to do the same as all other bar-chars control escapes and do AND &1F, so give &00.
Statistics: Posted by jgharston — Sat Apr 12, 2025 7:10 pm