[Coco] Color Forth Assistance Request

Arthur Flexser flexser at fiu.edu
Sat Jan 17 22:18:09 EST 2015


The stuff between $CF68 and $CF7E is for parsing the remainder of the line
once the SAVE token is encountered.  Jumping in at $CF7E bypasses that and
assumes that it is already known that you are saving a binary file.

Art

On Sat, Jan 17, 2015 at 8:17 PM, Stephen Pereira <spereira1952 at comcast.net>
wrote:

> Hello again, Art,
>
> I’m looking at “Disk Basic Unraveled.”  I shows a disassembly of Disk
> Basic version 1.1, and it shows the SAVEM command at $CF68 and the LOADM
> command at $CFC1.
>
> I guess my confusion is with your statement that SAVEM is at $CF7E…
>
> smp
> --
> Stephen M. Pereira
> Bedford, NH  03110
> KB1SXE
>
>
> > On Jan 17, 2015, at 7:30 PM, Arthur Flexser <flexser at fiu.edu> wrote:
> >
> > I found a snatch of old code of mine that contains enough information
> that
> > I can give you something with more detail.  It doesn't exactly use the
> > method of the previous message, but instead jumps directly into the
> > SAVEM command (to $CF7E in Disk Basic 1.1) after storing the appropriate
> > information to the file name buffer (8 bytes at $94C) and extension
> buffer
> > (3 bytes at $954).  It appears that if you then jump to $CF7E with the
> > registers set as below and pushed onto the stack with a single PSHS
> > instruction, everything should work:
> >
> > Y = start address - 1
> > X = end address
> > D = exec address
> > U = address in your program where you want to resume execution after
> > the       savem happens
> >
> > Art
> >
> >
> >
> > On Sat, Jan 17, 2015 at 2:02 PM, Arthur Flexser <flexser at fiu.edu> wrote:
> >
> >> One approach to using Basic operations from a machine-language program
> is
> >> to set up a buffer containing the command as it would be typed in to
> Basic,
> >> possibly already tokenized (i.e., use a "save" token byte instead of
> Ascii
> >> SAVE), and then point Basic to this buffer and have it execute the
> >> command.  There was an article in Rainbow with examples;  maybe someone
> can
> >> provide the reference.  Pointing Basic to the buffer essentially
> involves
> >> putting its address into $00A6, the location of Basic's parse pointer.
> >>
> >> Art
> >>
> >> On Sat, Jan 17, 2015 at 12:57 PM, Stephen Pereira <
> >> spereira1952 at comcast.net> wrote:
> >>
> >>> Hello again, all,
> >>>
> >>> As you know from my postings about Color Forth, I have been successful
> >>> with typing in the source code for the Color Forth nucleus (thanks
> again,
> >>> Brett, for your assistance finding the last few typos!).  With this,
> the
> >>> ORG of the assembly code can be changed to allow Color Forth to be
> loaded
> >>> from DECB (HDBDOS in my case) without overwriting any of the disk
> >>> capabilities.  I also have devised a method to pre-load the code for 1
> to 8
> >>> Forth screens of Forth code that can be subsequently loaded into Color
> >>> Forth to add in more of the original capability, or the editor, etc.
> >>>
> >>> Now, I would like to add in a simple method for loading and saving a
> set
> >>> of Forth screens from disk.  What I would like to be able to do is
> perform
> >>> LOADM"SCRN1TO8" and SAVEM"SCRN1TO8" &H2380 &H43A0 &H5979 from inside
> Color
> >>> Forth.
> >>>
> >>> I have taken a look at "Disk Basic Unravelled," and I found memory
> >>> locations like Disk File Name Buffer (DNAMBF) and Disk File Extension
> Name
> >>> Buffer (DEXTBF) which look like places that I could load the file name
> and
> >>> extension.  I also found the routine at LC48D which is commented as
> "Open
> >>> Disk File For Read or Write."
> >>>
> >>> However, I have never written my own code to patch into the DECB system
> >>> before, so I am skittish, to say the least.
> >>>
> >>> What I would like to do is write my own code to load the file name and
> >>> extension, the starting and ending addresses for the memory block that
> I
> >>> would like to save, and call a routine to perform a SAVEM command as
> if it
> >>> had come in from the Basic command line.  Similarly, I would like to
> write
> >>> the code to load the file name and extension, and call a routine to
> perform
> >>> a LOADM command as if it had come in from the Basic command line.
> >>>
> >>> Can anyone offer me some advice on where to look to pick up on the
> >>> specific things that I would have to do in my code to accomplish these
> >>> operations?
> >>>
> >>> Thanks very much, in advance, for your attention and advice.
> >>>
> >>> smp
> >>> --
> >>> Stephen M. Pereira
> >>> Bedford, NH  03110
> >>> KB1SXE
> >>>
> >>>
> >>>
> >>> --
> >>> 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