Using hex numbers in MSP430 assembler
I'm new to assembly (we are using it at school with an MSP430 controller) and I'm trying to do two things. moving an hex number to a certain location: mov #FFFh, R5 (moving it into the fifth register) comparing an hex number with another: cmp #FFFh, #45 mov.b #0, R4 ; indice mov.b #0, R5 ; contatore bis.b #00000001b, P1DIR ; led rosso bis.b #10000000b, P4DIR ; led verde main_loop: cmp #19, R5 jz end cmp #FFFFh, 2C00h(R4) jnz nope jmp yep nope: inc.b R4 jmp main_loop yep: inc.b R4 inc.b R5 jmp main_loop end: cmp #5, R5 jge red_led jmp green_led red_led: bis.b #00000001b, P1OUT green_led: bis.b #10000000b, P4OUT The compiler log (we are using CCS, CodeComposer) says: "../main.asm", ERROR! at EOF: [E0300] The following symbols are undefined: FFFFh How can I fix this?
A word starting with a digit (0 … 9) is interpreted as a number. A word starting with a letter (A … Z) is interpreted as a name (of a register or a variable or a label). So when a hexadecimal number starts with a letter, you must add a zero: cmp #0FFFFh, 2C00h(R4)
How to do conditional compilation with TASM?
Why is “inc dword [esp + ebx]” faster than “inc [esp]”?
declaration of constant strings in x86 assembly language
what's the difference between user-level directives and primitive directives in NASM?
What if there is no return statement in a CALLed block of code in assembly programs
Why is it necessary to use '$' sign in AT & T assembly?
In MIPS Assembly language, when do you know when to use syscall?
Kernel worked in emu8086 but not in virtual box with floppy controller
What's the easiest way to determine is the register value equal to zero or not?
How is associated data stored when pushing and popping register contents
How is the “__ARM_common_switch8 PROC” produced in Keil uVision4
Error when accessing vector table
Are assembly language programs restricted by kernel modes as well?
Want to take value from input procedure to output procedure using push and pop
Get system time with BIOS interrupt in assembly
How to convert x86_64 64-bit register names to their corresponding 32-bit register names in GNU assembly?