| Electronic Components Datasheet Search |
|
ST20-C1 Datasheet(PDF) 31 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
ST20-C1 Datasheet(HTML) 31 Page - STMicroelectronics |
|
31 / 205 page ![]() 31/205 4 Using ST20-C1 instructions ® 4.2 Loading and storing The loading and storing instructions are listed in Table 4.3. On the ST20, the term loading means pushing a value onto the evaluation stack. The value to be loaded may be a value read from memory, a constant, a copy of another register or a calculated value. Storing means popping a value from the evaluation stack. The value may be written into memory or written into another register. The eval- uation stack is described in section 3.3, and evaluation of expressions is described in section 4.3. Relative addresses are used for accessing memory in order to reduce code size, as the operand values are smaller than full machine addresses. Data structures are word-aligned, so relative addresses can be word offsets, reducing the operand size further. The most common operations performed by a program are loading and storing of a small number of variables, and loading small literal values. 4.2.1 Loading constants One primary instruction ldc is provided for loading a general constant, for initializing a variable or register or for a constant in an expression. 4.2.2 Local and non-local variables When loading from and storing to memory, the ST20 distinguishes between local and non-local addressing. Local addressing means that the address is given as a word offset from the Wptr. Non-local addressing means that the address is given as a word offset from the Areg. In practice, the Wptr points to the stack, so local addressing is Mnemonic Name Description ldc n load constant Load the constant n. ldl n load local Load the value from n words above Wptr. stl n store local Store a value to n words above Wptr. ldnl n load non-local Load the value from n words above Areg. stnl n store non-local Store a value to n words above Areg. lbinc load byte and increment Load a byte and increment the address by 1 byte. sbinc store byte and increment Store a byte and increment the address by 1 byte. lsinc load sixteen and increment Load a half word and increment the address by 2 bytes. lsxinc load sixteen sign extended and increment Load a half word and sign extend to 32 bits and increment the address by 2 bytes. ssinc store sixteen and increment Store a half word and increment the address by 2 bytes. lwinc load word and increment Load a word and increment the address by 4 bytes. swinc store word and increment Store a word and increment the address by 4 bytes. Table 4.3 Loading and storing instructions |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |