Electronic Components Datasheet Search
  English  ▼

X  

ST20-C1 Datasheet(PDF) 48 Page - STMicroelectronics

Part # ST20-C1
Description  Instruction Set Reference Manual
PDF  205 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

ST20-C1 Datasheet(HTML) 48 Page - STMicroelectronics

Back Button ST20-C1 Datasheet HTML 44Page - STMicroelectronics ST20-C1 Datasheet HTML 45Page - STMicroelectronics ST20-C1 Datasheet HTML 46Page - STMicroelectronics ST20-C1 Datasheet HTML 47Page - STMicroelectronics ST20-C1 Datasheet HTML 48Page - STMicroelectronics ST20-C1 Datasheet HTML 49Page - STMicroelectronics ST20-C1 Datasheet HTML 50Page - STMicroelectronics ST20-C1 Datasheet HTML 51Page - STMicroelectronics ST20-C1 Datasheet HTML 52Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 48 / 205 page
background image
4.9 Shifting and byte swapping
48/205
®
4.8.1
Memory bit test and clear or set
Bits of a word in memory may be tested and set or cleared by the instruction
rmw. The
address of the memory word is held in Areg and a bit masks in Breg and Creg.
rmw
clears the bits of the memory word that are set in Creg, and then sets the bits of the
memory word that are set in Breg.The initial memory word is loaded into Areg, with
Areg pushed down to Breg and Breg pushed down to Creg.
4.9
Shifting and byte swapping
The shift and byte swapping operations are provided by the instructions listed in Table
4.11.
The shift operations (
shl, shr and ashr) shift the operand in Breg by the number of bits
specified b y the unsigned integer in Areg and put the result in Areg.
shl and shr fill the
vacated bit positions with zero bits, while
ashr fills the v acated bits with copies of bit
31, which is the original sign bit. If Areg is zero, the result is the initial value of Breg.
When the value in Areg is greater than the number of bits in the object being shifted,
the result of the operation is undefined. The data previously held in Creg is popped
into Breg, and the initial Breg is left in the Creg.
swap32 reverses the order of the bytes in Areg by swapping byte 0 with byte 3 and
swapping byte 1 with byte 2.
4.10 Function and procedure calls
The function and procedure call operations are provided by the instructions listed in
Table 4.12.
The primary instruction
fcall n calls a function or procedure. It stores the instruction
pointer (which holds the return address) in the word pointed to by the Wptr. The
operand to the call -
n - is added to the address of the next instruction to produce the
address of the first instr uction of the procedure or function being called. Since the call
address is relative, the code is relocatable.
Mnemonic
Name
shl
shift left
shr
shift right
ashr
arithmetic shift right
swap32
byte swap 32
Table 4.11 Shifting and byte swapping instructions
Mnemonic
Name
fcall
function call
jab
jump absolute
ajw
adjust work space
gajw
general adjust workspace
Table 4.12 Function and procedure instructions



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


Datasheet Download

Go To PDF Page


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


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
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