flashforth-devel Mailing List for FlashForth: for PIC and Atmega (Page 33)
Brought to you by:
oh2aun
You can subscribe to this list here.
2011 |
Jan
|
Feb
(22) |
Mar
(3) |
Apr
(4) |
May
(6) |
Jun
(8) |
Jul
|
Aug
(6) |
Sep
|
Oct
(20) |
Nov
(9) |
Dec
(4) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2012 |
Jan
(4) |
Feb
|
Mar
(5) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(5) |
Oct
(14) |
Nov
(1) |
Dec
|
2013 |
Jan
(4) |
Feb
(5) |
Mar
(4) |
Apr
(2) |
May
|
Jun
(29) |
Jul
(7) |
Aug
|
Sep
(20) |
Oct
(9) |
Nov
(2) |
Dec
(7) |
2014 |
Jan
|
Feb
(23) |
Mar
(113) |
Apr
(25) |
May
(31) |
Jun
(9) |
Jul
(47) |
Aug
(15) |
Sep
(1) |
Oct
(4) |
Nov
(8) |
Dec
(3) |
2015 |
Jan
(21) |
Feb
(1) |
Mar
(18) |
Apr
(16) |
May
(100) |
Jun
(33) |
Jul
|
Aug
(10) |
Sep
(8) |
Oct
(7) |
Nov
(5) |
Dec
|
2016 |
Jan
(12) |
Feb
(9) |
Mar
|
Apr
(7) |
May
(5) |
Jun
(9) |
Jul
(1) |
Aug
(2) |
Sep
(17) |
Oct
(3) |
Nov
|
Dec
|
2017 |
Jan
(6) |
Feb
(12) |
Mar
(9) |
Apr
(3) |
May
(7) |
Jun
|
Jul
(12) |
Aug
|
Sep
(13) |
Oct
|
Nov
|
Dec
(10) |
2018 |
Jan
(1) |
Feb
|
Mar
(7) |
Apr
(4) |
May
|
Jun
|
Jul
(3) |
Aug
|
Sep
(21) |
Oct
(3) |
Nov
|
Dec
|
2019 |
Jan
(5) |
Feb
(4) |
Mar
|
Apr
|
May
(3) |
Jun
(11) |
Jul
(4) |
Aug
(6) |
Sep
(3) |
Oct
|
Nov
(9) |
Dec
(7) |
2020 |
Jan
(2) |
Feb
(3) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
(4) |
Dec
|
2021 |
Jan
|
Feb
|
Mar
(8) |
Apr
(40) |
May
(12) |
Jun
|
Jul
|
Aug
(3) |
Sep
(3) |
Oct
(4) |
Nov
(10) |
Dec
(4) |
2022 |
Jan
(29) |
Feb
(7) |
Mar
(10) |
Apr
|
May
(3) |
Jun
(3) |
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
(1) |
Dec
(6) |
2023 |
Jan
(8) |
Feb
|
Mar
(5) |
Apr
(9) |
May
(6) |
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2024 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
(9) |
Aug
(7) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
From: Mike M. <mi...@mo...> - 2014-03-27 06:39:14
|
Forth typically converts a double number when there is ANY of the following punctuation chrs present anywhere in the number , . / - : The exception is a leading - chr which indictes a negative number. See Starting Forth, Leo Brodie. These punctuations support European and US number and time formats, and many others. I see nothing wrong with adding the _ chr. FF 4.8 only recognizes a . chr at the end of the digits, so I needed to write my own number conversion word. A double number format closer to the standard would be nice. Mike Miller Moon Valley Circuits mi...@mo... http://www.moonvalleycircuits.com/ On 3/26/14 10:38 AM, Mikael Nordman wrote: > I could easily extend the FF >number so that it > would work as today but just ignore certain punctuation. > > What would be the best choice for punctuation ? > Perhaps the comma character. > > Or use the period anywhere in number to indicate that it as double number. > Not having any punctuation in single numbers. This is how > it is described in Forth Programmers Handbook. > > Single precision number > #10,345 > %1011,1101,1111,0000 > $fad,e > > Double precision numbers > %1011_1101_1111_0000. > #10,345. > $fade,babe. > $f,a,d,e,b,a,b,e. > > > You proposal with separate parsing words can be implemented as an add-on > if wanted. > > BR Mike > > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > http://p.sf.net/sfu/13534_NeoTech > _______________________________________________ > Flashforth-devel mailing list > Fla...@li... > https://lists.sourceforge.net/lists/listinfo/flashforth-devel > > |
From: Herman A. <exp...@vn...> - 2014-03-26 19:31:13
|
It is perfect solution to extend the >number to ignor the separator. I think the best choice is the underscore character. The comma disturb me a bit, because it is "decimal point" in hungarian notation. :-) Thanks, BR Attila ----- Eredeti üzenet ----- Feladó: Mikael Nordman <mik...@pp...> Dátum: Szerda, Március 26, 2014 6:39 Tárgy: Re: [Flashforth-devel] Free form number Címzett: fla...@li... > I could easily extend the FF >number so that it > would work as today but just ignore certain punctuation. > > What would be the best choice for punctuation ? > Perhaps the comma character. > > Or use the period anywhere in number to indicate that it as double number. > Not having any punctuation in single numbers. This is how > it is described in Forth Programmers Handbook. > > Single precision number > #10,345 > %1011,1101,1111,0000 > $fad,e > > Double precision numbers > %1011_1101_1111_0000. > #10,345. > $fade,babe. > $f,a,d,e,b,a,b,e. > > > You proposal with separate parsing words can be implemented as an > add-on > if wanted. > > BR Mike > > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > > _______________________________________________ > Flashforth-devel mailing list > Fla...@li... > |
From: Mikael N. <mik...@pp...> - 2014-03-26 17:39:07
|
I could easily extend the FF >number so that it would work as today but just ignore certain punctuation. What would be the best choice for punctuation ? Perhaps the comma character. Or use the period anywhere in number to indicate that it as double number. Not having any punctuation in single numbers. This is how it is described in Forth Programmers Handbook. Single precision number #10,345 %1011,1101,1111,0000 $fad,e Double precision numbers %1011_1101_1111_0000. #10,345. $fade,babe. $f,a,d,e,b,a,b,e. You proposal with separate parsing words can be implemented as an add-on if wanted. BR Mike |
From: Herman A. <exp...@vn...> - 2014-03-26 08:52:37
|
Hi Mike and all, I have an old idea, that would be fine to do in FF. In general text frequently used representation of numbers using delimiter characters to separate the groups of digits. 1,048,576 32'768 ff00 fd12 1001 0010 1110 In this form of a long number is well readable, but unusable directly in forth. We need a forth word to remove all non-number character from the string, then convert the result string to a number. Maybe give the human readable format in a string, then posteriorly convert it: s" 1100 1001" >>number Often would be better solution using a word wich collect the real digits from the input stream until a terminal character, then convert it to a number according to the given base or current base. Example form: #{ 1,048,576} \ decimal ${ ff00 fd12} \ hex %{ 1001 0010 1110} \ binary n{ 32'768} \ in current base All above words leave the result on the stack. What do you think about my conception? BR Attila |
From: Herman A. <exp...@vn...> - 2014-03-26 07:32:33
|
Sorry for my poor english... I want to say, I agree with using different words for SFRs and whole ram. Attila ----- Eredeti üzenet ----- Feladó: Mikael Nordman <mik...@pp...> Dátum: Szerda, Március 26, 2014 7:52 Tárgy: Re: [Flashforth-devel]Pin words Címzett: Herman Attila <exp...@vn...> > Sorry, I dont fully understand. > Do you mean that it should or should not be optimized for speed ? > > BR Mikael > On 03/26/2014 08:44 AM, Herman Attila wrote: > > Really, this distinction needed for optimal speed. > > > > BR > > Attila > > > > ----- Eredeti üzenet ----- > > Feladó: Mikael Nordman <mik...@pp...> > > Dátum: Szerda, Március 26, 2014 6:24 > > Tárgy: Re: [Flashforth-devel] Válasz: Pin words > > Címzett: fla...@li... > > > > > >> Since these words actually only work with SFRs in access ram they > >> could be > >> called > >> > >> sfrbit-on: > >> sfrbit-off: > >> sfrbit-test: > >> > >> The words that work with the whole ram space could be > >> > >> bit-on: > >> bit-off: > >> bit-test: > >> > >> These words need to generate code to set the bank bits also. > >> > >> BR Mike > >> > >> On 03/25/2014 11:36 PM, Herman Attila wrote: > >>> It is good idea to use such words, but I think their usage belongs > >> not to the pins only. > >>> Any bit usable in similar way. According to this theory the > >> terminology probably: > >>> bit-on: > >>> bit-off: > >>> bit-test: (or bit?:) > >>> > >>> The name of defined word can refer to its function, such as usage > of > >> a pin or function of a bit of a sfr etc. > >>> BR > >>> Attila > >> > >> ------------------------------------------------------------------------------ > >> Learn Graph Databases - Download FREE O'Reilly Book > >> "Graph Databases" is the definitive new guide to graph databases > and their > >> applications. Written by three acclaimed leaders in the field, > >> this first edition is now available. Download your free book today! > >> > >> _______________________________________________ > >> Flashforth-devel mailing list > >> Fla...@li... > >> > |
From: Herman A. <exp...@vn...> - 2014-03-26 06:48:45
|
Really, this distinction needed for optimal speed. BR Attila ----- Eredeti üzenet ----- Feladó: Mikael Nordman <mik...@pp...> Dátum: Szerda, Március 26, 2014 6:24 Tárgy: Re: [Flashforth-devel] Válasz: Pin words Címzett: fla...@li... > Since these words actually only work with SFRs in access ram they > could be > called > > sfrbit-on: > sfrbit-off: > sfrbit-test: > > The words that work with the whole ram space could be > > bit-on: > bit-off: > bit-test: > > These words need to generate code to set the bank bits also. > > BR Mike > > On 03/25/2014 11:36 PM, Herman Attila wrote: > > It is good idea to use such words, but I think their usage belongs > not to the pins only. > > Any bit usable in similar way. According to this theory the > terminology probably: > > bit-on: > > bit-off: > > bit-test: (or bit?:) > > > > The name of defined word can refer to its function, such as usage of > a pin or function of a bit of a sfr etc. > > > > BR > > Attila > > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > > _______________________________________________ > Flashforth-devel mailing list > Fla...@li... > |
From: Mikael N. <mik...@pp...> - 2014-03-26 05:24:23
|
Since these words actually only work with SFRs in access ram they could be called sfrbit-on: sfrbit-off: sfrbit-test: The words that work with the whole ram space could be bit-on: bit-off: bit-test: These words need to generate code to set the bank bits also. BR Mike On 03/25/2014 11:36 PM, Herman Attila wrote: > It is good idea to use such words, but I think their usage belongs not to the pins only. > Any bit usable in similar way. According to this theory the terminology probably: > bit-on: > bit-off: > bit-test: (or bit?:) > > The name of defined word can refer to its function, such as usage of a pin or function of a bit of a sfr etc. > > BR > Attila |
From: Pete Z. <pza...@pz...> - 2014-03-25 23:10:27
|
Well said Herman, I agree... Pete On 3/25/2014 4:36 PM, Herman Attila wrote: > It is good idea to use such words, but I think their usage belongs not to the pins only. > Any bit usable in similar way. According to this theory the terminology probably: > bit-on: > bit-off: > bit-test: (or bit?:) > > The name of defined word can refer to its function, such as usage of a pin or function of a bit of a sfr etc. > > BR > Attila > > > ----- Eredeti üzenet ----- > Feladó: Mikael Nordman <mik...@pp...> > Dátum: Kedd, Március 25, 2014 8:08 > Tárgy: [Flashforth-devel] Pin words > Címzett: fla...@li... > > >> I made some words for manipulating pins on pic18. >> >> Any comments or suggestions for the names and structure ? >> >> Is there any best practice for pin manipulation ? >> >> Would it be better to have pin-in: and pin-out: instead of pin-dir: ? >> >> BR Mike >> >> \ ********************************************************************* >> \ * >> \ Filename: pins.txt * >> \ Date: 25.03.2014 * >> \ FF Version: 5.0 * >> \ MCU: PIC18 * >> \ Copyright: Mikael Nordman >> * >> \ Author: Mikael Nordman >> * >> \ ********************************************************************* >> \ FlashForth is licensed acording to the GNU General Public License* >> \ ********************************************************************* >> \ Words for manipulating I/O pins >> -pins >> marker -pins >> >> \ Define a word that sets a pin direction >> ( tris bit dir "name" -- ) \ dir : 0 = output, 1 = input >> : pin-dir: >> : >> if >> a, bsf, >> else >> a, bcf, >> then >> $12 i, postpone [ >> ; >> >> \ Define a word that sets an output pin >> ( port bit "name" -- ) >> : pin-on: >> : a, bsf, $12 i, postpone [ >> ; >> >> \ Define a word that clears an output pin >> ( port bit "name" -- ) >> : pin-off: >> : a, bcf, $12 i, postpone [ >> ; >> >> \ Define a word that leaves a true flag if a bit is one >> \ and a false flag if a bit is zero. >> ( port bit "name" -- ) >> : pin-in: >> : >> ['] false in, >> a, btfss, >> $12 i, >> ['] invert in, >> $12 i, postpone [ >> ; >> >> $ff82 constant portc >> $ff94 constant trisc >> $0000 constant bit0 >> >> trisc bit0 0 pin-dir: pc0out >> trisc bit0 1 pin-dir: pc0in >> portc bit0 pin-on: pc0on >> portc bit0 pin-off: pc0off >> portc bit0 pin-in: pc0? >> >> >> ------------------------------------------------------------------------------ >> Learn Graph Databases - Download FREE O'Reilly Book >> "Graph Databases" is the definitive new guide to graph databases and their >> applications. Written by three acclaimed leaders in the field, >> this first edition is now available. Download your free book today! >> >> _______________________________________________ >> Flashforth-devel mailing list >> Fla...@li... >> > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > http://p.sf.net/sfu/13534_NeoTech > _______________________________________________ > Flashforth-devel mailing list > Fla...@li... > https://lists.sourceforge.net/lists/listinfo/flashforth-devel > > |
From: Herman A. <exp...@vn...> - 2014-03-25 21:36:53
|
It is good idea to use such words, but I think their usage belongs not to the pins only. Any bit usable in similar way. According to this theory the terminology probably: bit-on: bit-off: bit-test: (or bit?:) The name of defined word can refer to its function, such as usage of a pin or function of a bit of a sfr etc. BR Attila ----- Eredeti üzenet ----- Feladó: Mikael Nordman <mik...@pp...> Dátum: Kedd, Március 25, 2014 8:08 Tárgy: [Flashforth-devel] Pin words Címzett: fla...@li... > I made some words for manipulating pins on pic18. > > Any comments or suggestions for the names and structure ? > > Is there any best practice for pin manipulation ? > > Would it be better to have pin-in: and pin-out: instead of pin-dir: ? > > BR Mike > > \ ********************************************************************* > \ * > \ Filename: pins.txt * > \ Date: 25.03.2014 * > \ FF Version: 5.0 * > \ MCU: PIC18 * > \ Copyright: Mikael Nordman > * > \ Author: Mikael Nordman > * > \ ********************************************************************* > \ FlashForth is licensed acording to the GNU General Public License* > \ ********************************************************************* > \ Words for manipulating I/O pins > -pins > marker -pins > > \ Define a word that sets a pin direction > ( tris bit dir "name" -- ) \ dir : 0 = output, 1 = input > : pin-dir: > : > if > a, bsf, > else > a, bcf, > then > $12 i, postpone [ > ; > > \ Define a word that sets an output pin > ( port bit "name" -- ) > : pin-on: > : a, bsf, $12 i, postpone [ > ; > > \ Define a word that clears an output pin > ( port bit "name" -- ) > : pin-off: > : a, bcf, $12 i, postpone [ > ; > > \ Define a word that leaves a true flag if a bit is one > \ and a false flag if a bit is zero. > ( port bit "name" -- ) > : pin-in: > : > ['] false in, > a, btfss, > $12 i, > ['] invert in, > $12 i, postpone [ > ; > > $ff82 constant portc > $ff94 constant trisc > $0000 constant bit0 > > trisc bit0 0 pin-dir: pc0out > trisc bit0 1 pin-dir: pc0in > portc bit0 pin-on: pc0on > portc bit0 pin-off: pc0off > portc bit0 pin-in: pc0? > > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > > _______________________________________________ > Flashforth-devel mailing list > Fla...@li... > |
From: Mikael N. <mik...@pp...> - 2014-03-25 19:08:39
|
I made some words for manipulating pins on pic18. Any comments or suggestions for the names and structure ? Is there any best practice for pin manipulation ? Would it be better to have pin-in: and pin-out: instead of pin-dir: ? BR Mike \ ********************************************************************* \ * \ Filename: pins.txt * \ Date: 25.03.2014 * \ FF Version: 5.0 * \ MCU: PIC18 * \ Copyright: Mikael Nordman * \ Author: Mikael Nordman * \ ********************************************************************* \ FlashForth is licensed acording to the GNU General Public License* \ ********************************************************************* \ Words for manipulating I/O pins -pins marker -pins \ Define a word that sets a pin direction ( tris bit dir "name" -- ) \ dir : 0 = output, 1 = input : pin-dir: : if a, bsf, else a, bcf, then $12 i, postpone [ ; \ Define a word that sets an output pin ( port bit "name" -- ) : pin-on: : a, bsf, $12 i, postpone [ ; \ Define a word that clears an output pin ( port bit "name" -- ) : pin-off: : a, bcf, $12 i, postpone [ ; \ Define a word that leaves a true flag if a bit is one \ and a false flag if a bit is zero. ( port bit "name" -- ) : pin-in: : ['] false in, a, btfss, $12 i, ['] invert in, $12 i, postpone [ ; $ff82 constant portc $ff94 constant trisc $0000 constant bit0 trisc bit0 0 pin-dir: pc0out trisc bit0 1 pin-dir: pc0in portc bit0 pin-on: pc0on portc bit0 pin-off: pc0off portc bit0 pin-in: pc0? |
From: Mikael N. <mik...@pp...> - 2014-03-25 05:59:20
|
I left some signed math operations out from the FF core because these were long, and can be compiled in later from math.txt. Another reason was that I have never needed signed scaling. The unsigned scaling operator is in the FF Core (UM*/MOD) In the file qmath.txt you can find scaling operators with 48-bit and 64-bit precision. I needed 64-bit intermediate precision, when calculating a 28-bit value for controlling a DDS. CREATE DOES> ... CREATE creates a dictionary entry that when executed return the first free address of the data space. Typically one then can the ALLOT more space and/or store data on the data space. DOES> defines the code that is executed by the previously created word. This code then does something with the data in the data area. Some more complex examples are in ct.txt jt.txt jumptable.txt seen.txt. BR Mike On 03/24/2014 10:50 PM, Simon Bradley wrote: > Hi, > > I have just started with this on a PIC 18F2550 and found that */ > seems to be missing. As this is a core part of Forth (I think), is > there a way to put it back in at that level? I know it is supposed > to use an intermediate double length result so replacing with * / > will not do the same. > > Forth takes some getting used to ... :) > > Any tips or short examples using CREATE and DOES> would be nice too :) > > That is, longer examples than the usual CONSTANT example where DOES> @ ; > is used. I don't quite understand how the mechanism works yet. > > Thanks, > Simon. > > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > http://p.sf.net/sfu/13534_NeoTech > _______________________________________________ > Flashforth-devel mailing list > Fla...@li... > https://lists.sourceforge.net/lists/listinfo/flashforth-devel > |
From: Mikael N. <mik...@pp...> - 2014-03-25 05:47:44
|
It is possible, but you have to define the values yourself as constants. BR Mike On 03/24/2014 11:34 PM, rfr...@gm... wrote: > Hi all, > I work with avr flash forth ad have seen the m328def.inc file. > Is it possible to get access on the values which are defined in this > file while ff is running? > |
From: Donald G. <dgo...@sb...> - 2014-03-24 23:59:54
|
All new comers to Forth need to buy or download two books by Leo Brodie: Starting Forth: http://www.wulfden.org/downloads/Forth_Resources/LB__StartingForth.pdf Thinking Forth: http://www.amazon.com/exec/obidos/ASIN/0976458705 or Free: http://thinking-forth.sourceforge.net/ Starting Forth will show you how to use use Forth like any other programming language. The real power of Forth is explained in Thinking Forth. You can use Forth to create your own language! Thinking Forth tells you how to do this using CREATE DOES plus other words. You can even use core primitive words used to create Forth itself. In Forth, nothing is hidden, not even core words like INTERPRET (parses input stream then executes the words). Forth is an operating system too, a powerful feature for embedded system programming. Don ________________________________ From: Pete Zawasky <pza...@pz...> To: FF mailing list <fla...@li...> Sent: Monday, March 24, 2014 4:02 PM Subject: Re: [Flashforth-devel] Is */ missing from Flash forth 3.8 ? Hi again Simon, As far as CREATE and DOES> , go to the wiki, select Browse Pages and look in my file FF3.81Utility Words. Look at ARRAY and CARRAY. Not a lot of additional info but it may help. Pete On 3/24/2014 3:50 PM, Simon Bradley wrote: > Hi, > > I have just started with this on a PIC 18F2550 and found that */ > seems to be missing. As this is a core part of Forth (I think), is > there a way to put it back in at that level? I know it is supposed > to use an intermediate double length result so replacing with * / > will not do the same. > > Forth takes some getting used to ... :) > > Any tips or short examples using CREATE and DOES> would be nice too :) > > That is, longer examples than the usual CONSTANT example where DOES> @ ; > is used. I don't quite understand how the mechanism works yet. > > Thanks, > Simon. > > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > http://p.sf.net/sfu/13534_NeoTech > _______________________________________________ > Flashforth-devel mailing list > Fla...@li... > https://lists.sourceforge.net/lists/listinfo/flashforth-devel > > ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech _______________________________________________ Flashforth-devel mailing list Fla...@li... https://lists.sourceforge.net/lists/listinfo/flashforth-devel |
From: Pete Z. <pza...@pz...> - 2014-03-24 22:01:53
|
Hi again Simon, As far as CREATE and DOES> , go to the wiki, select Browse Pages and look in my file FF3.81Utility Words. Look at ARRAY and CARRAY. Not a lot of additional info but it may help. Pete On 3/24/2014 3:50 PM, Simon Bradley wrote: > Hi, > > I have just started with this on a PIC 18F2550 and found that */ > seems to be missing. As this is a core part of Forth (I think), is > there a way to put it back in at that level? I know it is supposed > to use an intermediate double length result so replacing with * / > will not do the same. > > Forth takes some getting used to ... :) > > Any tips or short examples using CREATE and DOES> would be nice too :) > > That is, longer examples than the usual CONSTANT example where DOES> @ ; > is used. I don't quite understand how the mechanism works yet. > > Thanks, > Simon. > > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > http://p.sf.net/sfu/13534_NeoTech > _______________________________________________ > Flashforth-devel mailing list > Fla...@li... > https://lists.sourceforge.net/lists/listinfo/flashforth-devel > > |
From: Pete Z. <pza...@pz...> - 2014-03-24 21:49:46
|
Hi Simon, */ is in the file math.txt Pete On 3/24/2014 3:50 PM, Simon Bradley wrote: > Hi, > > I have just started with this on a PIC 18F2550 and found that */ > seems to be missing. As this is a core part of Forth (I think), is > there a way to put it back in at that level? I know it is supposed > to use an intermediate double length result so replacing with * / > will not do the same. > > Forth takes some getting used to ... :) > > Any tips or short examples using CREATE and DOES> would be nice too :) > > That is, longer examples than the usual CONSTANT example where DOES> @ ; > is used. I don't quite understand how the mechanism works yet. > > Thanks, > Simon. > > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > http://p.sf.net/sfu/13534_NeoTech > _______________________________________________ > Flashforth-devel mailing list > Fla...@li... > https://lists.sourceforge.net/lists/listinfo/flashforth-devel > > |
From: <rfr...@gm...> - 2014-03-24 21:34:58
|
<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>Hi all,</div> <div> </div> <div>I work with avr flash forth ad have seen the m328def.inc file.</div> <div>Is it possible to get access on the values which are defined in this file while ff is running?</div> <div> </div> <div><br/> </div> <div class="signature">Mit freundlichem Gruss<br/> <br/> R.Freitag<br/> <br/> [x ] Köln<br/> [ ] Stuttgart<br/> [ ] Vilsbiburg<br/> [ ] Finkenwerder<br/> [ ] Berlin<br/> [ ] Überlingen<br/> [ ] Ingolstadt<br/> [ ] Frankfurt<br/> [] Radolfzell</div></div></body></html> |
From: Simon B. <sim...@ho...> - 2014-03-24 20:54:49
|
Hi, I have just started with this on a PIC 18F2550 and found that */ seems to be missing. As this is a core part of Forth (I think), is there a way to put it back in at that level? I know it is supposed to use an intermediate double length result so replacing with * / will not do the same. Forth takes some getting used to ... :) Any tips or short examples using CREATE and DOES> would be nice too :) That is, longer examples than the usual CONSTANT example where DOES> @ ; is used. I don't quite understand how the mechanism works yet. Thanks, Simon. |
From: Mikael N. <mik...@pp...> - 2014-03-23 21:46:29
|
Great that it works. I cannot think of anything right now (to focus on). Bugs ? (There should not be any :-) Maybe if you want to write something for the webpage. I am trying to finalise the FF 5.0 and update the webpage and then I'll give it a rest for the summer. BR Mikael On 03/22/2014 11:04 PM, Pete Zawasky wrote: > Hi Mikael and all, > > Testing is looking good here as far as FF 5.0 and the dsPIC30F4012 . > I have used both MPLAB 8.92 and MPLAB X ver2.05 to assemble > ff-pic24-30-33.s . > > At first, I still had the WDT ON as I have had in FF 4.8 but now with > WDT OFF, all is well and testing progresses. > > Configuration is: > 16-BIT 28P STARTER DEMO BOARD DM300027 > with dsPIC30F4012 bytes words > SFR 0x0000 to 0x07ff 2K > RAM 0x0800 to 0x0fff 2K > FLASH 0x1000 to 0xcfff 48K 16K > EEPROM 0xfc00 to 0xffff 1K > UART1 on Port F <RF3,RF2> > system clock -- 7.3728MHz xtal and 8xPLL > Fcy is 14745600 Hz > > Anything specific you want me to focus on for this set up? > > Pete > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > http://p.sf.net/sfu/13534_NeoTech > _______________________________________________ > Flashforth-devel mailing list > Fla...@li... > https://lists.sourceforge.net/lists/listinfo/flashforth-devel > |
From: Pete Z. <pza...@pz...> - 2014-03-22 20:04:38
|
Hi Mikael and all, Testing is looking good here as far as FF 5.0 and the dsPIC30F4012 . I have used both MPLAB 8.92 and MPLAB X ver2.05 to assemble ff-pic24-30-33.s . At first, I still had the WDT ON as I have had in FF 4.8 but now with WDT OFF, all is well and testing progresses. Configuration is: 16-BIT 28P STARTER DEMO BOARD DM300027 with dsPIC30F4012 bytes words SFR 0x0000 to 0x07ff 2K RAM 0x0800 to 0x0fff 2K FLASH 0x1000 to 0xcfff 48K 16K EEPROM 0xfc00 to 0xffff 1K UART1 on Port F <RF3,RF2> system clock -- 7.3728MHz xtal and 8xPLL Fcy is 14745600 Hz Anything specific you want me to focus on for this set up? Pete |
From: craig b. <dab...@ya...> - 2014-03-21 11:33:12
|
I did sit down and DIFF the wordlists last night and decided that CON was the only fix needed for anything that I'ld written, so far... Interesting to have DO and CASE onboard and nice extensions for the multiple usarts. One small offense to my sense of symetry, though. Constant compiles in, 2constant doesn't. 2literal compiles in but literal doesn't seem to exist. (grin) Not actually a problem, just inconsistant and the latent physicist in me nags from time to time (quiet down there!...grumble grumble). Arguably, consistant rules are easier to learn. Those arithmetic words can be a nightmare to keep straight. with amusement, craig ...averaging may or may not help clarify data. If Bill Gates walks into a bar, the average patron becomes a millionaire... |
From: Mikael N. <mik...@pp...> - 2014-03-21 05:10:06
|
As you see in my previous answer to Craig the changes are not that big. The biggest addition is the possibility to use DO LOOP though I have never really felt the need for that myself. At least it can be used as a demo for extending Forth. Then there is the new directory structure and MPLABX support. The really big addition is of course the Atmega implementation which I hope is now at the same level as the PIC implementations. I printed your tutorials yesterday, since there is a plan to have a hands on programming intro for kids up to 12 years old. These are Finnish kids so I'll pick some stuff and rewrite it in Finnish. BR Mikael On 03/21/2014 03:41 AM, Peter Jacobs wrote: > I should update some tutorial documents to reflect the new goodies in > version 5. The documents that I had prepared over the past couple of > years were for version 3.8. Suggestions for changes to the tutorials are > most welcome. > Peter J. > |
From: Mikael N. <mik...@pp...> - 2014-03-21 04:55:25
|
The rewrite you have to do is really small. 1. Change CON to CONSTANT The 5.0 CONSTANT is identical to the 3.8 CON The speed is the same. 2. Change 3.8 LEAVE to 5.0 ENDIT The 5.0 LEAVE is for DO LOOP 3. Change 3.8 ' WORD IS INT to 5.0 ' WORD 0 INT! That is all. Should not take more than 5 minutes. The 5.0 VARIABLE is faster. It generates the same code as CONSTANT and compiles the VARIABLE address as a inline literal. BR Mike On 03/21/2014 03:06 AM, craig bair wrote: > Actually, I didn't start using CON rather than CONSTANT until reading somebody's doc/commentary that con compiled code in while constant passed the value to a call... I'ld use it for urgent code when I needed speed more than space. Never got time to run down the actual implamentation, though. I haven't thoroughly dismembered a forth package since re-writing the 6502 forth core to run from the language card on an Apple ][ and extend the dictionary up from the top of the text screen memory (yeah, it's been a while...). I'll see if there are enough changes to warrant writing something to convert the old text files for the new version, but it'll be a least a month till I've got time to turn around to sneeze... Love it on the Pic18 XLP cores, though! "Very tasty that, Mr. Pepperman." > > > Hack away, > craig bair > > ...averaging may or may not help clarify data. > If Bill Gates walks into a bar, > the average patron becomes a millionaire... > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > http://p.sf.net/sfu/13534_NeoTech > _______________________________________________ > Flashforth-devel mailing list > Fla...@li... > https://lists.sourceforge.net/lists/listinfo/flashforth-devel > |
From: Peter J. <pe...@me...> - 2014-03-21 02:00:15
|
I should update some tutorial documents to reflect the new goodies in version 5. The documents that I had prepared over the past couple of years were for version 3.8. Suggestions for changes to the tutorials are most welcome. Peter J. On 03/21/2014 11:06 AM, craig bair wrote: > Actually, I didn't start using CON rather than CONSTANT until reading somebody's doc/commentary that con compiled code in while constant passed the value to a call... I'ld use it for urgent code when I needed speed more than space. Never got time to run down the actual implamentation, though. I haven't thoroughly dismembered a forth package since re-writing the 6502 forth core to run from the language card on an Apple ][ and extend the dictionary up from the top of the text screen memory (yeah, it's been a while...). I'll see if there are enough changes to warrant writing something to convert the old text files for the new version, but it'll be a least a month till I've got time to turn around to sneeze... Love it on the Pic18 XLP cores, though! "Very tasty that, Mr. Pepperman." > > > Hack away, > craig bair > > ...averaging may or may not help clarify data. > If Bill Gates walks into a bar, > the average patron becomes a millionaire... > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > http://p.sf.net/sfu/13534_NeoTech > _______________________________________________ > Flashforth-devel mailing list > Fla...@li... > https://lists.sourceforge.net/lists/listinfo/flashforth-devel |
From: craig b. <dab...@ya...> - 2014-03-21 01:06:23
|
Actually, I didn't start using CON rather than CONSTANT until reading somebody's doc/commentary that con compiled code in while constant passed the value to a call... I'ld use it for urgent code when I needed speed more than space. Never got time to run down the actual implamentation, though. I haven't thoroughly dismembered a forth package since re-writing the 6502 forth core to run from the language card on an Apple ][ and extend the dictionary up from the top of the text screen memory (yeah, it's been a while...). I'll see if there are enough changes to warrant writing something to convert the old text files for the new version, but it'll be a least a month till I've got time to turn around to sneeze... Love it on the Pic18 XLP cores, though! "Very tasty that, Mr. Pepperman." Hack away, craig bair ...averaging may or may not help clarify data. If Bill Gates walks into a bar, the average patron becomes a millionaire... |
From: Mikael N. <mik...@pp...> - 2014-03-20 16:32:21
|
Myself I use only MPLABX and mpasmx . Sometimes I might just check that MPLAB also compiles FF. I have changed the WORDS so that prints the newly defined words after the kernel words. I like to see the newly defined words at the end of the list. I hope it works on 30F4012, my board was broken so I could not test it. Mikael |