Programming the 65816: Including the 6502, 65C02, and 65802 by David Eyes & Ron Lichty
Author:David Eyes & Ron Lichty [Eyes, David]
Language: eng
Format: epub, azw3
Published: 2015-11-16T23:00:00+00:00
The square brackets are used to indicate the indirect address is long.
So, like its sixteen-bit counterpart, indirect long indexed addressing allows you to index into an array of which neither the base nor the index need be determined until the program is executing. Unlike its sixteen-bit counterpart, it allows you to access an array in any bank, not just the current data bank.
Stack Relative Addressing
Possibly the most exciting new addressing method introduced by the 65802 and 65816 is stack relative. This is the first 65x method for directly accessing a stack byte other than the last data item pushed.
Stack relative addressing lets you easily access any byte or address in the last $FF bytes stacked. Instructions using stack relative addressing are two bytes long, the operand a single byte that is an index into the stack. As Figure 11.5 shows, the stack is treated as an array with its base the address in the stack pointer. The operand is added to the stack pointer value to form the bank zero effective address which will be accessed.
This can be especially useful when one part of a program needs to send data to another part of the program, such as a multiply routine. The two sixteen-bit values to be multiplied are pushed onto the stack in one part of the program. Later, the multiply routine loads one of the operands using stack relative addressing, leaving both the other operand and the stack pointer undisturbed:
Download
Programming the 65816: Including the 6502, 65C02, and 65802 by David Eyes & Ron Lichty.azw3
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Deep Learning with Python by François Chollet(15429)
The Mikado Method by Ola Ellnestam Daniel Brolund(12697)
Hello! Python by Anthony Briggs(12552)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(11854)
Dependency Injection in .NET by Mark Seemann(11655)
A Developer's Guide to Building Resilient Cloud Applications with Azure by Hamida Rebai Trabelsi(10534)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(10470)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(10176)
Grails in Action by Glen Smith Peter Ledbrook(9785)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(9480)
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(9220)
Hit Refresh by Satya Nadella(9040)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(8537)
The Kubernetes Operator Framework Book by Michael Dame(8480)
Exploring Deepfakes by Bryan Lyon and Matt Tora(8301)
Robo-Advisor with Python by Aki Ranin(8256)
Practical Computer Architecture with Python and ARM by Alan Clements(8228)
Implementing Enterprise Observability for Success by Manisha Agrawal and Karun Krishnannair(8199)
Kotlin in Action by Dmitry Jemerov(8193)