Learning Challenge - 6502 Assembly: Day 3

iPlaying around with the Merlin assembler and the built-in Mini-Assembler on the Apple. I have to say I am impressed at how machine-language friendly the Apple ][ is, as the machine ships with a full-featured monitor along with a basic assembler for dropping in mnemonics into memory and getting the op-codes out. Compared with some of the other assemblers that I have used it's a joy to use.

Assembly language for displaying APPLE on the screen

Using the mini assembler via "Linapple" is relatively simple. Use the standard CALL -151 to get into the monitor and then (on the 65c02-based processors) just type ! to get to the mini-assembler. Enter the memory address (300h, or just 300: ) and you're off to the races.

This chapter introduces the JSR (Jump SubRoutine) instruction, as well as RTS (ReTurn from Subroutine), LDA (LoaD accumulator) and STA (STore Accumulator). It also introduced the difference between absolute mode addressing ($05) and immediate mode addressing (#$05). Immediate mode is akin to putting in a constant (you don't need to go to memory to put in the address). Absolute mode addresses an actual location in memory.

Writing 'APPLE' on the screen.

And the results of running this routine where it uses the routines of the Apple to display the memory locations $700-$704).

Baby steps, yes, but most other books leave you abstractly incrementing and decrementing the accumulator by Chapter 3. Assuming you're not still learning binary arithmetic.