| Motor de Búsqueda de Datasheet de Componentes Electrónicos |
|
ST20-C1 Datasheet(PDF) 33 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
ST20-C1 Datasheet(HTML) 33 Page - STMicroelectronics |
|
33 / 205 page ![]() 33/205 4 Using ST20-C1 instructions ® ssinc writes the half word in the two least significant b ytes of Breg to the location addressed by Areg. 4.2.4 Memory block copy A block memory copy may be implemented using the instructions lwinc and swinc. These instructions load or store a word, and increment the addresses used. To copy n bytes from source to destination, where source and destination are both word-aligned, a loop should be written, using the temporary variable limit, as in the following code: ld source; ld n; ld destination add; stl limit LOOP: lwinc; rev; swinc ldl limit; arot gt; cj END; j LOOP; END: This is the most efficient method of cop ying, since it reads and writes full words, making the best use of any 32-bit memory. However, this is not always possible if the alignment of the source and destination blocks are different. In that case the byte or half-word load and store should be used. 4.3 Expression evaluation Expression evaluation and address calculation is performed using the evaluation stack. For example, the evaluation of operations with two integer operands is performed by instructions that operate on the values of Areg and Breg. The result is left in Areg. Arithmetic and boolean calculations are considered in sections 4.4 and 4.7 respec- tively. This section describes how the evaluation stack is used. Loading and storing instructions are described in section 4.2. In this and subsequent sections, in examples of assembly code, a single letter or iden- tifier wr itten as an instruction is either an expression or a segment of code. If it is an expression then it means ‘evaluate the expression and leave the result in the Areg. 4.3.1 Using the evaluation stack A compiler normally loads a constant expression c using ldc: ldc c Loading from a constant table is described in section 4.3.3. An expression consisting of a single local variable is loaded using ldl x Methods for loading non-local variables are discussed in section 4.2, and array elements in section 4.5. |
|
Enlace URL |
| ¿ALLDATASHEET es útil para Ud.? [ DONATE ] |
Todo acerca de Alldatasheet | Publicidad | Contáctenos | Política de Privacidad | Enlace a la hoja de datos | Intercambio de Enlaces | Lista de Fabricantes 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 |