2022-10-20 04:26 AM
hello sir
i use the st development program
and have a problem with the assembly code "int 040200"
if you write that , the st development does not accept that code, altough its in that way it mentioned in the manual
please can you help me, how to solve that
many thanks
marc debruyne
2022-10-20 05:06 AM
You asked this yesterday.
Not much STM8 support to be had here.
What error does the assembler give? Any examples of similar usage? Any compiler or disassembler generated code using this or similar instructions?
2022-10-20 05:20 AM
2022-10-20 05:28 AM
Do you know what the opcodes for the instruction should be?
How do they report in a debugger, or disassembly, in ST's or COSMIC's tools?
2022-10-20 05:34 AM
https://community.st.com/s/question/0D53W00001sKYf6SAG/regarding-the-stv-assembler
2022-10-20 05:54 AM
Can only be used in the Interrupt Table (check section/attributes where used, likely $00.8000 .. $00.807F)
0x82 ($82) OPCODE INT
INT $2FFFFC
82 2F FF FC
Could try INT #$2FFFFC
or INT symbol
If all else fails, create a MACRO, or define/emit byte stream for the encoded instruction
2022-10-20 06:49 AM
Here they construct the interrupt table via a DC.L
http://stm8sdiscovery.nano-age.co.uk/adventures-in-stm8-assembler/revenge-of-the-blinking-led
; the interupt table
segment 'vectit'
dc.l {$82000000+start} ; reset
...
2022-10-20 07:08 AM
2022-10-20 08:36 AM
Contextually this looks wrong. Is this coming from some sample/example, or you just trying to code something?
I'm not sure it's available as a 24-bit call instruction, but I'm not an STM8 user.
Isn't this supposed just to sit in the interrupt vector table?
Try using the 32-bit word function, or whatever this assembler uses
ie DC.L $82040200
Have you tried IAR, or other STM8 assemblers?