Alex_Goryachev (Sprinter Team)
2002/07/01 20:52
|
Sprinter CamelForth
|
| |
Sprinter CamelForth v4.00 by Garry Lancaster is available at www.petersplus.com/sprinter/software/camel400.zip
It's a very nice version of Forth! IMHO, it is a real alternative for Assembler on Sprinter computer. I hope, Garry Lancaster will can to answer our questions.
At first, how to make Sprinter EXE program by Sprinter CamelForth?
---
PETERS PLUS LTD
|
garrylancaster (stranger
)
2002/07/02 03:16
|
|
At the moment you can't make an EXE program with CamelForth (as I didn't have enough knowledge of the primary loader process). However, now I do and I will add this facility very soon.
Thanks,
Garry
--
Garry Lancaster
http://www.z88forever.org.uk/zxplus3e/
http://www.z88forever.org.uk/
|
Alex_Goryachev (Sprinter Team)
2002/07/02 09:26
|
|
And another question. Do you know any variant of CemelForth for MS-DOS, which you can recommend? Usage of PC Camel Forth can be a good way in some case, when Sprinter not available.
---
PETERS PLUS LTD
|
garrylancaster (stranger
)
2002/07/02 14:12
|
|
There is no version of CamelForth for the PC (in fact, only the Z88 version of CamelForth that I produced is similar to the Sprinter version).
However, as CamelForth is ANS-compliant, you can use another ANS Forth and write programs using many of the features of Sprinter CamelForth (except specific things like multitasking, windowing, fast code etc).
I would recommend gForth, which I use. It runs on DOS, Linux, Win32, OS/2 etc. You can get it from:
http://www.complang.tuwien.ac.at/forth/gforth/
Garry
--
Garry Lancaster
http://www.z88forever.org.uk/zxplus3e/
http://www.z88forever.org.uk/
|
Alex_Hot (stranger
)
2002/07/03 10:32
|
|
What you can say about PC version of Camel Forth, which I found at
ftp://ftp.zetetics.com/pub/forth/camel/cam86-10.zip
|
Alex_Hot (stranger
)
2002/07/03 10:39
|
|
Can you show an example of usage the internal assembler, for example for definition any Sprinter BIOS function?
|
garrylancaster (stranger
)
2002/07/03 21:39
|
|
This PC version looks like it is a version of the original CamelForth, before I significantly extended it (only Z88 and Sprinter have the extended versions).
So, yes it has all the core words as Sprinter CamelForth. But it doesn't have any file or block handling, exception-handling, wordlists/vocabularies, etc.
gForth does have all these, so I would recommend it. PC CamelForth would not really be very useful.
Garry
--
Garry Lancaster
http://www.z88forever.org.uk/zxplus3e/
http://www.z88forever.org.uk/ Edited by garrylancaster on 2002/07/03 21:41.
|
garrylancaster (stranger
)
2002/07/03 21:53 Attachment
|
|
Unfortunately there isn't an assembler at the moment, so it is necessary to hand-assemble CODE words. If anyone can provide a Z80 assembler for ANS Forth, it would be gratefully received!
An example of writing a CODE word to perform a DSS call is attached, and will also be in the next release (v4.01). Writing a BIOS call word will work in the same way.
The main things to remember are:
1. Start with CODE <name> and end with NEXT
2. Always preserve DE IX IY registers (DSS/BIOS calls may corrupt them)
3. BC contains top stack item; the rest of the stack is the normal machine stack, and accessed with PUSH/POP.
Garry
--
Garry Lancaster
http://www.z88forever.org.uk/zxplus3e/
http://www.z88forever.org.uk/
|
Alex_Goryachev (Sprinter Team)
2002/07/04 13:53
|
|
CamelForth v4.01 is available now.
News:
1. SAVE-EXE word for creating EXE applications. There are details in
saveexe.txt, and examples in hextodec.fth & copy.fth.
2. Words for accessing Sprinter directories and disks. There are details
in dirs.txt.
3. An example of creating a CODE word accessing a DSS function is now
available, in bootdsk.fth.
4. Some minor documentation updates.
---
PETERS PLUS LTD
|
Alex_Hot (stranger
)
2002/07/04 20:54
|
|
Thank you! Yes, GForth is more powerfull... And more comfortable, BTW. I say about SEE word, for example... I examined this word, but it was too deep for analysis. :(
Do you plan to define this word in Sprinter CamelForth?
BTW I found CamelForth Glossary at the your webpage but I can't download files, which contain it! Can you post Glossary in this forum?
|
garrylancaster (stranger
)
2002/07/05 02:52 Attachment
|
|
SEE is very difficult to do, and I don't see any reason for it; I will release the sources of CamelForth when they are stable, so you can see the definition of any word; all other words you will have written yourself ;-)
I don't have an up-to-date glossary for Sprinter CamelForth. However, attached is a glossary for a recent version of Z88 CamelForth; most of the words are the same.
If you can't find a Sprinter CamelForth word in the glossary, it is probably Sprinter-specific and described somewhere in the *.txt documentation files.
If you can't find a glossary word in Sprinter CamelForth, it is probably Z88-specific (for example, all words in the "graphics", "packages", "windows" and "far-memory" categories).
More complete definitions of all the ANS Standard words can be found in the ANS Standard; a copy of this is at:
http://www.z88forever.org.uk/forth/ansforth/dpans.htm
--
Garry Lancaster
http://www.z88forever.org.uk/zxplus3e/
http://www.z88forever.org.uk/
|
Alex_Hot (stranger
)
2002/07/08 22:23
|
|
Has CamelForth a word for cleaning screen as CLS in Forth-83?
In Glossary I have found GPAGE only, but this word for Z88, for its graphic screen...
BTW, have you a plan about supporting of 640x256 graphic mode? Using of "text print procedure" by Anton Enin can be a way for well speed printing at the graphic screen. The print in Camel Forth will be more quickly in this case. I know that Sprinter Forth use Accelerator for printing.
Or new word for quick printing will be better way? And for other actions on the graphic screen too?
|
garrylancaster (stranger
)
2002/07/09 12:12
|
|
The ANS word for "starting a new page of output" is PAGE - this clears the current window on the Sprinter. To reinitialise all windows to the full screen (and clear them), there is also the word CINIT.
One of the next releases will include support for graphic modes; I haven't started this yet, but I will have a good look at the text print procedure soon.
Initialially I will probably only add support for text on the graphics screen (this will all be done with EMIT, so no changes needed to programs), but other words such as those in Z88 CamelForth will follow later.
--
Garry Lancaster
http://www.z88forever.org.uk/zxplus3e/
http://www.z88forever.org.uk/
|
Alex_Hot (stranger
)
2002/07/10 20:34
|
|
Thanks. I have found another possible:
12 EMIT
Is it a definition of PAGE in CamelForth?
|
Alex_Goryachev (Sprinter Team)
2002/07/10 20:48
|
|
Some information about multitasking for GForth was found in the distribut package. Look at the tasker.fs file for example.
May be possible to define Camel's words for its variant of multitasking...
---
PETERS PLUS LTD
|
garrylancaster (stranger
)
2002/07/11 15:30
|
|
Yes, the definition is just
: PAGE 12 EMIT ;
However, you should use PAGE in preference, since this is the ANS standard word.
--
Garry Lancaster
http://www.z88forever.org.uk/zxplus3e/
http://www.z88forever.org.uk/
|
garrylancaster (newbie)
2002/07/11 15:32
|
|
Is there any word in Gforth that would be useful? I think CamelForth has a full implementation of multitasking already.
--
Garry Lancaster
http://www.z88forever.org.uk/zxplus3e/
http://www.z88forever.org.uk/
|
Alex_Hot (stranger
)
2002/07/12 14:08
|
|
Ok. And can you post a difinition of CINIT if it was defined in Forth?
BTW this word not defines all windows as fullscreen windows. And that's right!
Edited by Alex_Hot on 2002/07/12 14:22.
|
Alex_Goryachev (Sprinter Team)
2002/07/12 14:35
|
|
Yes, you are right! But I told about usage of GForth for Sprinter programs creation, when Sprinter is not available.
---
PETERS PLUS LTD
|
garrylancaster (newbie)
2002/07/12 14:40
|
|
The definition is currently:
: CINIT
3 SETMODE 0 WINDOW 23 ATTRIB
0 0 80 32 OPENWINDOW
x y z CMOVE ;
x, y, and z are not available in CamelForth; they are the addresses of windows 0 & 1, and the size of 7 windows, so the CMOVE copies the definition of window 0 to windows 1-7.
--
Garry Lancaster
http://www.z88forever.org.uk/zxplus3e/
http://www.z88forever.org.uk/
|