[Coco] Color Forth Assistance Request

Stephen Pereira spereira1952 at comcast.net
Sat Jan 17 12:57:18 EST 2015


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




More information about the Coco mailing list