How many instructions?
Humanoido
Posts: 5,770
The EEPROM (Program) Size for the BASIC Stamp BS2px is:
8 x 2 KBytes; which holds ~4,000 PBASIC instructions according
to Parallax specs. How many instructions can the stock Propeller
chip hold in internal RAM? (for SPIN and for Assembly)
8 x 2 KBytes; which holds ~4,000 PBASIC instructions according
to Parallax specs. How many instructions can the stock Propeller
chip hold in internal RAM? (for SPIN and for Assembly)
Comments
Between 32768 (1 byte) and 6553 (5 bytes load 32 bit constant)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Visit some of my articles at Propeller Wiki:
MATH on the propeller propeller.wikispaces.com/MATH
pPropQL: propeller.wikispaces.com/pPropQL
pPropQL020: propeller.wikispaces.com/pPropQL020
OMU for the pPropQL/020 propeller.wikispaces.com/OMU
pPropellerSim - A propeller simulator for ASM development sourceforge.net/projects/ppropellersim
~8176 for Assembly.
Spin depends on what constitutes an instruction I guess. ~20,000 for Spin based on an average "instruction" of about 2.5 bytes.
The answers actually pose more questions really as you run into issues of object headers, the binary header, stack space and variable space..
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You only ever need two tools in life. If it moves and it shouldn't use Duct Tape. If it does not move and it should use WD40.
Thanks for your calculations!
I will use this as the basis of a new Propeller project.
humanoido
With a little boot-loader you can load PASM code into the COGs and then reuse the whole HUB-RAM for additional SPIN/PASM-code. Most times drivers are in PASM. Let's say you have 5 COGs pre-loaded running in PASM : 5x512 = 2560
And on top of that you'd have the ~20,000 SPIN-instructions xor ~8,000 addidional PASM instructions.
So 32768 - 128 = 32640 instructions in HUB.
Let's call it 32000 to allow for any other house keeping.
Then 7 * 496 = 3472 PASM instructions purring away in parallel.
Now I'm not being totally serious here as Zog probably needs more instruction bytes to do the same work as Spin and is probably going to be slower.
BUT this is my chance, Humanoido, to remind you that soon you have to add C++ to the ever growing list of languages the Prop can be programmed in[noparse]:)[/noparse]
Perhaps also another entry for C compiled with GCC for Zog as the GCC dialect can have some differences to standard C.
GCC also supports some other languages: Objective-C, Java, Fortran, and Ada. Although I'm not sure if I will ever be able to get those working with Zog on the Propeller.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
squeezing out more code capability! As you know, any technique to gain even one more
code statement out of the prop chip is going to significantly make a big difference in this
project. Thank you for being part of it by helping!
humanoido
One way to use that would be a OS which reads a .INI-file where all needed drivers are listed for a program. So the OS can prepare everything before loading the main-program. In the main program only a little library is needed which finds out where the parameter areas of the different drivers are.
Another way is a standalone library for programs where the lib takes care of loading the drivers by name. This needs a little more HUB-RAM, as a load-buffer is needed and the lib is propably a bit bigger. But it's more interesting for standalone-systems than having a OS.
The other advantage could be that the community could write programs where nobody hase to take care of driver-setup ... is the pin used for SD card correctly set? .. is the keyboard attached to the same pin as in my setup? ... Each propeller setup has a set of drivers in upper EEPROM which works. So, each program that uses these drivers will work - even if the setup of developers propeller system was completely different.
humanoido