Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #42410 > unrolled thread

Boring for most of you, but I'm having fun ... :)

Started byChris Curl <ccurl609@gmail.com>
First post2015-10-06 21:44 -0700
Last post2016-01-02 02:25 -0800
Articles 20 on this page of 142 — 22 participants

Back to article view | Back to comp.lang.forth


Contents

  Boring for most of you, but I'm having fun ... :) Chris Curl <ccurl609@gmail.com> - 2015-10-06 21:44 -0700
    Re: Boring for most of you, but I'm having fun ... :) Lars Brinkhoff <lars.spam@nocrew.org> - 2015-10-07 08:24 +0200
    Re: Boring for most of you, but I'm having fun ... :) Mark Wills <markwills1970@gmail.com> - 2015-10-07 00:48 -0700
      Re: Boring for most of you, but I'm having fun ... :) Chris Curl <ccurl609@gmail.com> - 2015-10-07 05:41 -0700
    Re: Boring for most of you, but I'm having fun ... :) Jason Damisch <jasondamisch@yahoo.com> - 2015-10-07 12:05 -0700
    Re: Boring for most of you, but I'm having fun ... :) Chris Curl <ccurl609@gmail.com> - 2015-12-27 18:04 -0800
      Re: Boring for most of you, but I'm having fun ... :) Paul Rubin <no.email@nospam.invalid> - 2015-12-27 18:12 -0800
        Re: Boring for most of you, but I'm having fun ... :) Coos Haak <chforth@hccnet.nl> - 2015-12-28 13:33 +0100
    Re: Boring for most of you, but I'm having fun ... :) humptydumpty <ouatubi@gmail.com> - 2015-12-28 00:54 -0800
    Re: Boring for most of you, but I'm having fun ... :) Chris Curl <ccurl609@gmail.com> - 2015-12-28 12:32 -0800
      Re: Boring for most of you, but I'm having fun ... :) Paul Rubin <no.email@nospam.invalid> - 2015-12-28 12:43 -0800
        Re: Boring for most of you, but I'm having fun ... :) Coos Haak <chforth@hccnet.nl> - 2015-12-28 22:13 +0100
          Re: Boring for most of you, but I'm having fun ... :) Paul Rubin <no.email@nospam.invalid> - 2015-12-28 13:21 -0800
            Re: Boring for most of you, but I'm having fun ... :) Coos Haak <chforth@hccnet.nl> - 2015-12-28 23:47 +0100
        Re: Boring for most of you, but I'm having fun ... :) Chris Curl <ccurl609@gmail.com> - 2015-12-28 13:13 -0800
          Re: Boring for most of you, but I'm having fun ... :) Coos Haak <chforth@hccnet.nl> - 2015-12-28 23:50 +0100
            Re: Boring for most of you, but I'm having fun ... :) Chris Curl <ccurl609@gmail.com> - 2015-12-28 15:33 -0800
              Re: Boring for most of you, but I'm having fun ... :) "Elizabeth D. Rather" <erather@forth.com> - 2015-12-28 15:37 -1000
                Re: Boring for most of you, but I'm having fun ... :) Chris Curl <ccurl609@gmail.com> - 2015-12-28 22:18 -0800
                  Re: Boring for most of you, but I'm having fun ... :) Paul Rubin <no.email@nospam.invalid> - 2015-12-28 22:31 -0800
                    Re: Boring for most of you, but I'm having fun ... :) Chris Curl <ccurl609@gmail.com> - 2015-12-28 23:30 -0800
                      Re: Boring for most of you, but I'm having fun ... :) Raimond Dragomir <raimond.dragomir@gmail.com> - 2015-12-29 02:47 -0800
                        Re: Boring for most of you, but I'm having fun ... :) Chris Curl <ccurl609@gmail.com> - 2015-12-29 08:19 -0800
                          Re: Boring for most of you, but I'm having fun ... :) Raimond Dragomir <raimond.dragomir@gmail.com> - 2015-12-29 08:26 -0800
                            Re: Boring for most of you, but I'm having fun ... :) Chris Curl <ccurl609@gmail.com> - 2015-12-29 09:34 -0800
                              Re: Boring for most of you, but I'm having fun ... :) Raimond Dragomir <raimond.dragomir@gmail.com> - 2015-12-29 10:22 -0800
                        Re: Boring for most of you, but I'm having fun ... :) Albert van der Horst <albert@spenarnc.xs4all.nl> - 2015-12-30 12:15 +0000
                          Re: Boring for most of you, but I'm having fun ... :) Chris Curl <ccurl609@gmail.com> - 2015-12-30 08:26 -0800
                            Re: Boring for most of you, but I'm having fun ... :) Albert van der Horst <albert@spenarnc.xs4all.nl> - 2015-12-31 16:10 +0000
                          Re: Boring for most of you, but I'm having fun ... :) Raimond Dragomir <raimond.dragomir@gmail.com> - 2015-12-30 08:35 -0800
                            Re: Boring for most of you, but I'm having fun ... :) Raimond Dragomir <raimond.dragomir@gmail.com> - 2015-12-30 08:51 -0800
                              Re: Boring for most of you, but I'm having fun ... :) Paul Rubin <no.email@nospam.invalid> - 2015-12-30 12:21 -0800
                                Re: Boring for most of you, but I'm having fun ... :) "Elizabeth D. Rather" <erather@forth.com> - 2015-12-30 10:46 -1000
                                  Re: Boring for most of you, but I'm having fun ... :) Paul Rubin <no.email@nospam.invalid> - 2015-12-30 13:15 -0800
                                    Re: Boring for most of you, but I'm having fun ... :) "Elizabeth D. Rather" <erather@forth.com> - 2015-12-30 13:11 -1000
                                      Re: Boring for most of you, but I'm having fun ... :) Paul Rubin <no.email@nospam.invalid> - 2015-12-30 15:35 -0800
                                        Re: Boring for most of you, but I'm having fun ... :) "Elizabeth D. Rather" <erather@forth.com> - 2015-12-30 15:00 -1000
                                        Re: Boring for most of you, but I'm having fun ... :) Raimond Dragomir <raimond.dragomir@gmail.com> - 2015-12-31 00:13 -0800
                                        Re: Boring for most of you, but I'm having fun ... :) Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2015-12-31 10:09 +0000
                                          Re: Boring for most of you, but I'm having fun ... :) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-12-31 13:46 +0000
                                        Re: Boring for most of you, but I'm having fun ... :) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-12-31 13:56 +0000
                                          Re: Boring for most of you, but I'm having fun ... :) Albert van der Horst <albert@spenarnc.xs4all.nl> - 2015-12-31 17:24 +0000
                                            Re: Boring for most of you, but I'm having fun ... :) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-01-01 14:23 +0000
                                              Re: Boring for most of you, but I'm having fun ... :) Albert van der Horst <albert@spenarnc.xs4all.nl> - 2016-01-01 20:24 +0000
                                                Re: Boring for most of you, but I'm having fun ... :) Bernd Paysan <bernd.paysan@gmx.de> - 2016-01-01 22:38 +0100
                                                  Re: Boring for most of you, but I'm having fun ... :) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-01-02 13:24 +0000
                                                    Re: Boring for most of you, but I'm having fun ... :) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-01-02 15:32 +0000
                                                    Re: Boring for most of you, but I'm having fun ... :) Albert van der Horst <albert@spenarnc.xs4all.nl> - 2016-01-02 16:41 +0000
                                                      Re: Boring for most of you, but I'm having fun ... :) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-01-03 14:43 +0000
                                                Re: Boring for most of you, but I'm having fun ... :) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-01-02 13:13 +0000
                                        Re: Boring for most of you, but I'm having fun ... :) Albert van der Horst <albert@spenarnc.xs4all.nl> - 2015-12-31 16:57 +0000
                                      Re: Boring for most of you, but I'm having fun ... :) Albert van der Horst <albert@spenarnc.xs4all.nl> - 2015-12-31 16:41 +0000
                                    Re: Boring for most of you, but I'm having fun ... :) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-12-31 14:13 +0000
                                      Re: Boring for most of you, but I'm having fun ... :) Bernd Paysan <bernd.paysan@gmx.de> - 2015-12-31 22:27 +0100
                                        Re: Boring for most of you, but I'm having fun ... :) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-01-01 13:38 +0000
                                          Re: Boring for most of you, but I'm having fun ... :) Bernd Paysan <bernd.paysan@gmx.de> - 2016-01-01 18:46 +0100
                                            Re: Boring for most of you, but I'm having fun ... :) "Elizabeth D. Rather" <erather@forth.com> - 2016-01-01 09:01 -1000
                                              Re: Boring for most of you, but I'm having fun ... :) Bernd Paysan <bernd.paysan@gmx.de> - 2016-01-01 22:35 +0100
                                          Re: Boring for most of you, but I'm having fun ... :) "Elizabeth D. Rather" <erather@forth.com> - 2016-01-01 08:39 -1000
                                            Re: Boring for most of you, but I'm having fun ... :) Bernd Paysan <bernd.paysan@gmx.de> - 2016-01-01 21:01 +0100
                                          Re: Boring for most of you, but I'm having fun ... :) Albert van der Horst <albert@spenarnc.xs4all.nl> - 2016-01-01 20:18 +0000
                                Re: Boring for most of you, but I'm having fun ... :) Bernd Paysan <bernd.paysan@gmx.de> - 2015-12-31 22:19 +0100
                                  Re: Boring for most of you, but I'm having fun ... :) Paul Rubin <no.email@nospam.invalid> - 2016-01-01 21:43 -0800
                                    Re: Boring for most of you, but I'm having fun ... :) Raimond Dragomir <raimond.dragomir@gmail.com> - 2016-01-01 23:36 -0800
                                    Re: Boring for most of you, but I'm having fun ... :) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-01-02 15:36 +0000
                                      Re: Boring for most of you, but I'm having fun ... :) Paul Rubin <no.email@nospam.invalid> - 2016-01-02 12:18 -0800
                                        Re: Boring for most of you, but I'm having fun ... :) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-01-03 14:34 +0000
                                      Re: Boring for most of you, but I'm having fun ... :) hughaguilar96@gmail.com - 2016-01-03 19:57 -0800
                                        Re: Boring for most of you, but I'm having fun ... :) Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2016-01-04 22:49 +0000
                                          Re: Boring for most of you, but I'm having fun ... :) Julian Fondren <julian.fondren@gmail.com> - 2016-01-04 15:05 -0800
                                            Re: Boring for most of you, but I'm having fun ... :) hughaguilar96@gmail.com - 2016-01-04 20:36 -0800
                                          Re: Boring for most of you, but I'm having fun ... :) hughaguilar96@gmail.com - 2016-01-05 13:03 -0800
                                            Re: Boring for most of you, but I'm having fun ... :) Chris Curl <ccurl609@gmail.com> - 2016-01-05 14:30 -0800
                                              Re: Boring for most of you, but I'm having fun ... :) hughaguilar96@gmail.com - 2016-01-05 21:10 -0800
                                                Re: Boring for most of you, but I'm having fun ... :) hughaguilar96@gmail.com - 2016-01-05 21:26 -0800
                                                Re: Boring for most of you, but I'm having fun ... :) Chris Curl <ccurl609@gmail.com> - 2016-01-06 05:01 -0800
                                            Re: Boring for most of you, but I'm having fun ... :) "WJ" <w_a_x_man@yahoo.com> - 2016-01-06 00:13 +0000
                                            Re: Boring for most of you, but I'm having fun ... :) Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2016-01-06 19:47 +0000
                                              Re: Boring for most of you, but I'm having fun ... :) hughaguilar96@gmail.com - 2016-01-07 21:43 -0800
                                                Re: Boring for most of you, but I'm having fun ... :) Chris Curl <ccurl609@gmail.com> - 2016-01-08 05:54 -0800
                                                  Re: Boring for most of you, but I'm having fun ... :) Albert van der Horst <albert@spenarnc.xs4all.nl> - 2016-01-08 16:44 +0000
                                                  Re: Boring for most of you, but I'm having fun ... :) hughaguilar96@gmail.com - 2016-01-08 16:27 -0800
                                                Re: Boring for most of you, but I'm having fun ... :) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-01-08 17:18 +0000
                                                Re: Boring for most of you, but I'm having fun ... :) Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2016-01-08 17:00 +0000
                                              Re: Boring for most of you, but I'm having fun ... :) Andrew Haley <andrew29@littlepinkcloud.invalid> - 2016-01-08 04:52 -0600
                                                Re: Boring for most of you, but I'm having fun ... :) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-01-08 11:27 +0000
                                                  Re: Boring for most of you, but I'm having fun ... :) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-01-08 16:44 +0000
                                                    Re: Boring for most of you, but I'm having fun ... :) Bernd Paysan <bernd.paysan@gmx.de> - 2016-01-08 21:17 +0100
                                                  Re: Boring for most of you, but I'm having fun ... :) Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2016-01-08 16:57 +0000
                                                    Re: Boring for most of you, but I'm having fun ... :) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-01-08 17:06 +0000
                                                      Re: Boring for most of you, but I'm having fun ... :) Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2016-01-08 20:24 +0000
                                                        Re: Boring for most of you, but I'm having fun ... :) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-01-09 17:05 +0000
                                                    Re: Boring for most of you, but I'm having fun ... :) stephen@mpeforth.com (Stephen Pelc) - 2016-01-08 20:02 +0000
                                                      Re: Boring for most of you, but I'm having fun ... :) Bernd Paysan <bernd.paysan@gmx.de> - 2016-01-08 21:49 +0100
                                                    Re: Boring for most of you, but I'm having fun ... :) hughaguilar96@gmail.com - 2016-01-09 22:06 -0800
                                                  Re: Boring for most of you, but I'm having fun ... :) Andrew Haley <andrew29@littlepinkcloud.invalid> - 2016-01-10 07:46 -0600
                                                    Re: Boring for most of you, but I'm having fun ... :) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-01-10 14:35 +0000
                                                      Re: Boring for most of you, but I'm having fun ... :) hughaguilar96@gmail.com - 2016-01-10 11:55 -0800
                                                        Re: Boring for most of you, but I'm having fun ... :) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-01-12 13:26 +0000
                                                          Re: Boring for most of you, but I'm having fun ... :) peter.m.falth@gmail.com - 2016-01-12 15:10 -0800
                                                            Re: Boring for most of you, but I'm having fun ... :) "Elizabeth D. Rather" <erather@forth.com> - 2016-01-12 13:23 -1000
                                                              Re: Boring for most of you, but I'm having fun ... :) hughaguilar96@gmail.com - 2016-01-12 20:42 -0800
                                                                Re: Boring for most of you, but I'm having fun ... :) hughaguilar96@gmail.com - 2016-01-12 21:08 -0800
                                                            Re: Boring for most of you, but I'm having fun ... :) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-01-13 15:17 +0000
                                                              Re: Boring for most of you, but I'm having fun ... :) peter.m.falth@gmail.com - 2016-01-13 13:26 -0800
                                  Re: Boring for most of you, but I'm having fun ... :) hughaguilar96@gmail.com - 2016-01-04 14:19 -0800
                                    Re: Boring for most of you, but I'm having fun ... :) "WJ" <w_a_x_man@yahoo.com> - 2016-01-05 07:24 +0000
                              Re: Boring for most of you, but I'm having fun ... :) Albert van der Horst <albert@spenarnc.xs4all.nl> - 2015-12-31 16:24 +0000
                      Re: Boring for most of you, but I'm having fun ... :) "Elizabeth D. Rather" <erather@forth.com> - 2015-12-29 12:31 -1000
                        Re: Boring for most of you, but I'm having fun ... :) Paul Rubin <no.email@nospam.invalid> - 2015-12-29 14:52 -0800
                          Re: Boring for most of you, but I'm having fun ... :) Coos Haak <chforth@hccnet.nl> - 2015-12-30 02:11 +0100
                            Re: Boring for most of you, but I'm having fun ... :) "Elizabeth D. Rather" <erather@forth.com> - 2015-12-29 23:46 -1000
                              Re: Boring for most of you, but I'm having fun ... :) "HAA" <someone@microsoft.com> - 2015-12-30 21:25 +1100
                                Re: Boring for most of you, but I'm having fun ... :) "Elizabeth D. Rather" <erather@forth.com> - 2015-12-30 09:17 -1000
                                  Re: Boring for most of you, but I'm having fun ... :) "HAA" <someone@microsoft.com> - 2015-12-31 12:55 +1100
                                    Re: Boring for most of you, but I'm having fun ... :) "Elizabeth D. Rather" <erather@forth.com> - 2015-12-30 16:26 -1000
                                      Re: Boring for most of you, but I'm having fun ... :) "HAA" <someone@microsoft.com> - 2016-01-02 12:30 +1100
                                        Re: Boring for most of you, but I'm having fun ... :) "Elizabeth D. Rather" <erather@forth.com> - 2016-01-01 16:31 -1000
                                        Re: Boring for most of you, but I'm having fun ... :) Chris Curl <ccurl609@gmail.com> - 2016-01-01 21:31 -0800
                                        Re: Boring for most of you, but I'm having fun ... :) stephen@mpeforth.com (Stephen Pelc) - 2016-01-02 12:04 +0000
                                  Re: Boring for most of you, but I'm having fun ... :) stephen@mpeforth.com (Stephen Pelc) - 2015-12-31 12:04 +0000
                                    Re: Boring for most of you, but I'm having fun ... :) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-12-31 13:31 +0000
                                      Re: Boring for most of you, but I'm having fun ... :) "Elizabeth D. Rather" <erather@forth.com> - 2015-12-31 08:50 -1000
                                        Re: Boring for most of you, but I'm having fun ... :) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-01-01 14:13 +0000
                                  Re: Boring for most of you, but I'm having fun ... :) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-12-31 14:34 +0000
                                    Re: Boring for most of you, but I'm having fun ... :) Bernd Paysan <bernd.paysan@gmx.de> - 2015-12-31 22:39 +0100
                                      Re: Boring for most of you, but I'm having fun ... :) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-01-01 10:05 +0000
                                        Re: Boring for most of you, but I'm having fun ... :) Bernd Paysan <bernd.paysan@gmx.de> - 2016-01-01 18:16 +0100
                                          Re: Boring for most of you, but I'm having fun ... :) Jan Coombs <jenfhaomndgfwutc@murmic.plus.com> - 2016-01-01 17:49 +0000
                                            Re: Boring for most of you, but I'm having fun ... :) Bernd Paysan <bernd.paysan@gmx.de> - 2016-01-01 19:23 +0100
                                      Re: Boring for most of you, but I'm having fun ... :) Paul Rubin <no.email@nospam.invalid> - 2016-01-01 15:53 -0800
                                        Re: Boring for most of you, but I'm having fun ... :) Bernd Paysan <bernd.paysan@gmx.de> - 2016-01-02 14:20 +0100
                                          Re: Boring for most of you, but I'm having fun ... :) Albert van der Horst <albert@spenarnc.xs4all.nl> - 2016-01-02 16:34 +0000
                                          Re: Boring for most of you, but I'm having fun ... :) Mikael Nordman <oh2aun@gmail.com> - 2016-01-02 14:08 -0800
                                Re: Boring for most of you, but I'm having fun ... :) hughaguilar96@gmail.com - 2015-12-30 20:40 -0800
                              Re: Boring for most of you, but I'm having fun ... :) Chris Curl <ccurl609@gmail.com> - 2015-12-30 08:28 -0800
                          Re: Boring for most of you, but I'm having fun ... :) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-12-30 11:11 +0000
            Re: Boring for most of you, but I'm having fun ... :) Chris Curl <ccurl609@gmail.com> - 2015-12-28 15:40 -0800
              Re: Boring for most of you, but I'm having fun ... :) "HAA" <someone@microsoft.com> - 2015-12-30 10:14 +1100
            Re: Boring for most of you, but I'm having fun ... :) "Elizabeth D. Rather" <erather@forth.com> - 2015-12-28 15:35 -1000
              Re: Boring for most of you, but I'm having fun ... :) hughaguilar96@gmail.com - 2015-12-30 20:58 -0800
    Re: Boring for most of you, but I'm having fun ... :) Julian Fondren <julian.fondren@gmail.com> - 2016-01-02 02:25 -0800

