Your place is saved automatically on this browser.
Complete the following sequence for the final helper, recording what you observe rather than assuming that every run will match the text automatically.
- From the NextZXOS/NextBASIC prompt, launch .odin and identify the Odin Monitor.
- Create or load tut02.odn, use EDIT to enter the final source, and return to the Monitor.
- Enter S; use LS if you want to confirm the native source is on disk.
- Enter A. Proceed only when Odin reports successful assembly.
- Enter T. Confirm the labels start and clamp_to_15 resolve to addresses; with our tutorial origin, expect $6000 and $6009 respectively.
- Enter M $6000. Compare the first fifteen bytes with the printed reference sequence.
- Enter R. Inspect A and HL, and record whether A is $0F for the $13 input.
- Change only LD A,$13 to LD A,$07. Save, reassemble, inspect if needed, then run again. Expect A = $07.
- Restore the $13 version for the final saved lesson, assemble once more, save it, and export text with TS tut02.asm.
- Use LS to check for tut02.odn and tut02.asm. If desired, re-import the text in a later session using TL tut02.asm.
The file tut02.odn is Odin’s native working source. The file tut02.asm is the portable source listing. Keep both; the text file is especially useful when you later move the code to a version-controlled tree and a repeatable packaging toolchain.
Downloadable Odin examples for each stage
Use the accompanying Next Asset Lab Tutorial 2 Odin Source Pack ZIP. Its .ASM filenames deliberately use the short 8.3 format. If your installation handles case-insensitive filenames, upper- or lower-case spelling of these names is equivalent. Each file is a separate complete experiment, not a piece to append to another listing.
For each downloaded file, use Odin Monitor TL filename to import the plain-text listing (for example, TL T02DEC.ASM). Save as a native .ODN document if you want an Odin-native working copy. In the Monitor: S saves, A assembles, T shows symbols, M $6000 inspects bytes, R runs and shows registers. Test one example at a time and save the last good source before editing it.
Do not treat a successful A (assembly) or a printed expected result as evidence of a verified hardware result. Compare the actual Odin output with the lesson and record differences. In particular, note the installed Odin build, any errors and the actual bytes shown at $6000.
Test record
You do not have to run all six tests before understanding the lesson, but they are an excellent first example of testing boundary values. A routine may work for an ordinary input and fail at an edge. As the application grows, we will build this habit into its production test plan.
Download the source examples
Import one example at a time with Odin’s TL command. These are plain-text assembly sources; save a native ODN copy before editing if required.
