13 NES BASIC PROGRAMMING GUIDE
Three complete projects to make your own
Project 1 is the name greeter in Chapter 5. Type its exact five lines and RUN. Try both NES USER and an empty answer. N$ holds input, A$ holds the greeting, + joins text, and the final IF notices empty input. Add a second independent numeric variable and PRINT it; never assign a number directly to A$. Save the finished version as GREETER. After a cold start, LOAD "GREETER" and RUN.
Project 2 is the sum in Chapter 7. Its output TOTAL=15 is an easy check of the loop. Change the limit from 5 to 10 and reason about the result before running. Try a descending loop with a negative STEP. Keep arithmetic within -32768…32767. A REM comment on a separate line can explain which variable is the running total. Save a working version as SUM before experimenting further.
Project 3 is the ship controller in Chapter 11. Its expected positions are 80 and 88. Draw art 8 in EDITSPR, KEEP it, then change line 20's art argument from 0 to 8. Save the project as SHIP. Load it after reset to check source and artwork together. Keep MOVE coordinates in range if you extend it. For smooth motion, add separate held-bit tests and explicit bounds before updating X; the original simple listing deliberately avoids accidental coordinate overflow.
The frame/diagonal and melody listings are additional complete samples. The input code diagnostic is a useful tool when you change controller mappings. All eight complete listings in this book have matching .bas source fixtures and executed ROM evidence. Short code fragments in prose/reference illustrate syntax and are not claimed to be standalone numbered programs.