Newton FAQ


Part VII: Development

  1. Environments
    1. What are Apple’s tools to develop software on the Newton?
      1. Newton Toolkit (NTK)
      2. Newton C++ Toolbox (NCT)
    2. What are the solutions to develop directly on my Newton?
      1. Newton Dev Environment (NDE)
      2. nsScribe
      3. ViewFrame
    3. Are there other programming languages for the Newton?
      1. NS Basic
      2. NewtCard
      3. Lisp
      4. Assembler
      5. Is Java available on the Newton?
      6. C/C++ on other platforms
    4. Are there any other tools to develop Newton Packages?
  2. Documentation
    1. Where can I find documentation?
      1. Apple programming reference
      2. Other Apple documents
      3. Other articles and documentation
      4. The Newton Bowels Project
      5. NewtonScript.org
    2. Wow, that’s a huge list! Where do I start?
  3. Sample Code
    1. Where can I find sample code?
    2. Where can I find a complete listing of all the sample code?

A. Environments

1. What are Apple’s tools to develop software on the Newton?

a. Newton Toolkit (NTK)

Newton Toolkit allows you to develop programs in NewtonScript on Mac OS or Windows, installing them as packages onto a Newton device. There is also a cross-platform debugger for NewtonScript programs.

Installers and documentation for Newton Toolkit are available from Planet Newton’s Newton Programming Tools.

Newton Toolkit is also included as part of NewtonDev, an archive of essential development tools and documentation for classic Mac OS. NewtonDev also includes a bootable image for use with the Basilisk II emulator.

Be aware, that Newton Toolkit might not work in Classic under Mac OS X if it cannot find a serial port. To fix this problem, you might need to create or define a serial port using software.

To create a virtual serial port, you can try Stalker Software’s PortShare.

  1. Install “PortShare Demo”.
  2. Boot into Classic.
  3. Open the “PortShare Demo” control panel and create a new port.
  4. Start Newton Toolkit and select the port you created.

You can also use TCPSerial to simulate a serial port using a TCP/IP connection.

b. Newton C++ Toolbox (NCT)

The Newton C++ Toolbox is divided into several parts available at various places on the internet:

Installers and documentation for Newton Toolkit are available from Planet Newton’s Newton C++ Tools.

Additional Driver Development Kits (DDKs) are available on UNNA.

There is also the Lantern DDK for developing ethernet card drivers. It includes the Hammer and Newtsbug low level debuggers.

Newton C++ Toolbox requires the Macintosh Programmer’s Workshop (MPW), which is available from Macintosh Garden and as part of NewtonDev.

NewtonDev includes documentation, additional support files, and bug fixes for Newton C++ Toolbox.

2. What are the solutions to develop directly on my Newton?

a. Newton Dev Environment (NDE)

Steve Weyer’s Newton Dev Environment allows you to build packages directly on the Newton.

Here’s a comparison of Newton Toolkit and Newton Dev Environment provided by Paul Guyot.

b. nsScribe

Prism Research’s nsScribe allows you to execute NewtonScript code from the Notepad, the Assistant or Newton Works.

c. ViewFrame

Jason Harper’s ViewFrame is a very powerful tool for debugging directly on the Newton, inspect the Newton environment. However, it does not allow you to set breakpoints or to step.

3. Are there other programming languages for the Newton?

a. NS Basic

NS Basic is a complete implementation of the BASIC programming language, with extensions to take advantage of Newton OS.

Once a commercial application, George Henne has released NS Basic and its source code on GitHub.

b. NewtCard

NewtCard is a HyperCard-like environment for the Newton. It allows you to manage text and pictures as a collection of cards. Easily add text fields, check boxes, buttons, and other elements to the cards. Buttons can be scripted using NS Basic.

Once a commercial application, George Henne has released NewtCard and its source code on GitHub.

Archived NewtCard Demo files are also available.

c. Lisp

