[NTLK] Geek Alert: NewtonOS

Aaron Rogers arog73 at yahoo.com
Wed Sep 3 15:28:49 EDT 2014


Wow - that is amazing news! How cool!

Sent from my iPhone

> On Sep 3, 2014, at 10:31 AM, Gerry Martinez <gerry.martinez at gmail.com> wrote:
> 
> AWESOME!
> 
> 
>> On Wed, Sep 3, 2014 at 12:16 PM, Matthias Melcher <mm at matthiasm.com> wrote:
>> 
>> 
>> Geek alert, part n of m.
>> 
>> I added soe funny code to the SVN repository today. The code itself is
>> completely independent of Einstein or NewtonOS, but it uses functions from
>> inside NewtonOS, which were automatically translated from ARM to pseudo-C.
>> 
>> But let me explain (since you made it all the way to this line).
>> 
>> .../src/Newt/NewtSim.cp is the main entry point of a new tiny program
>> named NewtSim which simply puts four strings into a queue, then retrieves
>> and prints them, then removes them one-by-one from the queue.
>> 
>> This sure sounds boring - there is a C++ template for doing just that - so
>> why do I write home about that?
>> 
>> Well, NewtSim uses part of the NewtonOS to achieve this. The NewtonOS
>> class is called "TSingleQContainer" and is implemented in the developer ROM
>> starting at 0x001E2BBC. It was originally written in C++ and compiled into
>> ARM code.
>> 
>> Einstein has a builtin assembly code Monitor which converts ARM code back
>> into Pseudo-C++. The resulting code is ugly and possibly inefficient, but
>> it can be compiled again (for example, into Intel code), and - and that is
>> the important part - works just like the original C++ code.
>> 
>> The translation for these six functions was fully automatic. The same
>> pseudo-C code now works for Einstein, just as it works for NewtSim. It's
>> the exact same source code, but it created entirely different machine code
>> for each case.
>> 
>> And since you have been following me for a while, you know that this means
>> we can translate the entire ROM into Pseudo-C and back into native code -
>> in theory at least. I will continue my mission, awaiting the obstacles
>> ahead. I am now attacking the TInterpreter class.
>> 
>> - 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/
> 
> 
> 
> -- 
> 
> 
> *Gerry Martinez, RN, CCRNTeam Coordinator, Pediatric Transport
> TeamChildren's Hospital of San Antonio*
> 
> 
> *210-704-3831 office210-316-2181 cell*
> 
> 
> 
> 
> 
> **Confidentiality Notice: This e-mail message is privileged and
> confidential and is intended for the sole use of the intended recipient(s).
> Any unauthorized review, use, disclosure, distribution or copying is
> prohibited.  If you are not the intended recipient, please contact the
> sender by replying to this e-mail and destroying all copies of this
> message**
> ----------------------------------------------------------------------
> 
> 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