Re: reading status channel in ML

From: Steve Judd (sjudd_at_ffd2.com)
Date: 2006-04-11 02:36:51

Hi-ho, Silver:

> it is somehow connected with $b7 (FNLEN). When $b7 is equal to zero
> (like e.g. after loading from tape) I get some strange behaviour.
> OTOH I get differently strange results when not setting $b7 to zero -
> in other places. Furthermore, another question - when should and when
> shouldn't one CLOSE() / CLALL() after using the channel?

So, I went ahead and did a simple test.  I opened a non-existant file for
reading and closed it, then ran the error code that I posted earlier.
Worked great.  And $b7 of course has to be zero (like, my code uses

	LDA #00
	JSR SETNAM

but STA $b7 works just as well of course).  Also of course, a nonzero $b7
caused it to fail (trying to load a garbage filename through channel 15).

So, I wonder if you can provide more detail?  One stupid question: when
you open the file, do you open "filename" or open "filename,p,r"?

One other thing: I looked through the roms and the only place I see CLRCHN
used is in the warm start, error printing, and INPUT#/GET#.  So the kernal
method is to call it after reading a char, e.g. before closing.

cu,

-S

       Message was sent through the cbm-hackers mailing list

Archive generated by hypermail pre-2.1.8.