| Motor de Búsqueda de Datasheet de Componentes Electrónicos |
|
ST20-C1 Datasheet(PDF) 45 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
ST20-C1 Datasheet(HTML) 45 Page - STMicroelectronics |
|
45 / 205 page ![]() 45/205 4 Using ST20-C1 instructions ® where the label ENDIF: is at the end of the code for the if construct. The compilation of a while loop is shown by the following example. while ( E){ P } This compiles to: L: E; cj ENDWHILE P; timeslice; j L ENDWHILE: Note that this loop includes a timeslice instruction. This causes the current process to be descheduled if a timeslice is due and timeslicing is enabled. The presence of this ensures that the process cannot occupy the CPU for too long provided timeslicing is enabled. It is good practice for multi-tasking programs to include a timeslice instruction in every loop. Timeslicing is described in section 7.4. Single task programs do not need to timeslice, but should have timeslicing disabled, so the timeslice instruction has no effect. A repeat .. until loop is shown by the following example. repeat { P } until E This compiles to: jK L: E; eqc 0; cj END K: P; timeslice; j L END: 4.6.5 Ordering instructions Two instructions are provided to select the smaller of two values. If Breg is smaller than Areg as a signed integer, order will swap Areg and Breg; otherwise order will have no effect. This can be used to find the minim um of two signed variables: ldl a; ldl b; order; stl minimum; stl maximum Similarly orderu can be used to find the minimum or maximum of two unsigned values 4.7 Evaluation of boolean expressions This section describes the operations using the logical true and false values, as used with the conditional jump cj. Conditional behavior and comparisons are described in section 4.6. Bitwise boolean operations are described in section 4.8. General issues concerning expression evaluation are discussed in section 4.3. |
|
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 |