TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: TAUNO VOIPIO
from: GARETH`S DOWNSTAIRS COMPU
date: 2018-06-28 21:28:00
subject: Re: Forth

On 28/06/2018 21:18, Tauno Voipio wrote:
> On 28.6.18 20:46, Gareth's Downstairs Computer wrote:
>> On 28/06/2018 17:55, Pabst Blue Ribbon wrote:
>>> Gareth's Downstairs Computer
>>>  wrote:
>>>> On 28/06/2018 17:17, Pabst Blue Ribbon wrote:
>>>>> The Natural Philosopher  wrote:
>>>>>> On 27/06/18 21:00, Peter Percival wrote:
>>>>>>> Gareth's Downstairs Computer wrote:
>>>>>>>> On 27/06/2018 20:23, Peter Percival wrote:
>>>>>>>>> There seem to be a number of Forths that run on Raspberry Pi.
>>>>>>>>> Is it
>>>>>>>>> possible to say which one of them is best?
>>>>>>>>
>>>>>>>> The one that you write for yourself?
>>>>>>>>
>>>>>>>
>>>>>>> Would that I could!
>>>>>>>
>>>>>> An actual FORTH 'kernel' is very easy to write.
>>>>>
>>>>> I can be even more specific. On x86, 'kernel' is just 4 (four)
>>>>> processor
>>>>> instructions. The rest can be treated as 'library'.
>>>>
>>>> ISTR that on the PDP11, it was just a single instruction ...
>>>>
>>>> JMP @(r0)+
>>>
>>> I'm not familiar with PDP11. Four instructions I was referring to was
>>> complete NEXT statement from my simple Forth system. Single instruction
>>> versions that I've seen on Z80 were basically jumps to NEXT statement
>>> which
>>> was kind of outside of the rest of Forth (and which was still bigger
>>> than
>>> one instruction). I guess it all depends on which registers are used and
>>> which instructions available for the programmer.
>>>
>>
>> It is some years since dabbling with FORTH on X86, but ISTR using SI as
>> the pointer to the current brick, when the kernel code (actually
>> added to the end of each primitive operation becomes just 2
>> instructions ...
>>
>> LODSW
>> JMP AX
>>
>
> In the 80x86, there is a backside here: it ties the DS register
> to point to the code.
>

When using an interpreter, it is implied that the tokens are in the
data segment.

Not such a problem in the TINY model when CS, SS, DS, ES and FS
all point to the same 64K segment  :-)

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.