Page 1 of 8  [1] 2 3 4 5 6 7 8  Next page →


#42410 — Boring for most of you, but I'm having fun ... :)

FromChris Curl <ccurl609@gmail.com>
Date2015-10-06 21:44 -0700
SubjectBoring for most of you, but I'm having fun ... :)
Message-ID<5387d185-d7d1-47f1-ac16-824ec3f8896d@googlegroups.com>
\ Simple temporary variables.
\ Sure, these could have more error checking.
\ If I need it, I can add some later.
\ This is all I need for now ... :)

: .inc. ( addr -- ) dup @ 1+ swap ! ;
: .dec. ( addr -- ) dup @ 1- swap ! ;

variable tmp.sp 32 allot
: 0tmp.sp 0 tmp.sp ! ;
: tmp@ tmp.sp @ if tmp.sp dup @ + @ then ;
: !tmp tmp.sp @ if tmp.sp dup @ + ! then ;
: >tmp tmp.sp @ 31 < if tmp.sp .inc. !tmp then ;
: tmp> tmp.sp @      if tmp@ tmp.sp .dec. then ;
: tmp.swap tmp> tmp> swap >tmp >tmp ;
: tmp.drop tmp> drop ;

[toc] | [next] | [standalone]


#42415

FromLars Brinkhoff <lars.spam@nocrew.org>
Date2015-10-07 08:24 +0200
Message-ID<86bncbjivd.fsf@vps34351.public.cloudvps.com>
In reply to#42410
Chris Curl <ccurl609@gmail.com> writes:
> : .inc. ( addr -- ) dup @ 1+ swap ! ;
> : .dec. ( addr -- ) dup @ 1- swap ! ;

