[NTLK] Geek Alert: NewtonOS
Matthias Melcher
mm at matthiasm.com
Thu Jul 10 18:48:05 EDT 2014
Thanks for the nice remarks and the offer. I will try to put some tools online that everyone can use to create code and link it into Einstein. I'll keep you posted.
On Jul 10, 2014, at 7:00 PM, Morgan Aldridge <morgant at makkintosshu.com> wrote:
> 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/
> ----------------------------------------------------------------------
>
> The NewtonTalk Mailing List http://newtontalk.net/
> The Official Newton FAQ http://splorp.com/newton/faq/
> The Newton Glossary http://splorp.com/newton/glossary/
More information about the NewtonTalk
mailing list