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


Groups > comp.lang.forth > #39001

Re: Array of Constants in Mecrisp

From rickman <gnuarm@gmail.com>
Newsgroups comp.lang.forth
Subject Re: Array of Constants in Mecrisp
Date 2015-05-11 20:47 -0400
Organization A noiseless patient Spider
Message-ID <mirih2$muf$1@dont-email.me> (permalink)
References <mins3e$ek3$1@dont-email.me> <b28ab605-2e16-49ce-9501-4c05e96bc231@googlegroups.com> <mioco2$jh2$1@dont-email.me> <mipv64$r80$2@newsserver.rrzn.uni-hannover.de> <555138f6$0$3067$e4fe514c@dreader35.news.xs4all.nl>

Show all headers | View raw


On 5/11/2015 7:19 PM, Albert van der Horst wrote:
> In article <mipv64$r80$2@newsserver.rrzn.uni-hannover.de>,
> Matthias Koch  <matthias.koch@hot.uni-hannover.de> wrote:
>>> compiletoram
>>>
>>> : charconstarray <builds does> + c@ ;
>>>
>>> charconstarray arraytest
>>>    $1E c, $08 c, $1D c, $19 c, $0B c, $13 c, $17 c, $18 c, $1F c, $1B c,
>>> In the above code, is <builds necessary?  Could it be omitted or does it
>>> muck with the state or something that is needed with does> ?
>>>
>>
>> <builds does> is necessary because the standard action of create cannot
>> be overwritten when compiling into flash. So create has standard action,
>> <builds has no action.
>
> This is a matter of implementation, not imposed by the separation between
> ram and flash.
>
> noforth has the following code as part of a demonstration by Albert
> Nijhof for playing Beethoven songs (sorry, pieces).
>
> \ ----- compile (define) a tune in ROM ----------------
> : DOTUNE: does> play ;
> : TUNE: create dotune:
>     begin bl-word count
>           2dup upper
>           over c@                \ adr count first-ch
>           dup ch ; <>
>     while >r
>          dup 1 =
>          if   ch \ r@ =  if postpone \   else            \ forth comment \
>               ch ( r@ =  if postpone (   else            \ forth comment (
>               r@ c,                      then then       \ compile character
>          else ch \ r@ =   if   ch | c,   else            \ bar number
>               ch ( r@ =   if             else            \ skip string
>               2dup m,                    then then       \ compile string
>          then
>          rdrop 2drop
>     repeat c, align 2drop ;
>
> Not that I understand the code in full, but it should be clear that CREATE & DOES>
> are used in a regular way. The word ROM refers to the fact that the tune
> is stored in ROM.
>
> There remain a few caveats, that can be found in the documentation of
> noforth.

Thanks for the attempt to help, but this is still over my head. 
Unfortunately most of the guts of Mecrisp are written in assembly with 
lots of German comments, so it will be a struggle to figure it all out. 
  Once I finish with my current project (shouldn't be too many more 
days) I will come back to this since I think it is important.

-- 

Rick

Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Array of Constants in Mecrisp rickman <gnuarm@gmail.com> - 2015-05-10 11:06 -0400
  Array of Constants in Mecrisp Mark Wills <markwills1970@gmail.com> - 2015-05-10 09:02 -0700
    Re: Array of Constants in Mecrisp rickman <gnuarm@gmail.com> - 2015-05-10 15:50 -0400
      Re: Array of Constants in Mecrisp Mark Wills <markwills1970@gmail.com> - 2015-05-11 00:38 -0700
      Re: Array of Constants in Mecrisp Matthias Koch <matthias.koch@hot.uni-hannover.de> - 2015-05-11 12:10 +0200
        Re: Array of Constants in Mecrisp rickman <gnuarm@gmail.com> - 2015-05-11 11:24 -0400
          Re: Array of Constants in Mecrisp Matthias Koch <matthias.koch@hot.uni-hannover.de> - 2015-05-12 13:03 +0200
        Re: Array of Constants in Mecrisp albert@spenarnc.xs4all.nl (Albert van der Horst) - 2015-05-11 23:19 +0000
          Re: Array of Constants in Mecrisp rickman <gnuarm@gmail.com> - 2015-05-11 20:47 -0400
            Re: Array of Constants in Mecrisp albert@spenarnc.xs4all.nl (Albert van der Horst) - 2015-05-12 17:05 +0000
          Re: Array of Constants in Mecrisp Matthias Koch <matthias.koch@hot.uni-hannover.de> - 2015-05-12 12:49 +0200
        Re: Array of Constants in Mecrisp rickman <gnuarm@gmail.com> - 2015-05-14 13:00 -0400
          Re: Array of Constants in Mecrisp "Alex McDonald" <blog@rivadpm.com> - 2015-05-14 18:04 +0100
            Re: Array of Constants in Mecrisp rickman <gnuarm@gmail.com> - 2015-05-14 13:20 -0400
              Re: Array of Constants in Mecrisp "Alex McDonald" <blog@rivadpm.com> - 2015-05-14 18:46 +0100
              Re: Array of Constants in Mecrisp Bernd Paysan <bernd.paysan@gmx.de> - 2015-05-14 20:42 +0200
                Re: Array of Constants in Mecrisp rickman <gnuarm@gmail.com> - 2015-05-15 11:25 -0400
              Re: Array of Constants in Mecrisp "Elizabeth D. Rather" <erather@forth.com> - 2015-05-14 09:11 -1000
              Re: Array of Constants in Mecrisp anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-05-15 07:26 +0000
                Re: Array of Constants in Mecrisp "Elizabeth D. Rather" <erather@forth.com> - 2015-05-14 22:30 -1000
                Re: Array of Constants in Mecrisp anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-05-15 10:03 +0000
                Re: Array of Constants in Mecrisp albert@spenarnc.xs4all.nl (Albert van der Horst) - 2015-05-15 11:05 +0000
                Re: Array of Constants in Mecrisp anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-05-15 12:51 +0000
                Re: Array of Constants in Mecrisp albert@spenarnc.xs4all.nl (Albert van der Horst) - 2015-05-15 15:40 +0000
                Re: Array of Constants in Mecrisp anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-05-16 13:40 +0000
                Re: Array of Constants in Mecrisp "Elizabeth D. Rather" <erather@forth.com> - 2015-05-16 11:25 -1000
                Re: Array of Constants in Mecrisp "Elizabeth D. Rather" <erather@forth.com> - 2015-05-15 09:28 -1000
              Re: Array of Constants in Mecrisp rickman <gnuarm@gmail.com> - 2015-05-15 11:31 -0400
                Re: Array of Constants in Mecrisp "Elizabeth D. Rather" <erather@forth.com> - 2015-05-15 09:31 -1000
                Re: Array of Constants in Mecrisp rickman <gnuarm@gmail.com> - 2015-05-16 10:00 -0400
                Re: Array of Constants in Mecrisp anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-05-16 16:12 +0000
                Re: Array of Constants in Mecrisp rickman <gnuarm@gmail.com> - 2015-05-16 13:58 -0400
                Re: Array of Constants in Mecrisp anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-05-16 18:03 +0000
                Re: Array of Constants in Mecrisp Bernd Paysan <bernd.paysan@gmx.de> - 2015-05-18 00:36 +0200
                Re: Array of Constants in Mecrisp Lars Brinkhoff <lars.spam@nocrew.org> - 2015-05-18 08:37 +0200
                Re: Array of Constants in Mecrisp Coos Haak <chforth@hccnet.nl> - 2015-05-18 12:55 +0200
                Re: Array of Constants in Mecrisp Lars Brinkhoff <lars.spam@nocrew.org> - 2015-05-18 13:44 +0200
                Re: Array of Constants in Mecrisp albert@spenarnc.xs4all.nl (Albert van der Horst) - 2015-05-19 00:17 +0000
                Re: Array of Constants in Mecrisp "Elizabeth D. Rather" <erather@forth.com> - 2015-05-16 11:36 -1000
                Re: Array of Constants in Mecrisp "Elizabeth D. Rather" <erather@forth.com> - 2015-05-16 11:27 -1000
            Re: Array of Constants in Mecrisp albert@spenarnc.xs4all.nl (Albert van der Horst) - 2015-05-15 10:48 +0000
  Re: Array of Constants in Mecrisp Matthias Koch <matthias.koch@hot.uni-hannover.de> - 2015-05-11 12:06 +0200
    Re: Array of Constants in Mecrisp Mark Wills <markwills1970@gmail.com> - 2015-05-11 04:48 -0700
      Re: Array of Constants in Mecrisp Matthias Koch <matthias.koch@hot.uni-hannover.de> - 2015-05-12 12:39 +0200
        Re: Array of Constants in Mecrisp foxaudioresearch@gmail.com - 2015-05-12 16:29 -0700
    Re: Array of Constants in Mecrisp rickman <gnuarm@gmail.com> - 2015-05-14 13:05 -0400
      Re: Array of Constants in Mecrisp Coos Haak <chforth@hccnet.nl> - 2015-05-14 22:21 +0200
        Re: Array of Constants in Mecrisp rickman <gnuarm@gmail.com> - 2015-05-15 11:27 -0400

csiph-web