cancel
Showing results for 
Search instead for 
Did you mean: 

ERROR IN PROGRAMMING MANUAL?????????

debruyne.marc
Associate II

hello sir

can someone, help me with that "SUB SP,#$9 " ,with is mentioned in the LATEST PROGRAMMING MANUAL OF STM8S PAGE 151.

if you write that in an even very 1line program, you have an error

Can't match Addressing mode ' SUB SP,#$9'

is there a n error of me, or is the manual example not correct

thanks for the help

4 REPLIES 4
Philipp Krause
Senior II

The manual looks okay to me.

I guess you are using an assembler that uses a different syntax for hex immediates.

You should tell us which assembler you use. E.g. in sdasstm8 (the assembler that comes with SDCC), the syntax would be sub sp, #0x09.

https://community.st.com/s/question/0D53W00001ddaOISAY/hello-siri-use-the-nucleo-stm8s208rb-with-asembler-language-so-i-start-with-the-st-visual-develop-and-write-even-a-small-programl

Unfortunately ST's participation on the STM8 forum is rather lackluster

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

https://www.st.com/resource/en/release_note/rn0005-st-assemblerlinker-asm-452-lyn-319-obsend-215-stmicroelectronics.pdf

"3.1 ASM limitations 3.1.1 Limitations for STM8 assembler �? The mnemonics of the following STM8 instructions: ADD SP,#byte SUB SP,#byte have been replaced by: ADDW SP,#byte SUBW SP,#byte"

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

hello sir

thanks for youre answer,thats it,its works now

a nice day