Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #37421
| From | "Rod Pemberton" <bork@lllljunkqwer.cpm> |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: What is the minimum Word set you could live with to have a (limping) Beginner's ANS Forth |
| Date | 2015-03-18 22:21 -0400 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <op.xvp3ihupwa0t4m@localhost> (permalink) |
| References | <09b0d52b-de4f-4805-9cc1-fc1cc0499ac3@googlegroups.com> <85lhiuioif.fsf@junk.nocrew.org> <op.xvptc4bjwa0t4m@localhost> <med394$e5d$1@dont-email.me> |
On Wed, 18 Mar 2015 19:56:06 -0400, Alex McDonald <blog@rivadpm.com> wrote:
> on 18/03/2015 22:42:31, "Rod Pemberton" wrote:
>> On Wed, 18 Mar 2015 06:33:12 -0400, Lars Brinkhoff
>> <lars.spam@nocrew.org> wrote:
>>> JUERGEN <epldfpga@aol.com> wrote:
>>>>> But for a project we would like to have a list of words that
>>>>> fit into 4 bits - so 16 words max to be used.
>>>>> Any good suggestions?
>>>
>>> My suggestion might be:
>>>
>>> Definitions: dodoes exit
>>> Control flow: 0branch
>>> Literals: (literal)
>>> Memory access: ! @ c! c@
>>> Aritmetic/logic: + nand
>>> Return stack: >r r>
>>>
>>> Of course, c! and c@ may be optional if you're content with cell-sized
>>> characters. I experimented with removing 0branch, (literal), >r, and
>>> r>, but the resulting system became orders of magnitude slower.
>>>
>>> Add to this some of DUP, SWAP, OVER, DROP, 0<, etc. Or maybe you need
>>> access to the stack pointers: SP@, SP!, RP@, RP!.
>>
>> As my other post indicates, it's going to be hard to live with only
>> 16 primitive (or low-level) words maximum.
>>
>> So, he might be interested in a shift-state. E.g., perhaps an
>> instruction could be used to shift between two sets of 16 words. That
>> would provide a total of 30 words, not including the shift word in
>> both states/sets.
>>
>
> Shifting state has its own problems. A word expects a certain state
> for the tokens it will execute.
Only when the primitives (low-level words) are executed does the state
need to be correct or correctly switched.
E.g., for a word in the first set you do nothing. For a word in the
second set, you could switch to the second state, execute a primitive
from the second set, switch back to the first. Each instruction in
the second set would be wrapped with the switch words. Let's say the
zero'th instruction is the switch word. To execute one instruction
from the first set (3rd) and one instruction from the second set (4th):
set1_3rd set1_0th(switch) set2_4th set2_0th(switch)
In pure Forth it would look something like the following if SWAP
is in set1 and >R is in set2:
SWAP SWITCH >R SWITCH
Since these are primitives, the SWITCH wrapper can be part of
the low-level code for each set2 instruction.
Obviously, you'd attempt to put less frequently used words in the
second set due to the overhead. The advantage here is there is no
need to decode instructions based on bits as your (snipped) example
would need. Zero is also easy to detect. Philip Koopman's or
Anton Ertl's instruction frequencies could be used to help decide
which set is which.
Rod Pemberton
--
Cars kill more people than guns in the U.S.
Yet, no one is trying to take away your car.
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
What is the minimum Word set you could live with to have a (limping) Beginner's ANS Forth JUERGEN <epldfpga@aol.com> - 2015-03-17 12:47 -0700
Re: What is the minimum Word set you could live with to have a (limping) Beginner's ANS Forth Bernd Paysan <bernd.paysan@gmx.de> - 2015-03-17 22:29 +0100
Re: What is the minimum Word set you could live with to have a (limping) Beginner's ANS Forth albert@spenarnc.xs4all.nl (Albert van der Horst) - 2015-03-18 10:59 +0000
Re: What is the minimum Word set you could live with to have a (limping) Beginner's ANS Forth Lars Brinkhoff <lars.spam@nocrew.org> - 2015-03-18 12:04 +0100
Re: What is the minimum Word set you could live with to have a (limping) Beginner's ANS Forth albert@spenarnc.xs4all.nl (Albert van der Horst) - 2015-03-18 11:19 +0000
Re: What is the minimum Word set you could live with to have a (limping) Beginner's ANS Forth Lars Brinkhoff <lars.spam@nocrew.org> - 2015-03-18 12:39 +0100
Re: What is the minimum Word set you could live with to have a (limping) Beginner's ANS Forth "Elizabeth D. Rather" <erather@forth.com> - 2015-03-18 08:05 -1000
Re: What is the minimum Word set you could live with to have a (limping) Beginner's ANS Forth albert@spenarnc.xs4all.nl (Albert van der Horst) - 2015-03-18 18:34 +0000
Re: What is the minimum Word set you could live with to have a (limping) Beginner's ANS Forth Lars Brinkhoff <lars.spam@nocrew.org> - 2015-03-18 20:05 +0100
Re: What is the minimum Word set you could live with to have a (limping) Beginner's ANS Forth "Rod Pemberton" <buzz@notnotnontnooatno.cmm> - 2015-03-17 19:11 -0400
Re: What is the minimum Word set you could live with to have a (limping) Beginner's ANS Forth "Rod Pemberton" <bork@lllljunkqwer.cpm> - 2015-03-19 00:28 -0400
Re: What is the minimum Word set you could live with to have a (limping) Beginner's ANS Forth rickman <gnuarm@gmail.com> - 2015-03-20 01:00 -0400
Re: What is the minimum Word set you could live with to have a (limping) Beginner's ANS Forth Lars Brinkhoff <lars.spam@nocrew.org> - 2015-03-18 11:33 +0100
Re: What is the minimum Word set you could live with to have a (limping) Beginner's ANS Forth Bernd Paysan <bernd.paysan@gmx.de> - 2015-03-18 22:15 +0100
Re: What is the minimum Word set you could live with to have a (limping) Beginner's ANS Forth Lars Brinkhoff <lars.spam@nocrew.org> - 2015-03-19 07:53 +0100
Re: What is the minimum Word set you could live with to have a (limping) Beginner's ANS Forth visualforth@rocketmail.com - 2015-03-19 17:17 -0700
Re: What is the minimum Word set you could live with to have a (limping) Beginner's ANS Forth rickman <gnuarm@gmail.com> - 2015-03-20 01:01 -0400
Re: What is the minimum Word set you could live with to have a (limping) Beginner's ANS Forth "Rod Pemberton" <bork@lllljunkqwer.cpm> - 2015-03-18 18:42 -0400
Re: What is the minimum Word set you could live with to have a (limping) Beginner's ANS Forth "Alex McDonald" <blog@rivadpm.com> - 2015-03-18 23:56 +0000
Re: What is the minimum Word set you could live with to have a (limping) Beginner's ANS Forth Bernd Paysan <bernd.paysan@gmx.de> - 2015-03-19 02:46 +0100
Re: What is the minimum Word set you could live with to have a (limping) Beginner's ANS Forth "Alex McDonald" <blog@rivadpm.com> - 2015-03-19 09:27 +0000
Re: What is the minimum Word set you could live with to have a (limping) Beginner's ANS Forth "Rod Pemberton" <bork@lllljunkqwer.cpm> - 2015-03-18 22:21 -0400
Re: What is the minimum Word set you could live with to have a (limping) Beginner's ANS Forth "Alex McDonald" <blog@rivadpm.com> - 2015-03-19 09:43 +0000
Re: What is the minimum Word set you could live with to have a (limping) Beginner's ANS Forth "Rod Pemberton" <bork@lllljunkqwer.cpm> - 2015-03-20 02:09 -0400
Re: What is the minimum Word set you could live with to have a (limping) Beginner's ANS Forth "Alex McDonald" <blog@rivadpm.com> - 2015-03-20 15:41 +0000
Re: What is the minimum Word set you could live with to have a (limping) Beginner's ANS Forth "Rod Pemberton" <bork@lllljunkqwer.cpm> - 2015-03-29 16:23 -0400
Re: What is the minimum Word set you could live with to have a (limping) Beginner's ANS Forth rickman <gnuarm@gmail.com> - 2015-03-29 16:43 -0400
Re: What is the minimum Word set you could live with to have a (limping) Beginner's ANS Forth "Alex McDonald" <blog@rivadpm.com> - 2015-03-29 22:53 +0100
Re: What is the minimum Word set you could live with to have a (limping) Beginner's ANS Forth Lars Brinkhoff <lars.spam@nocrew.org> - 2015-03-19 08:00 +0100
Re: What is the minimum Word set you could live with to have a (limping) Beginner's ANS Forth "Rod Pemberton" <bork@lllljunkqwer.cpm> - 2015-03-20 02:09 -0400
Re: What is the minimum Word set you could live with to have a (limping) Beginner's ANS Forth Lars Brinkhoff <lars.spam@nocrew.org> - 2015-03-20 14:43 +0100
...Tiny targets Matthias Koch <matthias.koch@hot.uni-hannover.de> - 2015-03-23 15:26 +0100
Re: ...Tiny targets Paul Rubin <no.email@nospam.invalid> - 2015-03-23 10:39 -0700
Re: ...Tiny targets JUERGEN <epldfpga@aol.com> - 2015-03-24 01:18 -0700
Re: ...Tiny targets Paul Rubin <no.email@nospam.invalid> - 2015-03-24 17:45 -0700
Re: ...Tiny targets JUERGEN <epldfpga@aol.com> - 2015-03-25 00:08 -0700
Re: ...Tiny targets Paul Rubin <no.email@nospam.invalid> - 2015-03-25 00:43 -0700
Re: ...Tiny targets Gary Bergstrom <forthprgrmr@gmail.com> - 2015-03-25 07:07 -0700
Re: ...Tiny targets Paul Rubin <no.email@nospam.invalid> - 2015-03-25 08:06 -0700
Re: ...Tiny targets rickman <gnuarm@gmail.com> - 2015-03-25 15:19 -0400
Re: ...Tiny targets Paul Rubin <no.email@nospam.invalid> - 2015-03-25 12:39 -0700
Re: ...Tiny targets Bernd Paysan <bernd.paysan@gmx.de> - 2015-03-25 20:42 +0100
Re: ...Tiny targets rickman <gnuarm@gmail.com> - 2015-03-25 16:41 -0400
Re: ...Tiny targets hughaguilar96@gmail.com - 2015-03-25 22:32 -0700
Re: ...Tiny targets "Alex McDonald" <blog@rivadpm.com> - 2015-03-26 09:35 +0000
Re: ...Tiny targets Ron Aaron <rambamist@gmail.com> - 2015-03-26 14:52 +0200
Re: ...Tiny targets rickman <gnuarm@gmail.com> - 2015-03-27 16:12 -0400
Re: ...Tiny targets albert@spenarnc.xs4all.nl (Albert van der Horst) - 2015-03-26 13:00 +0000
Re: ...Tiny targets anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-03-26 11:58 +0000
Re: ...Tiny targets JUERGEN <epldfpga@aol.com> - 2015-03-25 07:10 -0700
Re: ...Tiny targets JUERGEN <epldfpga@aol.com> - 2015-03-25 07:16 -0700
Re: ...Tiny targets Matthias Koch <matthias.koch@hot.uni-hannover.de> - 2015-03-27 13:01 +0100
Re: What is the minimum Word set you could live with to have a (limping) Beginner's ANS Forth Gary Bergstrom <forthprgrmr@gmail.com> - 2015-03-18 06:45 -0700
Re: What is the minimum Word set you could live with to have a (limping) Beginner's ANS Forth JUERGEN <epldfpga@aol.com> - 2015-03-18 08:57 -0700
Re: What is the minimum Word set you could live with to have a (limping) Beginner's ANS Forth Lars Brinkhoff <lars.spam@nocrew.org> - 2015-03-18 20:09 +0100
Re: What is the minimum Word set you could live with to have a (limping) Beginner's ANS Forth JUERGEN <epldfpga@aol.com> - 2015-03-18 08:59 -0700
Re: What is the minimum Word set you could live with to have a (limping) Beginner's ANS Forth hughaguilar96@gmail.com - 2015-03-20 21:47 -0700
Re: What is the minimum Word set you could live with to have a (limping) Beginner's ANS Forth JUERGEN <epldfpga@aol.com> - 2015-03-21 02:30 -0700
Re: What is the minimum Word set you could live with to have a (limping) Beginner's ANS Forth hughaguilar96@gmail.com - 2015-03-21 17:52 -0700
Re: What is the minimum Word set you could live with to have a (limping) Beginner's ANS Forth JUERGEN <epldfpga@aol.com> - 2015-03-22 01:27 -0700
Re: What is the minimum Word set you could live with to have a (limping) Beginner's ANS Forth hughaguilar96@gmail.com - 2015-03-22 13:15 -0700
Re: What is the minimum Word set you could live with to have a (limping) Beginner's ANS Forth hughaguilar96@gmail.com - 2015-03-22 13:47 -0700
Re: What is the minimum Word set you could live with to have a (limping) Beginner's ANS Forth rickman <gnuarm@gmail.com> - 2015-03-22 18:39 -0400
Re: What is the minimum Word set you could live with to have a (limping) Beginner's ANS Forth hughaguilar96@gmail.com - 2015-03-22 16:32 -0700
Re: What is the minimum Word set you could live with to have a(limping) Beginner's ANS Forth "WJ" <w_a_x_man@yahoo.com> - 2015-03-26 06:35 +0000
Re: What is the minimum Word set you could live with to have a(limping) Beginner's ANS Forth rickman <gnuarm@gmail.com> - 2015-03-27 15:55 -0400
Re: What is the minimum Word set you could live with to have a(limping) Beginner's ANS Forth "Rod Pemberton" <bork@lllljunkqwer.cpm> - 2015-03-28 03:36 -0400
Re: What is the minimum Word set you could live with to have a(limping) Beginner's ANS Forth "WJ" <w_a_x_man@yahoo.com> - 2015-03-26 06:34 +0000
csiph-web