User Tools

Site Tools


aslfaqs

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
aslfaqs [2025/09/09 18:00] – [Can I do recursion?] reggieaslfaqs [2025/09/09 19:26] (current) – [Which registers do I use?] reggie
Line 20: Line 20:
 ==== Which registers do I use? ==== ==== Which registers do I use? ====
  
-For an address variable pick an index register, X, Y or even (user stack) U, it doesn't matter which. For a character or small numberic variable pick an accumulator, A or B, again it doesn't matter which. If you need 16-bit values use D, which is the two accumulators combined (A high, B low).+For an address variable pick an index register, X, Y or even (user stack) U, it doesn't matter which. For a character or small numeric variable pick an accumulator, A or B, again it doesn't matter which. If you need 16-bit values use D, which is the two accumulators combined (A high, B low).
  
 Choice between index or accumulator severely limits the operations you can perform. Only LD, ST, and CMP are common between all user registers. General arithmetic operations (NEG, AND etc.) are limited to the 8-bit accumulators, except for ADD and SUB which are available to 16-bit D. Index registers uniquely have the LEAX operation, and the stacks (U and S) have PSH and PUL. Choice between index or accumulator severely limits the operations you can perform. Only LD, ST, and CMP are common between all user registers. General arithmetic operations (NEG, AND etc.) are limited to the 8-bit accumulators, except for ADD and SUB which are available to 16-bit D. Index registers uniquely have the LEAX operation, and the stacks (U and S) have PSH and PUL.
aslfaqs.txt · Last modified: 2025/09/09 19:26 by reggie

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki