Re: [NTLK] C++ coding for the Newt

From: Paul Guyot (pguyot_at_kallisys.net)
Date: Fri Sep 20 2002 - 07:13:10 PDT


>Thanks for your quick answers Paul. I tought it will be a bit more
>simple ... hum ... is NCT available for x86, or only for Mac ?

Yes. You can use an emulator like Basilisk II though.

> > >4. How can I create a package holding my newly created application ?
>>
>> a/ use NTK
>> b/ write something like NTK.
>
>I saw on roger.trideja.com/newton/newtonasm.html, a tool called MakePKG,
>maybe I could use that to create my package ?

Oh yeah, Roger Milne's page.
Yes, you can use that. If your linker output the proper thing, that
is. It will take your code and stuff it into a Newton Package (hence
providing the minimum NewtonScript part).

BTW, Roger says that three parameters are passed to R1-R3.
This is wrong.
The four first parameters are passed to R0-R3 and the next ones are
passed on the stack. First parameter of functions called from
NewtonScript is the reference of the receiver frame. Next parameters
are NewtonScript parameters (as references). And there is a maximum I
don't recall of.
Result shall be put in R0 as a reference. NewtonScript native
functions should always return something (a good idea is to return
0x2, aka NIL).

> > PPPS: Have you ever tried to compile gcc for cross-compilation? ;)
>
>Actually not, but from what I saw it's not that easy

Indeed. Last time I tried on LinuxPPC, I had to get Linux kernel
source code then patches for ARM and finally try to compile gcc with
that. I got the C part but I never succeeded to compile the C++ part.
I finally gave up and used gcc on NetBSD (NetBSD and FreeBSD have
packages/ports for gcc arm-cross compilers).

> > PPPPS: tu connais Newton-FR?
>
>ha non ... comment puis m'y abonner ?

http://ngfun.free.fr/newtonfr/

Paul

-- 
NPDS: http://newton.kallisys.net:8080/
Apache: http://www.kallisys.com/
-- 
Read the List FAQ/Etiquette: http://www.newtontalk.net/faq.html
Read the Newton FAQ: http://www.chuma.org/newton/faq/
This is the NewtonTalk mailing list - http://www.newtontalk.net/


This archive was generated by hypermail 2.1.5 : Mon May 26 2003 - 12:59:22 PDT