Examples of MSP430(G2553) assembly
Go to file
flabbergast 4ef8fa2af1 Update README. 2021-06-11 21:04:00 +01:00
01-button-led Update scripts, readmes. 2021-05-14 21:42:14 +01:00
02-lpm3wait Update scripts, readmes. 2021-05-14 21:42:14 +01:00
03-uart Update scripts, readmes. 2021-05-14 21:42:14 +01:00
04-uartstring Update scripts, readmes. 2021-05-14 21:42:14 +01:00
05-morestring 05-morestring: rewrite write.asm. 2021-05-19 18:13:34 +01:00
06-i2c-bitbang 05-morestring: rewrite write.asm. 2021-05-19 18:13:34 +01:00
07-spiflash 05-morestring: rewrite write.asm. 2021-05-19 18:13:34 +01:00
common Fix stoopid registers error that broke uart. 2021-05-13 21:22:32 +01:00
pdfs Add pdf manuals. 2021-06-11 20:55:24 +01:00
.gitignore Update scripts, readmes. 2021-05-14 21:42:14 +01:00
README.md Update README. 2021-06-11 21:04:00 +01:00
UNLICENSE Add unlicense; update README, registers. 2021-05-13 08:01:46 +01:00

README.md

msp430 assembly examples

A record of my journey learning MSP430 assembly. A series of examples that aim to arrive at assembly code for a RFM69-radio based sensor network: some code for the sensors themselves, some code for a gateway.

My starting point was mecrisp forth - which is also an excellent basis for working with MSP430! Highly recommended! (But I wanted to learn some assembly.)

Since mecrisp sources are written for/compiled with macro assembler, naturally these examples are for that as well.

All code is for MSP430G2553, presumably sitting on a MSP430G2 Launchpad. You'll want the excellent mspdebug for programming the chip and debugging.

register conventions

See common/regconvention.asm. I renamed the registers and am pretty much using only the aliases, according to the "convention" specified in that file.

function calling conventions

I am mixing two approaches: I try to make function parameters to be passed in registers (a0,a1,...) to try to avoid memory read/writes. However some functions do use the data stack that's set up in core.asm. You need to look at the comments around the function definitions to find out which one is being used. (Starts at 04-.)

todo

  • rfm69 tx
  • rfm69 rx
  • readline?
  • gateway