Skip to main content
Visitor II
October 20, 2022
Question

hello sir i use the st development program

  • October 20, 2022
  • 2 replies
  • 1979 views

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

    This topic has been closed for replies.

    2 replies

    Graduate II
    October 20, 2022

    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?​

    Visitor II
    October 20, 2022
    hello sir
    thanks for youre answer
    well indeed its i use the stv development stm tool an i selcet stm assembler
    then if i write that assembler line "int  $040200"
    the assembler tells me its not the a correct instruction
    so then i ask you witch is the correct instruction then
    certainly its so marked in the manual, but in reality its not accepted
    by the stm8 assembler
    i had already a similar problem but with "sub SP,#4" and it came out
    that its be changed to "subw"SP,#$4"
    hope you can help me sir
    many thanks
    marc debruyne
    Op 20/10/2022 om 14:06 schreef ST Community:
    Graduate II
    October 20, 2022

    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

    https://www.st.com/resource/en/programming_manual/pm0044-stm8-cpu-programming-manual-stmicroelectronics.pdf

    If all else fails, create a MACRO, or define/emit byte stream for the encoded instruction

    Graduate II
    October 20, 2022

    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
    ...

    Visitor II
    October 20, 2022
    hello sir
    thanks for youre effort to help me
    realy i all have tryed that
    " ldw X, (X)
        neg A
        rlwa X, A
        int #$040200
    ;    nop
    ;    nop
    ;    nop
    ;    nop
        rlwa X, A
    thats the error code the assembler gives me, but i try to over come that
    just temporaly with 4 nop
    main.asm(2378): as1 : Error 56: unrecognised opcode '    int #$040200 '
    sir, maybe i am a "stupid  71y old man" but me too i am an electronique
    engeneer, and have already programmed since,
    8080-6502-6802-6809-atmega2560-cop8-,
    and realy i tryed all, be sure i would otherwise not at all asked youre help
    many thanks
    marc debruyne
    Op 20/10/2022 om 15:50 schreef ST Community: