[Coco] Cross Post from FB Page..Disk Basic Programming Question...

Arthur Flexser flexser at fiu.edu
Thu Aug 6 18:06:05 EDT 2015


It would be something like

10 OPEN "I",5,"DIRFILE.TXT"
20 POKE &H6F,5
30 DIR 1
40 POKE&H6F,0
50 CLOSE #5

Art


On Thu, Aug 6, 2015 at 5:59 PM, Steve Batson via Coco <coco at maltedmedia.com>
wrote:

> Art,
>
> Can you show a simple example of this?
>
> Here’s a psuedo code for what I would want to do.
>
> 10 Turn On Redirection of screen text to array/file
> 20 DIR 1
> 30 Turn Off Redirection
> 40 Parse captured data
> 50 Selectively Display the parsed data in new format
>
> My interest is Lines 10-30, I can figure out the parsing and display of
> parsed data. Also please don't direct me to basic commands for directly
> reading the disk by tracks and sectors. I understand how to do that but it
> won't do what I'm looking for and I may want to use this for things beyond
> DIR listings.
> On Aug 6, 2015, at 2:49 PM, Arthur Flexser <flexser at fiu.edu> wrote:
>
> > You could try opening the disk file with a certain device number assigned
> > to it and then poke that device number into location $6F immediately
> before
> > doing the LLIST or DIR (restoring the device number to zero afterwards)
> and
> > see if that works for getting the output into the disk file.
> >
> > Art
> >
> > On Thu, Aug 6, 2015 at 5:35 PM, Steve Batson via Coco <
> coco at maltedmedia.com>
> > wrote:
> >
> >>
> >> Art,
> >>
> >> I was asked for clarification of my question on the FB page and your
> >> question confirms I was not very clear.
> >>
> >> I want to be able programmatically start capturing anything that is
> going
> >> to the screen to a file. My interest is only text, so no worry about
> about
> >> graphics. So lets say I wanted my program to do a DIR or LIST command,
> I'd
> >> like send all of the screen output from those commands to a file. If
> not a
> >> a file, to an array (which probably is the better approach since the
> data
> >> could be parsed and cleaned up before storing in a file). I'd take
> either.
> >> Does this make sense?
> >>
> >> To add to that, I'd want to have this work in standard Disk Basic
> >> including Assembly if necessary. I would want to portable between CoCo
> so
> >> I'm not having to worry about ADOS or other custom dos installed.
> >>
> >>
> >> On Aug 6, 2015, at 2:12 PM, Arthur Flexser <flexser at fiu.edu> wrote:
> >>
> >>> Do you mean something like a log file that contains both what you type
> to
> >>> the CoCo and whatever the CoCo puts on the screen in response?
> >>>
> >>> I don't think there's an easy way to do that from Basic, though it
> >>> shouldn't be too difficult to do with an assembly language patch to
> >> Basic.
> >>> You'd want to change the unit number of where the output is going from
> >> unit
> >>> #0 (the screen) to the one you've assigned to the disk file.
> Actually, a
> >>> simple redirect like that would prevent the output from going to the
> >>> screen, so you'd probably want to output an additional copy to the disk
> >>> file of whatever is sent to the screen.
> >>>
> >>> There's a feature similar to this in ADOS (the PRT ON/PRT OFF command),
> >>> except that it sends everything to the printer instead of to a disk
> file.
> >>> If that would do for your purposes, you could download ADOS (ADOS-3 for
> >> the
> >>> CoCo 3) and boot it up from disk.
> >>>
> >>> Art
> >>>
> >>> On Thu, Aug 6, 2015 at 4:12 PM, Steve Batson via Coco <
> >> coco at maltedmedia.com>
> >>> wrote:
> >>>
> >>>>
> >>>> CoCo Disk BASIC programming question.
> >>>> Is there a simple way in Disk BASIC to open a disk file and then send
> >>>> anything following that command to a Disk File or an Array from the
> >> screen
> >>>> and then stop once the data has been collected?
> >>>>
> >>>>
> >>>>
> >>>> --
> >>>> Coco mailing list
> >>>> Coco at maltedmedia.com
> >>>> https://pairlist5.pair.net/mailman/listinfo/coco
> >>>>
> >>>
> >>> --
> >>> Coco mailing list
> >>> Coco at maltedmedia.com
> >>> https://pairlist5.pair.net/mailman/listinfo/coco
> >> I want to be able programmatically start capturing anything that is
> going
> >> to the screen to a file. My interest is only text, so no worry about
> about
> >> graphics. So lets say I wanted my program to do a DIR or LIST command,
> I'd
> >> like send all of the screen output from those commands to a file. If
> not a
> >> a file, to an array (which probably is the better approach since the
> data
> >> could be parsed and cleaned up before storing in a file). I'd take
> either.
> >> Does this make sense?
> >>
> >> --
> >> Coco mailing list
> >> Coco at maltedmedia.com
> >> https://pairlist5.pair.net/mailman/listinfo/coco
> >>
> >
> > --
> > Coco mailing list
> > Coco at maltedmedia.com
> > https://pairlist5.pair.net/mailman/listinfo/coco
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
>


More information about the Coco mailing list