[NTLK] Geek Alert: NewtonOS
Morgan Aldridge
morgant at makkintosshu.com
Thu Jul 10 13:00:38 EDT 2014
Agreed. Awesome and let us know if/how we can help!
Morgan
On Thursday, July 10, 2014, Steven Frank <stevenf at panic.com> wrote:
> Great work, Matthias. If there's an easy way for other programmers to
> pitch in without stepping on your toes please let us know.
>
> Steven, via iPhone
>
> > On Jul 10, 2014, at 4:47 AM, Matthias Melcher <mm at matthiasm.com
> <javascript:;>> wrote:
> >
> >
> > To illustrate, I have put some source code up on my site. It's just
> informational, and as the entire project, educational, without any
> commercial interest whatsoever (hint o the lawyers among us ;-)
> >
> > http://www.elektriktrick.com/NewtOS.html
> >
> > The first block is the ARM code as can be seen by looking at the
> Developer ROM files that came with the native developer kit. As you can
> see, Apple left the "C" symbols inside the code, allowing us to understand
> the basic functionality and even to guess the parameters given.
> >
> > It's seven command long or 28 bytes.
> >
> > The second, looong block is the translation that the Just-In-Time
> compiler generates. Using the JIT compiler, this code is not optimized
> because the compiler can not see the order of commands. But writing the
> code out like I did here, we can generate the emulated code at compile-time
> instead of run-time, and the compiler can optimize somewhat. (Note that
> these are "C" commands, which translate sometimes into many many assembly
> commands.)
> >
> > This is where I am at right now. I can automatically translate much of
> the code, and I will start doing this function by function for the Micro
> Kernel.
> >
> > The third block, 5 lines of "C" code, is a manual translation of the
> original code. Compiling this will result in 28 bytes or even less of Intel
> or whatever machine code. Now, considering that smart phones today run
> their CPUs at GHz rates, we can expect an increas in speed over the MP2100
> of a thousand fold.
> >
> > This also explains, why the emulated NewtonOS by now runs almost as fast
> as the original: for one original CPU command, the emulator must run a
> thousand or more new commands.
> >
> > Happy coding... .
> >
> > Matthias
> > ----------------------------------------------------------------------
> >
> > The NewtonTalk Mailing List http://newtontalk.net/
> > The Official Newton FAQ http://splorp.com/newton/faq/
> > The Newton Glossary http://splorp.com/newton/glossary/
> ----------------------------------------------------------------------
>
> The NewtonTalk Mailing List http://newtontalk.net/
> The Official Newton FAQ http://splorp.com/newton/faq/
> The Newton Glossary http://splorp.com/newton/glossary/
>
--
Morgan
---
http://makkintosshu.com/
http://seriesparts.com/
http://rikuwoiku.com/
http://unna.org/
More information about the NewtonTalk
mailing list