-
Notifications
You must be signed in to change notification settings - Fork 3
Add ICALL instruction #11
Copy link
Copy link
Open
Labels
emulator internalMods on the internal emulator API or functionalityMods on the internal emulator API or functionalityenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershacktoberfest-2025Perfect bugs/enhancements for Hacktoberfest 2025Perfect bugs/enhancements for Hacktoberfest 2025not a priorityEnhancements or bugs that do need to be resolved but are not a priorityEnhancements or bugs that do need to be resolved but are not a priorityparserConcerning the parser/fron-endConcerning the parser/fron-end
Milestone
Metadata
Metadata
Assignees
Labels
emulator internalMods on the internal emulator API or functionalityMods on the internal emulator API or functionalityenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershacktoberfest-2025Perfect bugs/enhancements for Hacktoberfest 2025Perfect bugs/enhancements for Hacktoberfest 2025not a priorityEnhancements or bugs that do need to be resolved but are not a priorityEnhancements or bugs that do need to be resolved but are not a priorityparserConcerning the parser/fron-endConcerning the parser/fron-end
ICALL – Indirect Call to Subroutine
Description
Indirect call of a subroutine pointed to by the Z (16-bit) Pointer Register in the Register File. The Z-Pointer Register is
16 bits wide and allows a call to a subroutine within the lowest 64K words (128 KB) section in the program memory
space. The Stack Pointer uses a post-decrement scheme during ICALL.
To be clear, this requires implementing parser support for it as well as adding it to the emulator internal API.
Testing
Add a file called
test_files/test_icall.asmin which you test this instruction and then make a unit test for it intests/MainTests.hs.More information
https://ww1.microchip.com/downloads/en/DeviceDoc/AVR-InstructionSet-Manual-DS40002198.pdf#page=80