SimulIDE-R1657_Win32
In brief, the IJMP instruction of AVR8 (AVRasm2) doesn’t jump to the indirect address saved in ZH:ZL.
Instead, it skips the next instruction which is usually an RJMP instruction among many RJMPs in a table. The cursor moves directly to the function pointed by the RJMP.
The real problem is that executing IJMP may also skip the function of interest (pointed to by RJMP). In this case (for example, skipping the function SCRNmod: in the attached code), the cursor returns to the beginning of the main loop (MAIN_lp:).

Note:
This project is in progress. It is about an Ampere-Hour (AH) meter, besides being a DC (average) voltage and current meter, for charging/discharging an acid battery.
In brief, the IJMP instruction of AVR8 (AVRasm2) doesn’t jump to the indirect address saved in ZH:ZL.
Instead, it skips the next instruction which is usually an RJMP instruction among many RJMPs in a table. The cursor moves directly to the function pointed by the RJMP.
The real problem is that executing IJMP may also skip the function of interest (pointed to by RJMP). In this case (for example, skipping the function SCRNmod: in the attached code), the cursor returns to the beginning of the main loop (MAIN_lp:).

Note:
This project is in progress. It is about an Ampere-Hour (AH) meter, besides being a DC (average) voltage and current meter, for charging/discharging an acid battery.
- Attachments
AVDC_07_04bT_asm_sim.zip
- You don't have permission to download attachments.
- (27 Kb) Downloaded 3 times
AVDC_07_04bT_lst.zip
- You don't have permission to download attachments.
- (35 Kb) Downloaded 3 times