Electronic Components Datasheet Search
  New Zealand  ▼
ALLDATASHEET.CO.NZ

X  

HCS12 Datasheet(PDF) 420 Page - Freescale Semiconductor, Inc

Part # HCS12
Description  HCS12 Microcontrollers
PDF  452 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  FREESCALE [Freescale Semiconductor, Inc]
Direct Link  http://www.freescale.com
Logo FREESCALE - Freescale Semiconductor, Inc

HCS12 Datasheet(HTML) 420 Page - Freescale Semiconductor, Inc

Back Button HCS12 Datasheet HTML 416Page - Freescale Semiconductor, Inc HCS12 Datasheet HTML 417Page - Freescale Semiconductor, Inc HCS12 Datasheet HTML 418Page - Freescale Semiconductor, Inc HCS12 Datasheet HTML 419Page - Freescale Semiconductor, Inc HCS12 Datasheet HTML 420Page - Freescale Semiconductor, Inc HCS12 Datasheet HTML 421Page - Freescale Semiconductor, Inc HCS12 Datasheet HTML 422Page - Freescale Semiconductor, Inc HCS12 Datasheet HTML 423Page - Freescale Semiconductor, Inc HCS12 Datasheet HTML 424Page - Freescale Semiconductor, Inc Next Button
Zoom Inzoom in Zoom Outzoom out
 420 / 452 page
background image
S12CPUV2 Reference Manual, Rev. 4.0
420
Freescale Semiconductor
B.8.1 Memory-to-Memory Moves
The CPU12 has both 8- and 16-bit variations of memory-to-memory move
instructions. The source address can be specified with immediate,
extended, or indexed addressing modes. The destination address can be
specified by extended or indexed addressing mode. The indexed
addressing mode for move instructions is limited to modes that require no
extension bytes (9- and 16-bit constant offsets are not allowed), and indirect
indexing is not allowed for moves. This leaves 5-bit signed constant offsets,
accumulator offsets, and the automatic increment/decrement modes. The
following simple loop is a block move routine capable of moving up to 256
words of information from one memory area to another.
LOOP
MOVW
2,X+ , 2,Y+
;move a word and update pointers
DBNE
B,LOOP
;repeat B times
The move immediate to extended is a convenient way to initialize a register
without using an accumulator or affecting condition codes.
B.8.2 Universal Transfer and Exchange
The M68HC11 has only eight transfer instructions and two exchange
instructions. The CPU12 has a universal transfer/exchange instruction that
can be used to transfer or exchange data between any two CPU registers.
The operation is obvious when the two registers are the same size, but
some of the other combinations provide very useful results. For example
when an 8-bit register is transferred to a 16-bit register, a sign-extend
operation is performed. Other combinations can be used to perform a
zero-extend operation.
These instructions are used often in CPU12 assembly language programs.
Transfers can be used to make extra copies of data in another register, and
exchanges can be used to temporarily save data during a call to a routine
that expects data in a specific register. This is sometimes faster and
produces more compact object code than saving data to memory with
pushes or stores.
B.8.3 Loop Construct
The CPU12 instruction set includes a new family of six loop primitive
instructions. These instructions decrement, increment, or test a loop count
in a CPU register and then branch based on a zero or non-zero test result.
The CPU registers that can be used for the loop count are A, B, D, X, Y, or



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