Maybe:

: .inc. ( addr -- ) 1 swap +! ;
: .dec. ( addr -- ) -1 swap +! ;

[toc] | [prev] | [next] | [standalone]


#42418

FromMark Wills <markwills1970@gmail.com>
Date2015-10-07 00:48 -0700
Message-ID<1680d5b8-e77e-4721-812d-396807aa31b5@googlegroups.com>
In reply to#42410
On Wednesday, 7 October 2015 05:44:03 UTC+1, Chris Curl  wrote:
> \ Simple temporary variables.
> \ Sure, these could have more error checking.
> \ If I need it, I can add some later.
> \ This is all I need for now ... :)
> 
> : .inc. ( addr -- ) dup @ 1+ swap ! ;
> : .dec. ( addr -- ) dup @ 1- swap ! ;
> 
> variable tmp.sp 32 allot
> : 0tmp.sp 0 tmp.sp ! ;
> : tmp@ tmp.sp @ if tmp.sp dup @ + @ then ;
> : !tmp tmp.sp @ if tmp.sp dup @ + ! then ;
> : >tmp tmp.sp @ 31 < if tmp.sp .inc. !tmp then ;
> : tmp> tmp.sp @      if tmp@ tmp.sp .dec. then ;
> : tmp.swap tmp> tmp> swap >tmp >tmp ;
> : tmp.drop tmp> drop ;

