esaulenka / ghidra_STM8

Ghidra STM8 processor module
Apache License 2.0
23 stars 8 forks source link

Stack operation and emulation error #10

Open konvikkor opened 4 months ago

konvikkor commented 4 months ago

The documentation indicates that when calling the CALL operand, only two bytes are added to the stack instead of three PCH, and the PCL byte of the PCE is ignored.

esaulenka commented 3 months ago

Could you advice, where you found it? As I see, only CALLF pushes 3 bytes, all CALLs pushes only 2 bytes.

konvikkor commented 3 months ago

image In this image, you can see that 3 is written instead of 2

esaulenka commented 3 months ago

this CALL writes 0xF258 (2 bytes) to RAM at SP-1, then decreases SP by 2 and then tries to call dynamic pointer (it's not working, but it's another issue)