Skip to content

Add ICALL instruction #11

@Flu

Description

@Flu

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.asm in which you test this instruction and then make a unit test for it in tests/MainTests.hs.

More information

https://ww1.microchip.com/downloads/en/DeviceDoc/AVR-InstructionSet-Manual-DS40002198.pdf#page=80

Metadata

Metadata

Assignees

No one assigned

    Labels

    emulator internalMods on the internal emulator API or functionalityenhancementNew feature or requestgood first issueGood for newcomershacktoberfest-2025Perfect bugs/enhancements for Hacktoberfest 2025not a priorityEnhancements or bugs that do need to be resolved but are not a priorityparserConcerning the parser/fron-end

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions