Friday, March 1, 2024

ALPP -- Assembly Language Programming Primer -- Title Page and Index

Assembly Language Primer

Joel Matthew Rees

Amagasaki, Japan, 2024

Copyright 2024 Joel Matthew Rees

All rights reserved, except as explicitly specified:

******

This work, including all expository text, graphics, and code,
may be used for personal, individual study.
It may also be used for individual, private hobby purposes.
All other uses, including classroom, require permission.

Certain example code will specify additional permissions, for those examples only.

******

An introduction to assembly language programming under the split stack discipline, or the paradigm of maintaining dynamic parameters on a separate stack, accompanied by a record of my research on a certain project requiring assembly language.

Initially presenting the 6800, 6801, 6809, and 68000 in parallel.

Preface

  1. (Why am I writing this? etc.)

Basics (01)

  1. Accumulating Integer Results in the M6809, 6800, 6801, and M68000
  2. Getting a simulator for the 6800 and 6809
  3. Running code on the 6800 and 6809
  4. Getting a Simulator for the 6801 and Running Code on It  
  5. Getting a Simulator for the 68000 and Running Code on It (Hatari)
  6. Global Constants on the 6800, 6801, 6809, and 68000
  7. Working in Binary, Hexadecimal, Etc.: bc, gforth, and Other Options  
  8. Simple Lists on the 6800, 6801, 6809, and 68000 (array of bytes)
  9. Sequentially Accessing a Simple List on the 6800, 6801, 6809, and 68000
  10. Hello, World! (Not Yet on the Beach) -- 6800, 6801, 6809 (strings and getting output)
  11. Hello, World! (Not Yet on the Beach) -- 68000
  12. Hello, World! (Not Yet on the Beach) -- 6801 (EXORsim6801)  
  13. Hello, Bugs! Debugging Example, 6800 and 6809
  14. Doing This with Other Processors 

Beachhead (02)

  1. Foothold! (Split Stacks ... barely on the Beach) -- 6800 (strings and output, split stack)
  2. Foothold! (Split Stacks ... barely on the Beach) -- 6801  
  3. Foothold! (Split Stacks ... barely on the Beach) -- 6809
  4. Foothold! (Split Stacks ... barely on the Beach) -- 68000
  5. Introduction to Byte Arithmetic on the 6800, 6801, and 6809
  6. Introduction to Byte Arithmetic on the 68000
  7. A Note on Byte Widening and Scratch Registers on the 6800, 6801, and 6809  
  8. On the Beach with Parameters -- 16-bit Arithmetic on the 6800 (more split stack) 
  9. On the Beach with Parameters -- 16-bit Arithmetic on the 6801  
  10. On the Beach with Parameters -- 16-bit Arithmetic on the 6809
  11. On the Beach with Parameters -- 16-bit Arithmetic on the 6809 with Direct Page Moved
  12. On the Beach with Parameters -- 16/32-bit Arithmetic on the 68000
  13. Balancing on the Beach -- Comparing Pointers, Checking the Stack 
  14. One Foot on the Beach, One in the Surf -- Frame Pointer for Split Stack (incomplete)
  15. Switching Feet on the Beach -- Ephemeral Frame Pointer for Split Stack (incomplete)
  16. One Foot on One Beach, One Foot on Another -- Stack Frame for Single Stack: 68000 and 6809
  17. Unsteady Footing -- Stack Frame for Single Stack: 6801 (not recommended for code)
  18. Ascending the Wrong Island -- Single-stack Stack Frame Example: 68000 (and split stack frames)
  19. Ascending the Wrong Island -- Single-stack Stack Frame Example: 6809 (and split stack frames)
  20. Some Address Math for the 6800 (no discipline)
  21. Some Address Math for the 6801
  22. Some Address Math for the 6809  
  23. Synthesizing Multibyte NEG on 6809 (Applies to 6800 and 6801)
  24. Some Address Math for the 68000
  25. Ascending the Wrong Island -- Single-stack Stack Frame Example: 6801  
  26. Walking the Pontoons -- Split-stack Stack Frame Example: 6801
  27. Ascending the Wrong Island -- Single-stack Stack Frame Example: 6800
  28. Walking the Pontoons -- Split-stack Stack Frame Example: 6800  
  29. Putting the Wrong Island in the Rear-view Mirror -- Single-stack No Frame Example: 6800
  30. Ascending the Right Island -- Split-stack No Frame Example: 6800
  31. More Looking in the Rear-view Mirror -- Single-stack No Frame Example: 6801  
  32. More Ascending the Right Island -- Split-stack No Frame Example: 6801
  33. Ascending the Right Island -- Frameless Examples (Single- & Split-stack): 6809
  34. Ascending the Right Island -- Frameless Examples (Single- & Split-stack): 68000 
  35. Tentative Op-code Map of RK0801 CPU (Extension of M6801)

Framework Rigging (03)

  1. Binary Output on the 6800, Left-to-right; Framework-by-include (asm68c) (split stack)
  2. Binary Output on the 6801, Left-to-right; Framework-by-include
  3. Binary Output on the 6809, Left-to-right; Framework-by-include (LWTools)
  4. Binary Output on the 68000, Left-to-right; Framework-by-include (error in code!)
  5. Hexadecimal Output on the 6800, without General Divide
  6. Hexadecimal Output on the 6801, without General Divide
  7. Hexadecimal Output on the 6809, without General Divide (Register Parameters)
  8. Hexadecimal Output on the 68000, without General Divide (Register Allocation) (error in code!)
  9. Keyboard Input on the 6800, 6801, and 6809 (EXORsim) 
  10. Keyboard Input Routines and Character Code Output on the 6800 
  11. Keyboard Input Routines and Character Code Output on the 6801 
  12. Keyboard Input Routines and Character Code Output on the 6809 
  13. Keyboard Input Routines and Character Code Output on the 68000 (Debug Session -- Init Error) (fixing the errors in chapters 4 and 8, part 1)
  14. Keyboard Input Routines and Character Code Output on the 68000 (Debug Session -- Dealloc Error) (fixing the errors in chapters 4 and 8, part 2)   
  15. Converting Numbers for Output and Input with Multiplication and Division (Theory)

 Framework Rigging Notes (03-XX)

  1. Numeric Output Conversion and Multiplying by Constants (Theory) (to be replaced/moved/rewritten)
  2. Multiplying by Powers of Two (Shift Left) (to be replaced/moved/rewritten) 
  3. Demonstrating Left Shift -- 6800 (to be replaced/moved/rewritten) 
  4. Multiplying by Small Constants (Shift Left and Add) (to be replaced/moved/rewritten)














No comments:

Post a Comment