Compare two numbers on the stack.
Bitwise AND of two numbers on the stack.
Multiply two numbers on the stack.
Add two numbers on the stack.
Subtract two numbers on the stack.
Divide two numbers on the stack.
Compare two numbers on the stack.
Bitwise shift left.
Compare two numbers on the stack.
Compare two numbers on the stack.
Compare two numbers on the stack.
Compare two numbers on the stack.
Bitwise shift right.
Logical AND of two numbers on the stack
Tell that a memory map definition builds on an other definition. All the definitions are merged when used. Example:
based-on <name>
Clear stack.
Remove and forget about topmost element on the stack.
Duplicate the topmost element on the stack.
Convert TOS to a floating point number.
If then else for 3 values on the stack: predicate, value_true, value_false.
Convert TOS to an integer.
testing only: print all knwon words to stdout
Leave the larger of two values on the stack.
Start the definition of a memory map for a MCU. It’s expected that the NAME and SEGMENT commands are used to define a memory map. Example:
memory-map-begin
name LOGICAL
# declare a "DATA" segment at the beginning of RAM
segment .data in:RAM
segment .bss in:RAM
segment .noinit in:RAM
symbol _stack in:RAM,location:end
# declare multiple segments that are located in FLASH
programmable segment .text in:FLASH
programmable segment .const in:FLASH
programmable segment .data_init in:FLASH,mirror:.data
memory-map-end
memory-map-begin
name MSP430F2xx
based-on LOGICAL
read-only segment .bootloader 0x0c00-0x0fff
programmable segment .infomem 0x1000-0x10ff
programmable segment .infoD 0x1000-0x103f
programmable segment .infoC 0x1040-0x107f
programmable segment .infoB 0x1080-0x10bf
programmable segment .infoA 0x10c0-0x10ff
programmable segment .vectors 0xffe0-0xffff
memory-map-end
Terminate current memory map definition. See MEMORY-MAP-BEGIN.
Leave the smaller of two values on the stack.
Negate number on stack.
Logical NOT of number on stack
Logical OR of two numbers on the stack
Push a copy of the second element on the stack.
Push a copy of the N’th element on the stack.
Set flag that the next defined segment is programmed on the target. Example:
programmable segment .text in:FLASH
Set flag that the next defined segment is read-only (not programmed to target). Example:
read-only segment bootloader 0x0c00-0x0fff
Example:
segment <name> <memory_range>
Defines a segment. Previously set flags are applied and cleared. <memory_range> can be an address range like 0x0200-0x0300 or a set of key:value pairs:
The contents of this segment will be a copy of the given one. A typical use is to make a copy of the .data section that is in RAM and needs to be initialized (by the startup code) from a copy located in Flash memory:
programmable segment .data_init in:FLASH,mirror:.data
Exchange the two topmost elements on the stack.
Example:
symbol <name> <address>
Defines a symbol with the value specified. <address> can also be a computed value. e.g. in:RAM,location:end.
Supported are: in:<segment_name> and location:[start|end]. These values are computed at load time, i.e. the segment still have the address range specified in the definition (opposed to the values after the linker has “shrinked” the segments to the size of actually present data). Note that location:end is the segments last address plus one (end is exclusive in this case).
Read and execute a template. This command consists of 3 sections:
Example:
template-begin
memory-map-begin
name <MCU>
based-on MSP430F2xx
segment RAM <RAM>
programmable segment FLASH <FLASH>
memory-map-end
template-variables
<MCU> <RAM> <FLASH>
template-values
MSP430F2001 0x0200-0x027f 0xfc00-0xffdf # 128B RAM, 1kB Flash
MSP430F2002 0x0200-0x027f 0xfc00-0xffdf # 128B RAM, 1kB Flash
MSP430F2003 0x0200-0x027f 0xfc00-0xffdf # 128B RAM, 1kB Flash
MSP430F2011 0x0200-0x027f 0xf800-0xffdf # 128B RAM, 2kB Flash
MSP430F2012 0x0200-0x027f 0xf800-0xffdf # 128B RAM, 2kB Flash
MSP430F2013 0x0200-0x027f 0xf800-0xffdf # 128B RAM, 2kB Flash
template-end
Bitwise XOR of two numbers on the stack.
Bitwise OR of two numbers on the stack.
Bitwise invert of number on stack.