Hey All,
Sorry to bombard the forum with assembly questions (I feel I should just create a Ed's assembly questions topic Image may be NSFW.
Clik here to view.
). I'm now trying to store the data received over serial to a file using assembly (rather than basic). I have an area in memory set up called filename which stores the filename of the file I'd like to create and write to "temp" (I've checked the area in BeebEm debug and it is storing temp terminated by &0D) and a second area setup called channel to store the file handle return from osfind.
I've looked at mdfs, the user guide and the new advanced user guide, and sense my error is something to do with what I'm putting in X and Y...I think mdfs has the answer but I don't understand it Image may be NSFW.
Clik here to view.
I have noticed that if I change "temp" to ":0.$.temp" or "$.temp" I get a disc error rather than the word Channel.
As usual thanks for any assistance Image may be NSFW.
Clik here to view.
,
Cheers,
Ed
P.s. in future I'd probably use OSGBPB to speed things up, but just want to have an understanding of OSFIND first.
Sorry to bombard the forum with assembly questions (I feel I should just create a Ed's assembly questions topic Image may be NSFW.
Clik here to view.

Code:
.open_filelda &80ldy filenameldx filenamejsr osfindcmp #0beq errorsta channel
Clik here to view.

Code:
In some filing systems the bottom bits of A control how the file is opened: b4 - a proposed extension is to open a file locked by another process. b3 - if set, returns an error if file not found, instead of zero handle. b2 - if set, error is generated if attempt to open a directory. b1-b0 - if 00, search for file with File$Path. b1-b0 - if 01, search for file with path pointed to by R2. b1-b0 - if 10, search for file with path pointed to by system variable pointed to by R2. b1-b0 - if 11, do not use any search path.Note that it is possible to open a directory, but no input or output operations can be done.
As usual thanks for any assistance Image may be NSFW.
Clik here to view.

Cheers,
Ed
P.s. in future I'd probably use OSGBPB to speed things up, but just want to have an understanding of OSFIND first.
Statistics: Posted by vela025 — Sun Mar 23, 2025 2:25 pm