Have a look at the word +!

:-)

[toc] | [prev] | [next] | [standalone]


#42421

FromChris Curl <ccurl609@gmail.com>
Date2015-10-07 05:41 -0700
Message-ID<a5e5ac22-fcfe-45af-ad99-d1db10ac5d18@googlegroups.com>
In reply to#42418
On Wednesday, October 7, 2015 at 3:48:58 AM UTC-4, Mark Wills wrote:
> On Wednesday, 7 October 2015 05:44:03 UTC+1, Chris Curl  wrote:
> > \ Simple temporary variables.
> > \ Sure, these could have more error checking.
> > \ If I need it, I can add some later.
> > \ This is all I need for now ... :)
> > 
> > : .inc. ( addr -- ) dup @ 1+ swap ! ;
> > : .dec. ( addr -- ) dup @ 1- swap ! ;
> > 
> > variable tmp.sp 32 allot
> > : 0tmp.sp 0 tmp.sp ! ;
> > : tmp@ tmp.sp @ if tmp.sp dup @ + @ then ;
> > : !tmp tmp.sp @ if tmp.sp dup @ + ! then ;
> > : >tmp tmp.sp @ 31 < if tmp.sp .inc. !tmp then ;
> > : tmp> tmp.sp @      if tmp@ tmp.sp .dec. then ;
> > : tmp.swap tmp> tmp> swap >tmp >tmp ;
> > : tmp.drop tmp> drop ;
> 
> Have a look at the word +!
> 
> :-)

