Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #41950
| From | anton@mips.complang.tuwien.ac.at (Anton Ertl) |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: ? operator in Forth |
| Date | 2015-09-11 06:17 +0000 |
| Organization | Institut fuer Computersprachen, Technische Universitaet Wien |
| Message-ID | <2015Sep11.081749@mips.complang.tuwien.ac.at> (permalink) |
| References | <1f86d832-a0bd-4d35-9587-0b81afe11035@googlegroups.com> <4121ada4-218e-4d14-9527-3a3d9bee5185@googlegroups.com> <wIidnTibfrCKYGzInZ2dnUU7-VmdnZ2d@supernews.com> <op.x4r9kjczyfako5@localhost> |
"Rod Pemberton" <boo@fasdfrewar.cdm> writes:
>On Thu, 10 Sep 2015 17:58:44 -0400, Elizabeth D. Rather <erather@forth.com> wrote:
>
>> The second is better, but still depends on the assumption that you have
>> an ITC system and can comma down an xt and it will be executable. In
>> some systems, the compiler would generate a jsr at that point, for
>> example, even if you turn off the optimizer.
>
>For an ITC system, is there a way to simulate the *inability* to
>"comma down an xt" of non-ITC systems?
You could have a variable COMP-DP that remembers the position of HERE
after the last compiling word put something in the dictionary, and
each compiling word checks whether HERE is still at that position. If
not, there was a "," or ALLOT in between.
>What about other historical ITC behaviors people commonly expect?
create x ] a b c [
instead of
create x ' a , ' b , ' c '
Also, being able to read from the code and interpret it as xts.
Especially in combination with return-address manipulation.
>I.e., if I need my ITC system to be free from common assumptions
>about abilities of Forth words which are *not* standardized for
>ANS Forth, what words do I redefine and how?
I assume you mean that you want to make sure that *programs* don't
make such assumptions; otherwise I don't understand what you are
looking for.
One way to do it is to remember for each cell (or maybe byte) whether
it is code or data, have all storing words set that, and have all
loading words check that they load only data, and all execution check
that it executes only code. Lots of work, and it would consume
considerable memory and run-time.
An easier way is to run the program on a system that does not satisfy
the assumptions. After all, the point of such checks is to make the
program portable, so why not try out directly if it is portable?
- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: http://www.forth200x.org/forth200x.html
EuroForth 2015: http://www.rigwit.co.uk/EuroForth2015/
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
? operator in Forth Mark Wills <markwills1970@gmail.com> - 2015-09-10 13:55 -0700
Re: ? operator in Forth Mark Wills <markwills1970@gmail.com> - 2015-09-10 14:16 -0700
Re: ? operator in Forth "Elizabeth D. Rather" <erather@forth.com> - 2015-09-10 11:58 -1000
Re: ? operator in Forth "Rod Pemberton" <boo@fasdfrewar.cdm> - 2015-09-11 01:30 -0400
Re: ? operator in Forth anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-09-11 06:17 +0000
Re: ? operator in Forth julian.fondren@endurance.com - 2015-09-10 21:00 -0700
Re: ? operator in Forth hughaguilar96@gmail.com - 2015-09-10 21:20 -0700
Re: ? operator in Forth anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-09-11 05:16 +0000
Re: ? operator in Forth humptydumpty <ouatubi@gmail.com> - 2015-09-12 01:11 -0700
Re: ? operator in Forth hughaguilar96@gmail.com - 2015-09-12 17:14 -0700
Re: ? operator in Forth humptydumpty <ouatubi@gmail.com> - 2015-09-13 02:18 -0700
Re: ? operator in Forth hughaguilar96@gmail.com - 2015-09-10 15:21 -0700
Re: ? operator in Forth "Rod Pemberton" <boo@fasdfrewar.cdm> - 2015-09-11 01:35 -0400
Re: ? operator in Forth humptydumpty <ouatubi@gmail.com> - 2015-09-10 22:58 -0700
Re: ? operator in Forth Hans Bezemer <the.beez.speaks@gmail.com> - 2015-09-11 18:48 +0200
Re: ? operator in Forth anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-09-11 16:54 +0000
Re: ? operator in Forth hughaguilar96@gmail.com - 2015-09-11 21:32 -0700
Re: ? operator in Forth "WJ" <w_a_x_man@yahoo.com> - 2015-09-14 18:13 +0000
Re: ? operator in Forth "WJ" <w_a_x_man@yahoo.com> - 2015-09-14 18:32 +0000
Re: ? operator in Forth hughaguilar96@gmail.com - 2015-09-14 14:40 -0700
csiph-web