Jump to content

storing "variables" in memory in assembly

Recommended Posts

hey guys, I realize this is probably a silly question. but how do I create a "variable" when working only in assembly. If I were in "C" i just define one, but in tutorials for assembly are written like you already know how to. I am pretty sure it has to do with the ".data"

my program compiles fine, but when it tries to load it to the MSP430 to test run it, it kicks back the error "MSP430: Trouble Writing Memory Block at 0x0 on Page 0 of Length 0x2: Could not perform access, BSL memory segments are protected." Also the Compiler has a warning "#10247-D creating output section ".data" without a SECTIONS"

I thought .data was a standard section that was defined by default, why would I need to make a custom linker config to use a standard section. and why is it trying to load the data section into protected memory, doesn't it move around memory blocks where it needs to?


or am I just confusing things too much?


the code I added to test thiswas just


P1SyncChk	.word	0x00


which is (from what I can tell) from the example on page 25 of SLAU131b the assembly language manual for MSP430...


I is confused :(

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...