Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #35930
| From | Bernd Paysan <bernd.paysan@gmx.de> |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: Expected BASE-LINE for Embedded Controllers |
| Date | 2015-01-21 00:40 +0100 |
| Organization | A noiseless patient Spider |
| Message-ID | <m9mp01$5us$1@dont-email.me> (permalink) |
| References | (1 earlier) <m9h8f4$js8$1@dont-email.me> <m9ioho$nl1$1@newsserver.rrzn.uni-hannover.de> <873875b7fd.fsf@jester.gateway.sonic.net> <m9mksr$n78$1@dont-email.me> <87twzl9isf.fsf@jester.gateway.sonic.net> |
Paul Rubin wrote: > Bernd Paysan <bernd.paysan@gmx.de> writes: >> SP@/RP@/SP!/RP! are these tools, defining a complete multitasking wordset >> that works well from medium to large systems is overkill for the tiny >> systems. > > Another example where SP@ etc can get in the way, is if you have a > VFX-like host-side compiler that places a lot of the target's stack > items in registers. No. SP@ is just a normalization point. SP@ works fine in VFX. : test 1 2 3 + + . ; ok see test TEST ( 080BF310 8D6DFC ) LEA EBP, [EBP+-04] ( 080BF313 895D00 ) MOV [EBP], EBX ( 080BF316 BB06000000 ) MOV EBX, 00000006 ( 080BF31B E8803DF9FF ) CALL 080530A0 . ( 080BF320 C3 ) NEXT, ( 17 bytes, 5 instructions ) ok Now we add an SP@ in between: : test 1 2 3 sp@ >r + + . r> ; TEST is redefined ok see test TEST ( 080BF340 8D6DF4 ) LEA EBP, [EBP+-0C] ( 080BF343 C7450002000000 ) MOV DWord Ptr [EBP], 00000002 ( 080BF34A C7450401000000 ) MOV DWord Ptr [EBP+04], 00000001 ( 080BF351 895D08 ) MOV [EBP+08], EBX ( 080BF354 BB03000000 ) MOV EBX, 00000003 ( 080BF359 E82EFCF8FF ) CALL 0804EF8C SP@ ( 080BF35E 53 ) PUSH EBX ( 080BF35F 8B5D00 ) MOV EBX, [EBP] ( 080BF362 035D04 ) ADD EBX, [EBP+04] ( 080BF365 035D08 ) ADD EBX, [EBP+08] ( 080BF368 8D6D0C ) LEA EBP, [EBP+0C] ( 080BF36B E8303DF9FF ) CALL 080530A0 . ( 080BF370 5A ) POP EDX ( 080BF371 8D6DFC ) LEA EBP, [EBP+-04] ( 080BF374 895D00 ) MOV [EBP], EBX ( 080BF377 8BDA ) MOV EBX, EDX ( 080BF379 C3 ) NEXT, ( 58 bytes, 17 instructions ) Oh, all registers are saved, perfect. The implementation is completely straight-forward: SP@ is marked as word that can't be inlined, and all those words are normalization points anyway. The big difference between a Forth compiler and the textbook compilers is that you have this normalization points. > So the task switcher would save the registers like > in a conventional OS, and exposing SP@ etc. to the target would make > things messy. It seems ok to let the switcher use carnal knowledge. No, we know how to implement SP@, we don't need someone telling us that it can't be done. The problem is solved. > When I mentioned an FPGA processor I wasn't thinking of the tiny > b16-like category, but maybe something more like the J1. The J1 is about as tiny as the b16 (the Verilog is even smaller, because the J1 has a less dense instruction encoding), has the same model of separate very small memory blocks for the data and return stack, and those pointers can't be set by the program (though there's a way to obtain its value, which is missing in the b16 - you can do DEPTH on J1, but not on b16; you can't do SP! on either). > I like the idea of standardized multitasking words, so that programs > that use them can be portable (or at least more portable than they are > now). We like that, too, but it is not the right thing for a base-line wordset for embedded controllers, which is the topic *here*. -- Bernd Paysan "If you want it done right, you have to do it yourself" http://bernd-paysan.de/ net2o ID: kQusJzA;7*?t=uy@X}1GWr!+0qqp_Cn176t4(dQ*
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Expected BASE-LINE for Embedded Controllers Paul E Bennett <Paul_E.Bennett@topmail.co.uk> - 2015-01-18 11:58 +0000
Re: Expected BASE-LINE for Embedded Controllers Matthias Trute <matthias.trute@gmail.com> - 2015-01-18 04:55 -0800
Re: Expected BASE-LINE for Embedded Controllers Mikael Nordman <oh2aun@gmail.com> - 2015-01-18 10:20 -0800
Re: Expected BASE-LINE for Embedded Controllers visualforth@rocketmail.com - 2015-01-20 10:45 -0800
Re: Expected BASE-LINE for Embedded Controllers "Elizabeth D. Rather" <erather@forth.com> - 2015-01-20 12:34 -1000
Re: Expected BASE-LINE for Embedded Controllers visualforth@rocketmail.com - 2015-01-20 16:40 -0800
Re: Expected BASE-LINE for Embedded Controllers Bernd Paysan <bernd.paysan@gmx.de> - 2015-01-18 22:27 +0100
Re: Expected BASE-LINE for Embedded Controllers "Elizabeth D. Rather" <erather@forth.com> - 2015-01-18 13:45 -1000
Re: Expected BASE-LINE for Embedded Controllers albert@spenarnc.xs4all.nl (Albert van der Horst) - 2015-01-19 18:22 +0000
Re: Expected BASE-LINE for Embedded Controllers Matthias Koch <matthias.koch@hot.uni-hannover.de> - 2015-01-19 12:06 +0100
Re: Expected BASE-LINE for Embedded Controllers albert@spenarnc.xs4all.nl (Albert van der Horst) - 2015-01-19 18:47 +0000
Re: Expected BASE-LINE for Embedded Controllers "Elizabeth D. Rather" <erather@forth.com> - 2015-01-19 11:22 -1000
Re: Expected BASE-LINE for Embedded Controllers albert@spenarnc.xs4all.nl (Albert van der Horst) - 2015-01-20 11:54 +0000
Re: Expected BASE-LINE for Embedded Controllers Matthias Koch <matthias.koch@hot.uni-hannover.de> - 2015-01-20 09:49 +0100
Re: Expected BASE-LINE for Embedded Controllers Bernd Paysan <bernd.paysan@gmx.de> - 2015-01-19 20:27 +0100
Re: Expected BASE-LINE for Embedded Controllers Paul Rubin <no.email@nospam.invalid> - 2015-01-20 11:04 -0800
Re: Expected BASE-LINE for Embedded Controllers Mark Wills <markwills1970@gmail.com> - 2015-01-20 11:33 -0800
Re: Expected BASE-LINE for Embedded Controllers Bernd Paysan <bernd.paysan@gmx.de> - 2015-01-20 23:30 +0100
Re: Expected BASE-LINE for Embedded Controllers Paul Rubin <no.email@nospam.invalid> - 2015-01-20 14:41 -0800
Re: Expected BASE-LINE for Embedded Controllers Bernd Paysan <bernd.paysan@gmx.de> - 2015-01-21 00:40 +0100
Re: Expected BASE-LINE for Embedded Controllers Paul Rubin <no.email@nospam.invalid> - 2015-01-20 15:53 -0800
Re: Expected BASE-LINE for Embedded Controllers Bernd Paysan <bernd.paysan@gmx.de> - 2015-01-21 01:41 +0100
Re: Expected BASE-LINE for Embedded Controllers "Elizabeth D. Rather" <erather@forth.com> - 2015-01-20 15:38 -1000
Re: Expected BASE-LINE for Embedded Controllers Paul Rubin <no.email@nospam.invalid> - 2015-01-22 11:08 -0800
Re: Expected BASE-LINE for Embedded Controllers albert@spenarnc.xs4all.nl (Albert van der Horst) - 2015-01-23 16:10 +0000
Re: Expected BASE-LINE for Embedded Controllers "Elizabeth D. Rather" <erather@forth.com> - 2015-01-20 15:25 -1000
Re: Expected BASE-LINE for Embedded Controllers albert@spenarnc.xs4all.nl (Albert van der Horst) - 2015-01-21 10:40 +0000
Re: Expected BASE-LINE for Embedded Controllers Matthias Koch <matthias.koch@hot.uni-hannover.de> - 2015-01-19 12:00 +0100
Re: Expected BASE-LINE for Embedded Controllers Mikael Nordman <oh2aun@gmail.com> - 2015-01-21 00:04 -0800
Re: Expected BASE-LINE for Embedded Controllers Matthias Koch <matthias.koch@hot.uni-hannover.de> - 2015-01-21 11:53 +0100
Re: Expected BASE-LINE for Embedded Controllers Mark Wills <markwills1970@gmail.com> - 2015-01-21 03:02 -0800
Re: Expected BASE-LINE for Embedded Controllers Mark Wills <markwills1970@gmail.com> - 2015-01-21 03:07 -0800
Re: Expected BASE-LINE for Embedded Controllers Bernd Paysan <bernd.paysan@gmx.de> - 2015-01-22 15:50 +0100
Re: Expected BASE-LINE for Embedded Controllers anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-01-22 16:39 +0000
Re: Expected BASE-LINE for Embedded Controllers Paul Rubin <no.email@nospam.invalid> - 2015-01-22 11:13 -0800
Re: Expected BASE-LINE for Embedded Controllers stephen@mpeforth.com (Stephen Pelc) - 2015-01-23 11:19 +0000
Re: Expected BASE-LINE for Embedded Controllers albert@spenarnc.xs4all.nl (Albert van der Horst) - 2015-01-23 16:12 +0000
Re: Expected BASE-LINE for Embedded Controllers anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-01-23 16:42 +0000
Re: Expected BASE-LINE for Embedded Controllers Paul Rubin <no.email@nospam.invalid> - 2015-01-24 01:53 -0800
Re: Expected BASE-LINE for Embedded Controllers Bernd Paysan <bernd.paysan@gmx.de> - 2015-01-24 15:33 +0100
Re: Expected BASE-LINE for Embedded Controllers anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-01-25 15:48 +0000
csiph-web