Your place is saved automatically on this browser.
Before writing anything new, make sure the previous working routine still makes sense:
LD places a value into a register. ADD performs arithmetic and updates the appropriate flags. LD HL,$6000 puts an address in HL, which made Odin’s memory view particularly useful. RET transfers control back to whoever called the routine — Odin in our simple test.
You should also remember three separate stages: source text is saved on storage; the assembler translates that source into machine-code bytes in RAM; and the CPU executes the bytes. A successful assembly is necessary, but does not by itself prove that the programme is safe or correct.
How we will work in Odin Dev.2k
Use the same verified commands from Tutorial 1. From the NextZXOS/NextBASIC prompt, enter .odin. At the Odin Monitor, enter NEW tut02.odn to create a new native source document. Use the physical EDIT key to switch to the full-screen Editor, type the current example, and press EDIT again to return to the Monitor.
At the Monitor, the working sequence is: S to save the native source; A to assemble; T to inspect symbols; M $6000 to inspect bytes; R to run and view the register/flag screen; and TS tut02.asm to export a portable text version. L tut02.odn reloads native source; TL tut02.asm re-imports plain text. LS helps confirm the files exist.
Keep each exercise as a separate complete programme. Replace the earlier listing with the next listing rather than appending several independent start: labels to one source. Save before each run; assemble again after every change; do not press R after an assembly error. The examples and expected $6000 addresses assume the same Odin assembly setup verified in Tutorial 1. If your symbol table shows a different entry address, use the actual value Odin reports instead of assuming $6000.
