This project implements an HP‑41 Turtle Graphics program inspired by Marcel Sutter's Programmieren mit hochauflösender Grafik [1]. Jens Kirchhoff adapted the idea in C [2], and Peter Hess ported it to the HP‑41 with interactive parameter prompts. This implementation builds on Hess's version with an updated user interface and roughly 1.5× faster execution.
Sutter converted Logo examples into BASIC; the Logo routine used here is, for example:
TO GRAPHICS :COUNT :SIDE :ANGLE :GAIN
REPEAT :COUNT [
FORWARD :SIDE LEFT :ANGLE
MAKE 'SIDE SUM :SIDE :GAIN
]
END
Run the example in JSLogo and add these lines to demo it:
CLEARSCREEN
GRAPHICS 200 30 119 3
To use this program on an HP‑41, you need either:
- A real plotter (for example, an HP‑7470A Option 003 with an HP‑IL interface) or
- A PIL‑Box and the pyILPER application.
A compatible HP‑IL module (HP 82160A) is also required. In principle, the program should work with plotters using HP‑IB or RS‑232‑C interfaces; these configurations were not tested due to unavailable interface modules (82169A and 82164A).
If you have a Systemyde 41CL calculator, the program runs reasonably fast in TURBO50 mode. On other Series‑41 calculators, expect slower performance.
These instructions assume pyILPER with a PIL‑Box.
- Mount the LIF image
bin/turtle.datinpyILPER. - Load the program into your HP‑41 calculator:
"TURTLE"XEQ"READP" - Select your plotter as the default output device (e.g.,
3XEQ"SELECT"). - Initialize parameters and settings:
XEQ"TURTLE". - Switch to USER mode and ensure the top row of keys has no conflicting assignments.
- Press the
LNkey (XEQE) to plot the default graphic. - Enter the number of lines (e.g.,
200) and press[R/S]. If no number is entered, the default is used. - After the drawing completes, change parameters
L0,dL,PHI0,dPHIwithXEQA–D. Enter a value and press[R/S]to apply it; if no value is entered, the parameter remains unchanged. - Return to step 6.
Changing parameters — especially dPHI — produces many variations. Example parameter sets:
-
L0=1000,dL=60,PHI0=90,dPHI=117,#Lines=80(red pen)
L0=1050,dL=60,PHI0=85,dPHI=117,#Lines=80(blue pen)

Two main optimizations were applied to improve speed over Hess's original:
- Use
P-Rto convert polar to rectangular coordinates. - Use
DSEto control the drawing loop.
Note about DSE: the decrement register is typically formatted as _iiiii.fffcc_, where iiii is the current counter, fff is the test value, and cc is the increment/decrement. If you decrement an integer (with fff and cc equal to zero), DSE still decrements the register by 1 — allowing a simple countdown.
- Sutter, Marcel (1984). Programmieren mit hochauflösender Grafik. Mikro+Kleincomputer, Informa Verlag.
- Kirchhoff, Jens. "Stiftplot‑Kunstfigur HP7550", YouTube (uploaded by jenskirchhoff8139), Oct 10, 2021. https://youtu.be/at0Kr-1IIGc





