| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| No human should suffer the punishment that I'm experiencing at trying to re-use picforth [based on the fine/robust gforth] after 3 years. He writes "if you know forth...". How can you 'know forth' ? forth is not to know. forth is a perverted bottom-up presentation format; when you should be conditioning your problem-solving to be top-down. Particularly since gforth is so open and nicely presented [within the constraints of the forth format], I'd like to analyse how, File: test.mini > func sign(n) > var r; > if (n<0) then > r:=-1; > else > if (0<n) then > r:=1; > else > r:=0; > end if; > end if; > return r; > end func; eventually gets to eg. 6502 machine-code. {I'm more interested in the 'direct-route' version, than the VM/p-code-interpreter version, since I already 'invented' the AFSM machine compiler for a pascal-subset, in the '70s; where the parser just follows the syntax-diagrams, like a train, and does the appropriate action/s at each 'active-point'. I need to learn some 'register alloction' principles ? } To help understand the detailed route from the sample mini-modula source to eg. 6502 code I'd need some tools. Since it's a human [not machine] process, think OCR and Bablefish. A partial dissasembler/translator, which possibly evolves/learns with use, which would translate eg. :--- > : handle-thermal-alert ( -- ) > disable-output > begin clrwdt thermal low? until > 1s enable-output > ; to something like:-- > PROC handle-thermal-alert > disable-output; > REPEAT <copy existing> > UNTIL (low > 0) > <copy existing> > END handle-thermal-alert; Apparently gforth is well integrated into emacs ? I'm guessing that some type of IDE tools exist by that route ? Please help me to avoid the punishment of building own tools. TIA, == Chris Glur. PS. you don't "know" telephone numbers; you have a tool which 'handles' them ? |
|
#2
| |||
| |||
| On 30 Aug, 03:35, problems@gmail wrote: > No human should suffer the punishment that I'm experiencing at > trying to re-use picforth [based on the fine/robust gforth] > after 3 years. > > He writes "if you know forth...". > How can you 'know forth' ? forth is not to know. > forth is a perverted bottom-up presentation format; when you > should be conditioning your problem-solving to be top-down. > > Particularly since gforth is so open and nicely presented > [within the constraints of the forth format], I'd like to > analyse how, File: test.mini> func sign(n) > > * var r; > > * if (n<0) then > > * * r:=-1; > > * else > > * * if (0<n) then > > * * * r:=1; > > * * else > > * * * r:=0; > > * * end if; > > * end if; > > * return r; > > end func; > > eventually gets to eg. 6502 machine-code. > > {I'm more interested in the 'direct-route' version, than the > VM/p-code-interpreter version, since I already 'invented' the > AFSM machine compiler for a pascal-subset, in the '70s; where the > parser just follows the syntax-diagrams, like a train, and does > the appropriate action/s at each 'active-point'. I need to learn > some 'register alloction' principles ? } > > To help understand the detailed route from the sample mini-modula > source to eg. 6502 code I'd need some tools. > > Since it's a human [not machine] process, think OCR and Bablefish. > > A partial dissasembler/translator, which possibly evolves/learns > with use, which would translate eg. :--- > > > : handle-thermal-alert ( -- ) > > * * disable-output > > * * begin clrwdt thermal low? until > > * * 1s enable-output > > ; > > to something like:-- > > > PROC handle-thermal-alert > > * *disable-output; > > * *REPEAT <copy existing> > > * *UNTIL (low > 0) > > <copy existing> > > END handle-thermal-alert; > > Apparently gforth is well integrated into emacs ? > I'm guessing that some type of IDE tools exist by that route ? > Please help me to avoid the punishment of building own tools. > > TIA, > > == Chris Glur. > > PS. you don't "know" telephone numbers; you have a tool > which 'handles' them ? I suggest you start from the top down and wite one ;-). But seriously algol on a pic? I'm sure top down is the perversion of bottom up, as all code is built up. Take sky scrapper example. I'm sure thedrawings were done very top down fashion due to the penthouse prices, but even though the cranes are top from bottom up today, the scrapper is most definately bottom up implemented. cheers jacko |
|
#3
| |||
| |||
| Op Sat, 30 Aug 2008 02:37:28 -0700 (PDT) schreef jacko: <snip> > I suggest you start from the top down and wite one ;-). But seriously > algol on a pic? I'm sure top down is the perversion of bottom up, as > all code is built up. Take sky scrapper example. I'm sure thedrawings > were done very top down fashion due to the penthouse prices, but even > though the cranes are top from bottom up today, the scrapper is most > definately bottom up implemented. > I do remember building the Medical Faculty of the now known as Erasmus University Rotterdam just 40 years ago was top down. The roof was the first part. This was lifted with big jacks and the successive lower floors were put under it. http://en.wikipedia.org/wiki/Erasmus_University -- Coos |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.