ASxxxx Assembler V02.00 + NoICE + SDCC mods (STMicroelectronics STM8), page 2. Hexadecimal [24-Bits] 56 ;ld a, #0x80 57 ;ld WWDG_CR,a ; WWDG_CR used to reset mcu 58 ;iret 59 0017FF 60 STACK=0x17ff 000001 61 main: 62 ; initialize SP 000001 AE 17 FF [ 2] 63 LDW X,#STACK ;initialize return stack 000004 94 [ 1] 64 LDW SP,X 000005 90 29 FE [ 1] 65 JRH . 000008 20 FE [ 2] 66 JRA . For the instruction JRH . it should be 90 29 FD as it is it jump to 29 which is JRV
DIV X,Y is not a valid instruction and should trigger an error message. The valid instruction is DIVW X,Y with opcode 0x65. opcode 0x62 is for DIV X,A
sdasstm8 bugs