On Sat, 10 Oct 2020, gsteemso-2 [via cbm-hackers] wrote: > > After setting up to build cbmcmd from source code and > > sprinkling in some print statements, it looks like this sequence fails: > > > > file # 15 is opened on error channel of source drive > > file # 2 is opened on source file itself, with secondary of 2 > > May not be relevant, but are any other files open at this point? That was my first thought, but even after inserting code to close all handles from 4..127 in a loop it persists. Inspection of the code does not show that anything else is open at the time. > > cbm_write( to ch.15 "p,96+2, rec#n, 1" ) <--- Position to rec #n > > cbm_read( from ch.2 to buffer ) <--- Returns '0' bytes (!), but _oserror > == > > 0 > > cbm_read( from ch. 15 to buffer ) <--- buffer has '70, ... ' error > message > > > > I can perform this exact series of steps from BASIC and all is well > > (provided I specify valid position). [...] > > > The original code was using a value of 127 for error channel address. > This > > seemed very odd, particularly since I cannot locate any obvious place > where > > 127 is opened in the first place. > > I'm a bit unclear on your meaning here. After some thought, I conclude > that by "error channel address" you mean the Kernal "Logical File > Number" that CBM Commander opens to the error channel -- the one you > summarized as "file # 15" in your own exploration of the problem. Is > that correct? That is correct. I'm talking about the primary address. -- Sent from: http://cbm-hackers.2304266.n4.nabble.com/Received on 2020-10-11 16:00:03
Archive generated by hypermail 2.3.0.