Newton FAQ

Answers to common questions regarding Apple’s Newton computing platform.



Part VII: Development

  1. Environments
    1. What are Apple’s tools to develop software for the Newton?
      1. Newton Toolkit
      2. Newton C++ Toolbox
    2. What tools let me develop directly on the Newton?
      1. Newton Dev Environment
      2. nsScribe
      3. ViewFrame
    3. Are there other programming languages for the Newton?
      1. NS Basic
      2. NewtCard
      3. Lisp
      4. Assembler
      5. Java
      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 & Documentation
      4. The Newton Bowels Project
      5. NewtonScript.org
    2. Where’s a good place to start?
  3. Sample Code
    1. Where can I find sample code?
    2. Where can I find a list of Apple’s sample code?
  4. Source Code
    1. Where can I find source code?

A. Environments

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

a. Newton Toolkit

Newton Toolkit (NTK) 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

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

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

Additional Driver Development Kits (DDKs) are available from 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 tools let me develop directly on the Newton?

a. Newton Dev Environment

Steve Weyer’s Newton Dev Environment (NDE) 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

Jonathan K. Millen (with the help of Phil Torrone) wrote a minimal Lisp interpreter that implemented a subset of Lisp language.

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

A collection of LittleLisp example code is also available.

As well, the source code for LittleLisp is available on UNNA.

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. Java

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 Newton Toolkit or to generate and pack a P-Class.

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

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

Also, the low level debuggers (Newtsbug and Hammer) only run on Mac OS. Both are apparently based on RDI (Remote Debug Interface), a standard defined by ARM.

Documentation for the C++ for the ARM Software Development Toolkit (1997) is still available online.

You can also use Newton C++ Toolkit with Basilisk II, 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?

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


B. Documentation

1. Where can I find documentation?

a. Apple Programming Reference

Apple provided several sources of information relating to the Newton platform and the associated APIs (Application Programming Interfaces) in a document called Find Info. Although the Newton Programmer’s Guide is listed as one of the primary sources of information, it is not necessarily the most complete or up to date.

Here is a simplified list of the documentation mentioned in the Find Info document.

b. Other Apple Documents
c. Other Articles & Documentation

There were many articles and papers written by Apple staff and third-party developers.

There is also a pile of documentation relating to the ARM processor. This is not very useful to the NewtonScript developer, but could be valuable when working with assembly language or C++.

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. NewtonScript.org is a collaborative project hosted on GitHub, collecting all manner of NewtonScript development tools, documentation, libraries, sample code, and other resources.

2. Where’s a good place to 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 from UNNA as part of the Development Examples and NewtonDev collections.

You can also find sample and source code as part of NewtonScript.org and The Newton Bowels Project.

See also: Where can I find source code?

2. Where can I find a list of Apple’s sample code?

A complete list of Newton 2.x OS Sample Code with descriptions was published on the Newton Inc. website. (1997)

Unfortunately, this copy of the information located in the Internet Archive does not have valid links to the source code itself.

See: Where can I find sample code?


D. Source Code

1. Where can I find source code?

Eckhart Köppen includes the source code for every version of every package he’s created.

Adam Tow includes source code for most of his Newton software.

Steve Weyer published source code for much of his popular Newton software, including Newt’s Cape, NewtVNC, Sloup, Waba, Crypto, and NewtDevEnv.

George Henne published the source code for his NS Basic and NewtCard development tools.

Mason Mark published the source code for his incredibly powerful Dash Board enhancement.

Simon Bell supplies source code for his Mail V and SimpleMail email clients, as well as his Sudoku game.

Source code for David Benn’s LittleLisp is available on UNNA.

André Chichak includes source code with his Fast Times clock setting utility.

See also: Where can I find sample code?