Repository navigation
The first release of newtc and newtdump as downloads, for macOS (one universal binary for Apple silicon and Intel) and Linux (x64 and arm64). VSNewt 0.4.0, the VS Code extension for NewtonScript, bundles the same newtc.
newtc 0.4.0
A NewtonScript compiler, interpreter and debugger, built on the Newton OS's own object system and the 2.1 ROM's NewtonScript objects. newtc -h lists every option.
Write and build Newton software
- Compile and run NewtonScript (
-script file.ns,-s "..."), with error messages that name the file and line.Load("file.ns")splits a program into several files (-Iadds folders to look in). - Build packages (
-opkg).-build app.nsbuilds an app the NTK way: setnewtAppName,newtAppIcon,newt.theFormand whatever else differs from the defaults, then useAddStepFormandStepDeclareas in NTK. - The NewtonOS 2.1 platform is built in: NTK's names for protos and constants (
protoFloatNGo,vjParentCenterH,vfPen(2), ...) just work.-platformuses one of NTK's platform files instead. - Icons and pictures from PNG files:
MakeIconFromPNG,MakeBitmapFromPNG(black and white or 16 grays, NTK's mask choices). - Read and write NSOF (
-nsof,-onsof,ReadStreamFile), print objects (-print), and write a book part as a PDF (-opdf).
Look inside existing packages
-pkg app.pkg -decompileprints a package with its functions as NewtonScript source.-odecompilewrites that source to a file, with a debug map next to it, so the original package can be debugged in that source.-runinstalls a package and opens its app in a window, drawn as on a Newton.
Debug
- In VS Code (with VSNewt) through the Debug Adapter Protocol (
-dap,-dap-server <port>): breakpoints, stepping, the call stack, variables, the Debug Console, and exceptions. - On Einstein or a MessagePad: newtc runs and debugs your program, or an existing package, on the Newton itself, over Einstein's network serial port (
tcp) or a serial cable (serial:<device>). It uploads its own debug agent and debug tools.-connect-package newtc.pkgwrites a small app that replaces NTK's Toolkit app, so the Newton needs nothing from NTK. newtc keeps running between sessions and keeps the Newton connected. An unchanged package isn't uploaded again. -ntk <target>is a terminal Inspector, like NTK's: type NewtonScript, and it runs on the Newton.
newtdump 0.4.0
Reads a Newton's ROM and the memory of its PCMCIA cards over the Docking Protocol. Nothing has to be installed on the Newton: start a connection there (Dock or Connection, then "Connect").
newtdump rom: the ROM (8 MB).newtdump card [<socket>]: a card's CIS (decoded: devices and size, name, maker), its attribute memory and its common memory. ROM cards that keep their CIS in common memory work too.- New:
--pccardalso writescard<n>.pccard, the card as a file that Einstein can insert.newtdump pccardmakes one from an earlier run's files, without a Newton. newtdump phys <address> <size>: any physical memory.newtdump info: the Newton and its sockets.- A dropped connection is picked up again where it stopped, and
--resumecontinues an interrupted run. Blocks that are all the same byte travel as one number, so empty memory reads quickly even at 38400 bps. - Targets:
--target tcp(Einstein's network serial port),--target pty(Einstein's BasiliskII pseudo terminal),--target serial:<device> --baud <bps>(a real Newton).
Downloads
| File | System |
|---|---|
newtc-darwin-universal.tar.gz |
macOS 13 (Ventura) or later, Apple silicon and Intel |
newtc-linux-x64.tar.gz |
Linux on x86-64 (glibc 2.35 or later, e.g. Ubuntu 22.04) |
newtc-linux-arm64.tar.gz |
Linux on ARM64 (glibc 2.35 or later) |
Each archive holds newtc, newtdump, and the framework's ReadMe. SHA256SUMS.txt has the checksums.
- macOS: the binaries are signed ad hoc only, so macOS blocks a downloaded copy at first. Unpack the archive and run
xattr -d com.apple.quarantine newtc newtdumpin its folder, or allow them in System Settings, Privacy & Security. - Linux: newtc needs the X11 libraries a desktop has (libX11, libXft, fontconfig). Newton views drawn in windows can look slightly different from macOS (some patterns, inverted text).
Not yet
- Windows: newtc and newtdump build there, but they can't connect to a Newton yet, so there is no Windows download.
- Debugging is developed and tested on macOS. Linux passes newtc's tests except for five that check how views draw.