LittleLisp is a Lisp interpreter for the Newton developed by David Benn.

d. Assembler

Roger Milne succeeded in writing programs such as ModPlayer in assembly language on his PC with a GNU assembler. His process is documented in the article Writing Assembly for your Newton.

There is also the Compiler-Formerly-Known-As-ChARM (CFKAC) by Prism Research. It allows to compile and disassemble code directly on the Newton using nsScribe.

e. Is Java available on the Newton?

Sean Luke, Steve Weyer, and several other contributors implemented a subset of Java called Waba on the Newton platform. The software is currently in beta release, with binaries and source code available on Sean’s Waba for the Newton page.

f. C/C++ on other platforms

C++ and other compiled languages can basically be used in two ways: as native functions and for P-Classes which are used in drivers. The Newton C++ Toolbox is more than a compiler and a linker. It also includes tools to use this C++ code, either to convert a link output to a Native Module, a file used by NTK or to generate and pack a P-Class.

All the documentation required to make a tool to convert from link output to NTK is available, but no such tool exists. Therefore, with a C/C++ suite, you will have to use NCT anyway. The other solution is to use Roger Milne’s MakePKG tool.

The format of the P-Class encapsulated programs is unknown.

Finally, the low level debuggers (Newtsbug and Hammer) only run on Mac OS. Apparently, they are based on RDI, but nobody succeeded to write a compatible low level debugger.

There are several C/C++ compilers for ARM, here are just the most common ones:

You can also use Newton C++ Toolkit with Basilisk II.

Basilisk II is a 68k Mac OS emulator that runs on several platforms, including Mac OS X, Windows, BeOS, various flavours of UNIX with X11, and AmigaOS.

4. Are there any other tools to develop Newton Packages?

Pinehill Softworks’ AppGen lets you create simple data collection applications on your Newton and export the data to a PC using PineHill Mover.


B. Documentation

1. Where can I find documentation?

a. Apple programming reference

Apple published Find Info, a PDF listing information about where to locate Newton development documentation.

Although the Newton Programmers Guide (NPG) is the first source, it is not necessarily the most complete or up to date. There are a number of additional places you can search for information on the Newton Platform APIs.

Below is a simplified version of that document with links added.

b. Other Apple documents

Apple published additional books. These can be found on Newton Gurus’ sites.

c. Other articles and documentation

There were a lot of articles written by Apple and third-party developers. They were published in the Newton Technology Journal, in the PIE Developers and other journals.

You can also consult the documentation concerning the processor (ARMs). Please note that this is useless to the NewtonScript developer. It is only useful for assembly development and sometimes C++ development.

d. The Newton Bowels Project

The inner workings of Newton OS are not well documented. However, several developers were able to discover certain useful details while digging around the system in their attempts to interface with it. The Newton Bowels Project is a repository of documents, sample code, and other “thrill-seeking” tools.

e. NewtonScript.org

A one-stop shop for all things related to the NewtonScript programming language. This site is a collaborative project hosted on GitHub, collecting all manner of NewtonScript development tools, documentation, libraries, sample code, and other resources.

2. Wow, that’s a huge list! Where do I start?

Our advice is to start with the code examples that come with Steve Weyer’s Newton Dev Environment or Apple’s Development Examples.

You can also try Steve Weyer’s interactive NewtATut (Newt Application Tutorial) that shows how to develop a simple application in NewtonScript directly on your Newton device.


C. Sample Code

1. Where can I find sample code?

Most of the sample code and developer examples distributed by Apple are available on UNNA as part of the Development Examples and NewtonDev collections.

See also: The Newton Bowels Project and NewtonScript.org

2. Where can I find a complete listing of all the sample code?

A complete list of Newton 2.x OS Sample Code with descriptions was published on the Newton Inc. website in 1997. Unfortunately, this copy of the information from the Internet Archive does not have valid links to the source code itself.

See also: Where can I find sample code?