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.
--
-TV
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|