In SX Microcontrollers, SX/B Compiler and SX-Key Tool, davehein wrote: [quote="Mike Green"] @David - Have you looked at Bill Henning's LMM (Large Memory Model)? This is a special tiny interpreter that reads assembly instructions from HUB memory into a cog for execution one at a time. It runs slower than straight assembly, but much faster than Spin and has all 32K of the Hub memory to hold the program. It's used as the basis for the several C compilers (Catalina and ImageCraft's).[/quote]Mike, I looked at the information on the Large Memory Model, and it was very interesting. However, it seems like there is a significant loss in efficiency due to executing one instruction at a time. The cycle overhead is from 4x to 8x depending on how much the loop is unrolled. Also, all of the jump instructions have to be fully implemented by the interpreter. Has anybody looked into an overlay scheme? This method works by having a static portion of the code and several dynamically-loaded portions. A new dynamic portion is loaded into memory whenever a function is called in that portion. If done properly, this can efficiently execute large programs. Of course, if it is not done correctly it can be very inefficient. I recall an overlay program I once wrote on a PDP-15 that used DECtape as the mass storage device. It was very entertaining watching the DECtape spin back and forth as the program needed new overlays. :p Dave ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=2&m=373927#m387777 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2009 (http://www.dotNetBB.com)