will do, thanks

[toc] | [prev] | [next] | [standalone]


#42428

FromJason Damisch <jasondamisch@yahoo.com>
Date2015-10-07 12:05 -0700
Message-ID<79be1734-08cc-437e-9d4c-ad8d4c9862e6@googlegroups.com>
In reply to#42410
On Tuesday, October 6, 2015 at 9:44:03 PM UTC-7, Chris Curl wrote:

Something could probably be done with PICK ROLL and the WIDs

[toc] | [prev] | [next] | [standalone]


#44382

FromChris Curl <ccurl609@gmail.com>
Date2015-12-27 18:04 -0800
Message-ID<452ce325-08b4-460c-8b5f-87173ce47da1@googlegroups.com>
In reply to#42410
New implementation:

: .inc4. ( addr -- ) DUP @ 4 + SWAP ! ;
: .dec4. ( addr -- ) DUP @ 4 - SWAP ! ;

variable tStack 1024 allot 
: tStack.Reset tStack dup ! ;
: T@ ( -- n ) tStack @ @ ;
: T! ( n -- ) tStack @ ! ;
: >T ( n -- ) tStack .inc4. T! ;
: T> ( -- n ) T@ tStack .dec4. ;
: tDEPTH ( -- n ) tStack DUP @ SWAP - 2/ 2/ ;
tStack.Reset

