Your place is saved automatically on this browser.
Three different places where you can type commands
At the start of this tutorial it is very easy to type the right command in the wrong place. That happened during our own first test, and it is worth turning into a lesson rather than treating it as a mistake to forget.
On the ZX Spectrum Next we are dealing with three different working environments. They can look similar because all of them accept keyboard input, but they understand different commands.
A useful habit is to pause before typing a command and ask: 'Which environment am I in?' This becomes second nature after a while.
Launch Odin
At the NextZXOS / NextBASIC command prompt, enter:
On the machine used for this project, the startup banner identifies the program as Odin Version Dev.2k and shows Copyright 2021. This matters because Odin has existed in different development versions, and we do not want to teach commands that belong to a different build.
Check the Monitor commands
In the Odin Monitor, the H command exposes the following commands on this installation:
A
L <filename>
NEW <filename>
S <filename>
SA
T
TL <filename>
TS <filename>
R
INFO
LS
CD
MD
M
REMOUNTWe will not assume that we understand every one of these commands merely because it appears in the help list. We will verify commands as we use them.
Installed Odin guides
The development machine contains odin.gde, odin-editor.gde and odin-monitor.gde. There is no separate odin-debugger.gde visible. However, running a program with R does display a register, flags and memory inspection screen, so this build clearly contains debugging or inspection behaviour even without a separate debugger guide file.
A safe Odin working routine
Before we move into processor theory, establish one practical habit. When experimenting in Odin, use the same small cycle repeatedly:
Saving before running is a simple safety habit. If experimental code locks the machine or forces a reboot, you are less likely to lose the source you just typed.
NEW creates a document; S makes the on-disk file
When we entered NEW tut01.odn inside Odin, Odin created a new source document for us to edit. The important practical point is that editing an in-memory document and having a saved file on the SD card are not the same thing.
The S command writes the current native Odin source to storage. LS then lets us confirm that the file is present. This distinction is similar to editing a document in a modern application before pressing Save.
Native Odin source and ordinary text are different
L loads the native Odin source. TL loads ordinary text and converts it into Odin's source representation. TS exports the current source as ordinary text.
If a command appears not to work
First check which environment you are in. NEW, A, S, T, M, R, TL and TS are Odin Monitor commands. .odin is entered at the NextZXOS / NextBASIC command prompt. The physical EDIT key switches between Odin's Monitor and Editor.
Typing the correct command at the wrong prompt is one of the easiest beginner mistakes to make, and it tells us nothing bad about your understanding of assembly. Always identify the environment before diagnosing a command.
