Programming Nucleus
Nucleus is a small statically typed language whose compiler emits Z80 machine code directly. This book develops the language through complete programs, following their effects and testing the rules at their boundaries.
The opening program introduces storage, routines and a command-line build. The following chapters develop scalar values, decisions, loops, fixed arrays, bounded strings, records, recoverable errors, safety traps and multipart programs. The final part covers target profiles, NOBJ, HEX, D8 source maps and Debug80.
Chapters
- Introduction
- Chapter 1: A First Program
- Chapter 2: Values and Constants
- Chapter 3: Expressions
- Chapter 4: Decisions
- Chapter 5: Loops
- Chapter 6: Fixed and Nested Arrays
- Chapter 7: Bounded Strings
- Chapter 8: Records and Aggregate Constants
- Chapter 9: Open Views and Text Construction
- Chapter 10: Routines and Calls
- Chapter 11: Aggregate Parameters and Results
- Chapter 12: Forwards and Recursion
- Chapter 13: Recoverable Errors and Traps
- Chapter 14: Source Parts and the System Boundary
- Chapter 15: Build, Run and Debug
Two ways through the language
Use this course to learn the language through programs. Use the Nucleus 0.1 Language Specification when you need the exact grammar, validity rule or runtime behaviour.