[toc] | [prev] | [next] | [standalone]


#44384

FromPaul Rubin <no.email@nospam.invalid>
Date2015-12-27 18:12 -0800
Message-ID<8760zjfhj2.fsf@nightsong.com>
In reply to#44382
Chris Curl <ccurl609@gmail.com> writes:
> : .inc4. ( addr -- ) DUP @ 4 + SWAP ! ;
> : .dec4. ( addr -- ) DUP @ 4 - SWAP ! ;

: .inc4. ( addr -- ) 4 +! ;
: .dec4. ( addr -- ) -4 +! ;


> variable tStack 1024 allot 

: newstack ( "name" size -- ) CREATE allot
  DOES>  .... TBD.

[toc] | [prev] | [next] | [standalone]


#44390

FromCoos Haak <chforth@hccnet.nl>
Date2015-12-28 13:33 +0100
Message-ID<1mc9vu4l5slyu$.kkql7usrk2w0.dlg@40tude.net>
In reply to#44384
Op Sun, 27 Dec 2015 18:12:17 -0800 schreef Paul Rubin:

> Chris Curl <ccurl609@gmail.com> writes:
>>: .inc4. ( addr -- ) DUP @ 4 + SWAP ! ;
>>: .dec4. ( addr -- ) DUP @ 4 - SWAP ! ;
> 
>: .inc4. ( addr -- ) 4 +! ;
>: .dec4. ( addr -- ) -4 +! ;

Wrong, first use cells, so any one can use this.
Second, the order is wrong.
: .inc4. ( addr -- ) 1 cells swap +! ;

groet Coos

[toc] | [prev] | [next] | [standalone]


#44389

Fromhumptydumpty <ouatubi@gmail.com>
Date2015-12-28 00:54 -0800
Message-ID<6aa6bd17-bf4d-42b1-9dea-22a40fdd5271@googlegroups.com>
In reply to#42410
On Wednesday, October 7, 2015 at 4:44:03 AM UTC, Chris Curl wrote:
> \ Simple temporary variables.
> \ Sure, these could have more error checking.
> \ If I need it, I can add some later.
> \ This is all I need for now ... :)
> 
> : .inc. ( addr -- ) dup @ 1+ swap ! ;
> : .dec. ( addr -- ) dup @ 1- swap ! ;
> 
> variable tmp.sp 32 allot
> : 0tmp.sp 0 tmp.sp ! ;
> : tmp@ tmp.sp @ if tmp.sp dup @ + @ then ;
> : !tmp tmp.sp @ if tmp.sp dup @ + ! then ;
> : >tmp tmp.sp @ 31 < if tmp.sp .inc. !tmp then ;
> : tmp> tmp.sp @      if tmp@ tmp.sp .dec. then ;
> : tmp.swap tmp> tmp> swap >tmp >tmp ;
> : tmp.drop tmp> drop ;

Hi!

A possibility:

: first dup ;  ok
: second over ;  ok
: third 2 pick ;  ok
: fourth 3 pick ;  ok
: 3dup third third third ;  ok
: 4dup 2over 2over ;  ok

Have a nice day,
humptydumpty

[toc] | [prev] | [next] | [standalone]


#44391

FromChris Curl <ccurl609@gmail.com>
Date2015-12-28 12:32 -0800
Message-ID<cea9ce08-2c24-40bf-a538-e3d366074c4d@googlegroups.com>
In reply to#42410
: +CELL! ( addr -- ) CELL SWAP +! ; 
: -CELL! ( addr -- ) CELL SWAP -! ;

