stm8, cpu register, cosmic
Hello
How can I access CPU registers using the Cosmic compiler?
For example, when I access register A, the compiler throws an error A is undefined (This is shown in the picture and also the project files).

Hello
How can I access CPU registers using the Cosmic compiler?
For example, when I access register A, the compiler throws an error A is undefined (This is shown in the picture and also the project files).

You've to define address for any register. Check datasheet and see what's the address of A register and then define it accordingly.
Checkout this guide: https://lujji.github.io/blog/bare-metal-programming-stm8/
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.