Calc-U-1600 Help 6 Presets Presets for Calc-U-1600
Chapter 6 · Presets
Presets for Calc-U-1600
What a preset is, its header, its steps, waiting, expect: and startup
presets are the family's; the shared part of this chapter
describes them. This part covers what a preset of Calc-U-1600 holds: its
models and hardware, its programs, its steps, the examples and the
startup presets. The full list of the product's keys is
Preset sections.
The file name ends with the model: .pc1500, .pc1500a or .pc1600.
The smallest preset
format-version: 2
model: PC-1500A
keys:
- key: cl
- type: NEW0
- key: mode
- type: PRINT "HELLO"
key: presses keys by their IDs, one after the other (- key: shift up up); type: types a line, then ENTER. Everything after type: is typed
as written, # and quotes included, so a # in BASIC (PRINT #1) stays.
A type: text can also take the computer's date and time, typed as
digits when the step runs: {{ year }}, {{ month }}, {{ day }},
{{ hour }}, {{ minute }} and {{ second }}. :0N pads a value
with zeros to N digits, so - type: D$="{{ day:02 }}.{{ month:02 }}.{{ year }}"
types D$="01.12.2026" on 1 December 2026. The layout is always the
one the preset writes, never the computer's own date format, so a
program reading it gets the same on every computer.
Adding hardware
format-version: 2
model: PC-1600:new # PC-1500[:A01|A03|A04] | PC-1500A | PC-1600[:new|old]
printer: CE-1600P:new # CE-150 (all models) | CE-1600P[:new|old] (PC-1600)
slot-1: { name: CE-1600M } # a bundled or saved module, by name
- Names are Sharp's, with the hyphen, in any case:
CE-1600P,ce-1600p. - By name or by file:
slot-1: { name: … }names a module,slot-1: { file: … }a.module.yamlfile. Paths are relative to the preset;~/is your home folder. - PC-1500 and PC-1500A: there is only
slot-1:. - CE-158:
interface: CE-158(not together with the CE-1600P). - A folder as a drive (PC-1600):
host-drive: { folder: … }(The host drive). - Nothing plugged in: leave the key out.
A floppy disk and a cassette are steps, since they change while the computer runs (below).
Loading a BASIC program
format-version: 2
model: PC-1600
keys:
- key: mode
- type: NEW0
program:
file: hanoi.bas # converted and written straight into memory
keys:
- key: mode
- type: RUN
-
Before a
program:section, leave the computer in PRO mode afterNEW0, as above, and switch to RUN mode afterwards. For a PC-1500 program on the PC-1600, typeMODE1first; for a program module,INIT"S1:","P"andTITLE"S1:". The loader follows MODE andTITLE, as Load BASIC Program does. -
file:works like File ▸ Load BASIC Program… (Loading a BASIC program) and is fast: the file is a.baslisting, a tokenized.bbin, or a cassette WAV. What the file holds decides how it is loaded, as when you drop it on the window. -
text: |holds the listing in the preset itself and loads it asfile:loads a.basfile. Empty lines and lines that start with#are left out:program: text: | 10 PRINT "HELLO" 20 GOTO 10
Machine code
program:
file: memtest_bank.bin
address: &7C01 # needed if the file has no header
# length: &200 # load only part of the file
- Numbers:
&,0xor$makes a number hex; without one it is decimal. This holds for every number in a preset. - Files with a header (PC-1600, CE-158) bring their own address.
- PC-1600: the loader places the code the way Load Machine Code does,
by MODE,
TITLEand the address: in MODE 1address:is an LH5803 address. Switch MODE orTITLEin akeys:section first. - Auto-run: if the header has an auto-run address, the preset types
CALLfor you and waits until the code returns.
More on machine code is in Machine-code programs.
Media steps
| Step | What it does |
|---|---|
- floppy: { name: Formatted } |
Puts a disk into the CE-1600F (PC-1600 with the CE-1600P), by name: or file:, with side: 0 or 1 (default 0) |
- cassette: { file: mytape.cassette.yaml } |
Puts a cassette into the cassette recorder of the CE-150 (PC-1500, PC-1500A) or CE-1600P, by name: or file: |
- eject: floppy / - eject: cassette |
Takes the disk or the cassette out |
- saveas: { place: slot-1, as: live, name: My module } |
Name & Save the module in slot 1 into your save folder. cassette saves the cassette; slot-2 and floppy are PC-1600 only |
- saveas: { place: slot-1, as: template, name: My module } |
The same, saved as a template |
- saveas: { place: slot-1, as: live, protected: true, name: My ROM } |
The same, with the module's write-protect switch on (the CE-161; not a disk) |
- saveas: { place: slot-2, as: template, file: Module.module.yaml } |
Saves to that file, next to the preset (.module.yaml for a module, .floppy.yaml for place: floppy); the name is the file name |
A preset that prepares a module and a disk and saves both as templates next to itself, and the preset that uses them: make_diskworks_media.pc1600 and DiskWorks.pc1600.
Calc-U-1600's steps
Besides the family's steps:
| Step | What it does |
|---|---|
- expect: 11834 |
Stops the preset with an error unless one line of the display contains that text. A backslash is written \\, a character outside ASCII \xHH (its code); between slashes (/ERROR 1\b/) the text is a regular expression |
- sync-clock: |
Sets the computer's clock from your computer's. Put it last: a preset runs at full speed, so the clock runs ahead |
The debugger steps of the family (pause:, step:, resume:) are not
available on the Sharp models.
Key IDs for key:: a single letter, digit, or + - * / = ( ) .;
enter, space, cl, mode, shift, def, sml, rcl, rsv,
off, up, down, left, right, f1–f6, and on (or break);
on the PC-1600 also ctrl, kbii and bs.
The examples
The presets Calc-U-1600 comes with are under File ▸ Examples, by name, in three groups: BASIC (Hanoi, the Towers of Hanoi), Plotter (Lissajous on the CE-150 of a PC-1500A; on the CE-1600P Lissajous, Rectangles in four pens, a globe, a biorhythm chart and a character chart) and Machine code (a memory test of the PC-1500A). Every example, also those not bundled, is in the examples folder of the source repository; download it to open the files with File ▸ Load Preset….
Startup presets
Settings ▸ Startup presets sets one preset per model (the keys
[preset] PC-1500, [preset] PC-1500A, [preset] PC-1600,
Settings). Each model's list offers the startup presets
the product comes with, each by its name; Choose…
takes a preset file of your own (in the browser, with the files it
names; Startup presets). A model switch starts with no modules and no peripherals, so a
startup preset is how a model gets its usual hardware.
The PC-1600's bundled startup preset:
- plugs in the CE-1600P, with the bundled Formatted disk in the drive, a CE-1600M in slot 1 and a CE-1601M in slot 2;
- formats and splits the CE-1601M as a RAM disk (
INIT"S2:","F",INIT"S2:","M"); - sets up
COM1:at 9600 baud, 8 bits, no parity, 1 stop bit and no handshake (SETCOM "COM1:",9600,8,N,1,N,N, thenOUTSTAT,SNDSTAT "COM1:",28,RCVSTAT "COM1:",28andINIT "COM1:",8192; COM ports explains them); - puts
SAVE"COM1:"@andLOAD"COM1:"@on the F1 and F2 keys; - shows the free memory, then sets the clock.
This is what it leaves on the LCD:

Help built from Calc-U-1600-help.zip 0.9.1, the help of the Calc-U-1600 0.9.1 release.