variable tStack 64 CELLS ALLOT
: tStack.Reset tStack dup ! ;
: T@ ( -- n ) tStack @ @ ;
: T! ( n -- ) tStack @ ! ;
: >T ( n -- ) tStack +CELL! T! ;
: T> ( -- n ) T@ tStack -CELL! ;
: tDEPTH ( -- n ) tStack DUP @ SWAP - 2/ 2/ ;
tStack.Reset

[toc] | [prev] | [next] | [standalone]


#44392

FromPaul Rubin <no.email@nospam.invalid>
Date2015-12-28 12:43 -0800
Message-ID<87wprye23s.fsf@nightsong.com>
In reply to#44391
Chris Curl <ccurl609@gmail.com> writes:
> : -CELL! ( addr -- ) CELL SWAP -! ;

\ -! doesn't appear to be a standard word
: -CELL! ( addr -- ) CELL NEGATE SWAP +! ;

[toc] | [prev] | [next] | [standalone]


#44393

FromCoos Haak <chforth@hccnet.nl>
Date2015-12-28 22:13 +0100
Message-ID<1o3dk7tu85xy4$.348b0v7sjgf8$.dlg@40tude.net>
In reply to#44392
Op Mon, 28 Dec 2015 12:43:03 -0800 schreef Paul Rubin:

> Chris Curl <ccurl609@gmail.com> writes:
>>: -CELL! ( addr -- ) CELL SWAP -! ;
> 
> \ -! doesn't appear to be a standard word
>: -CELL! ( addr -- ) CELL NEGATE SWAP +! ;

Even CELL isn't a standard word ;-(

groet Coos

[toc] | [prev] | [next] | [standalone]


#44395

FromPaul Rubin <no.email@nospam.invalid>
Date2015-12-28 13:21 -0800
Message-ID<87mvsue0cb.fsf@nightsong.com>
In reply to#44393
Coos Haak <chforth@hccnet.nl> writes:
>> \ -! doesn't appear to be a standard word
>>: -CELL! ( addr -- ) CELL NEGATE SWAP +! ;
> Even CELL isn't a standard word ;-(

: +CELL ( addr -- ) DUP @ CELL+ ! ;
: -CELL ( addr -- ) -1 CELLS SWAP +! ;

[toc] | [prev] | [next] | [standalone]


#44396

FromCoos Haak <chforth@hccnet.nl>
Date2015-12-28 23:47 +0100
Message-ID<1qow7llspvkwx$.15svu75rah68m.dlg@40tude.net>
In reply to#44395
Op Mon, 28 Dec 2015 13:21:08 -0800 schreef Paul Rubin:

> Coos Haak <chforth@hccnet.nl> writes:
>>> \ -! doesn't appear to be a standard word
>>>: -CELL! ( addr -- ) CELL NEGATE SWAP +! ;
>> Even CELL isn't a standard word ;-(
> 
>: +CELL ( addr -- ) DUP @ CELL+ ! ;
Try again:
: +CELL ( addr -- ) DUP @ CELL+ SWAP ! ;

>: -CELL ( addr -- ) -1 CELLS SWAP +! ;
Correct.

groet Coos

[toc] | [prev] | [next] | [standalone]


#44394

FromChris Curl <ccurl609@gmail.com>
Date2015-12-28 13:13 -0800
Message-ID<674240d6-b4c9-44de-80a3-908757ccbae0@googlegroups.com>
In reply to#44392
On Monday, December 28, 2015 at 3:43:05 PM UTC-5, Paul Rubin wrote:
> Chris Curl <cc...@gmail.com> writes:
> > : -CELL! ( addr -- ) CELL SWAP -! ;
> 
> \ -! doesn't appear to be a standard word
> : -CELL! ( addr -- ) CELL NEGATE SWAP +! ;

I added it to my dictionary ...

: -! ( n addr -- ) tuck @ swap - swap ! ;
... or ...
: -! ( n addr -- ) swap negate swap +! ;

[toc] | [prev] | [next] | [standalone]


#44397

FromCoos Haak <chforth@hccnet.nl>
Date2015-12-28 23:50 +0100
Message-ID<1sw352f61p5dj$.vugw736emrk5$.dlg@40tude.net>
In reply to#44394
Op Mon, 28 Dec 2015 13:13:31 -0800 (PST) schreef Chris Curl:

> On Monday, December 28, 2015 at 3:43:05 PM UTC-5, Paul Rubin wrote:
>> Chris Curl <cc...@gmail.com> writes:
>>> : -CELL! ( addr -- ) CELL SWAP -! ;
>> 
>> \ -! doesn't appear to be a standard word
>>: -CELL! ( addr -- ) CELL NEGATE SWAP +! ;
> 
> I added it to my dictionary ...
> 
>: -! ( n addr -- ) tuck @ swap - swap ! ;
> ... or ...
>: -! ( n addr -- ) swap negate swap +! ;

Why? Because it can?
If you must, write these terrible monsters in code (that's assembler).

groet Coos

[toc] | [prev] | [next] | [standalone]


#44399

FromChris Curl <ccurl609@gmail.com>
Date2015-12-28 15:33 -0800
Message-ID<3b4c49e5-6ccb-4b38-b22b-8da2cc547ce5@googlegroups.com>
In reply to#44397
On Monday, December 28, 2015 at 5:50:16 PM UTC-5, Coos Haak wrote:
> Op Mon, 28 Dec 2015 13:13:31 -0800 (PST) schreef Chris Curl:
> 
> > On Monday, December 28, 2015 at 3:43:05 PM UTC-5, Paul Rubin wrote:
> >> Chris Curl <cc...@gmail.com> writes:
> >>> : -CELL! ( addr -- ) CELL SWAP -! ;
> >> 
> >> \ -! doesn't appear to be a standard word
> >>: -CELL! ( addr -- ) CELL NEGATE SWAP +! ;
> > 
> > I added it to my dictionary ...
> > 
> >: -! ( n addr -- ) tuck @ swap - swap ! ;
> > ... or ...
> >: -! ( n addr -- ) swap negate swap +! ;
> 
> Why? Because it can?
> If you must, write these terrible monsters in code (that's assembler).
> 
> groet Coos
That is actually how I implemented it. The Forth version was just for 
illustration. Even so, the difference in performance is not likely to
be very noticeable.

m_Pop eax
m_Pop edx
add [eax], edx ; sub [eax], edx for -!

[toc] | [prev] | [next] | [standalone]


#44402

From"Elizabeth D. Rather" <erather@forth.com>
Date2015-12-28 15:37 -1000
Message-ID<7OidnUoCmopdfhzLnZ2dnUU7-QUAAAAA@supernews.com>
In reply to#44399
On 12/28/15 1:33 PM, Chris Curl wrote:
> On Monday, December 28, 2015 at 5:50:16 PM UTC-5, Coos Haak wrote:
>> Op Mon, 28 Dec 2015 13:13:31 -0800 (PST) schreef Chris Curl:
>>
>>> On Monday, December 28, 2015 at 3:43:05 PM UTC-5, Paul Rubin wrote:
>>>> Chris Curl <cc...@gmail.com> writes:
>>>>> : -CELL! ( addr -- ) CELL SWAP -! ;
>>>>
>>>> \ -! doesn't appear to be a standard word
>>>> : -CELL! ( addr -- ) CELL NEGATE SWAP +! ;
>>>
>>> I added it to my dictionary ...
>>>
>>> : -! ( n addr -- ) tuck @ swap - swap ! ;
>>> ... or ...
>>> : -! ( n addr -- ) swap negate swap +! ;
>>
>> Why? Because it can?
>> If you must, write these terrible monsters in code (that's assembler).
>>
>> groet Coos
> That is actually how I implemented it. The Forth version was just for
> illustration. Even so, the difference in performance is not likely to
> be very noticeable.
>
> m_Pop eax
> m_Pop edx
> add [eax], edx ; sub [eax], edx for -!
>

Depending on your implementation, it can be substantial.

Cheers,
Elizabeth

-- 
==================================================
Elizabeth D. Rather   (US & Canada)   800-55-FORTH
FORTH Inc.                         +1 310.999.6784
5959 West Century Blvd. Suite 700
Los Angeles, CA 90045
http://www.forth.com

"Forth-based products and Services for real-time
applications since 1973."
==================================================

[toc] | [prev] | [next] | [standalone]


#44407

FromChris Curl <ccurl609@gmail.com>
Date2015-12-28 22:18 -0800
Message-ID<56c7a56e-aa99-4ac1-bf6a-245b65e36411@googlegroups.com>
In reply to#44402
OK, fine. How about this?

0 CELL+ CONSTANT CELL
VARIABLE tStack 64 CELLS ALLOT
: tStack.Reset tStack DUP ! ;
: T@ tStack @ @ ;
: T! tStack @ ! ;
: >T CELL tStack +! T! ;
: T> T@ CELL tStack -! ;  \ FWIW, -! is a primitive
: tDEPTH tStack DUP @ SWAP - 2/ 2/ ;
tStack.Reset

[toc] | [prev] | [next] | [standalone]


#44408

FromPaul Rubin <no.email@nospam.invalid>
Date2015-12-28 22:31 -0800
Message-ID<87y4cdojee.fsf@jester.gateway.pace.com>
In reply to#44407
Chris Curl <ccurl609@gmail.com> writes:
> 0 CELL+ CONSTANT CELL

1 CELLS CONSTANT CELL

> VARIABLE tStack 64 CELLS ALLOT
> : tStack.Reset tStack DUP ! ;

I don't think that is safe.  Maybe:

VARIABLE tSP
CREATE tStack 64 CELLS ALLOT
: T.Reset tStack TSP !
...

[toc] | [prev] | [next] | [standalone]


Page 1 of 8  [1] 2 3 4 5 6 7 8  Next page →

Back to top | Article view | comp.lang.forth


csiph-web