intro to codewarrior tm
Download
Skip this Video
Download Presentation
Intro to CodeWarrior TM

Loading in 2 Seconds...

play fullscreen
1 / 5

Intro to CodeWarrior TM - PowerPoint PPT Presentation


  • 153 Views
  • Uploaded on

Intro to CodeWarrior TM. Simulating the Microcontroller in Assembly Language Freescale Univeristy Programs Document Labs12CINTRO03/Rev1. Simulation Program. ; Your program code goes here ; Initialize I/O main\_loop : ; DO nop ; A "no operation" operation

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Intro to CodeWarrior TM' - eyad


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
intro to codewarrior tm

Intro to CodeWarrior TM

Simulating the Microcontroller in Assembly Language

FreescaleUniveristy Programs

Document Labs12CINTRO03/Rev1

simulation program
Simulation Program
  • ; Your program code goes here
  • ; Initialize I/O
  • main_loop:
  • ; DO
  • nop ; A "no operation" operation
  • ldx#ConstData ; Initialize X with an address
  • ldab#$02 ; Initialize a counter with data
simulation cont
Simulation (cont.)
  • ; Load and store data in a loop
  • loop:
  • ldaa0,x ; Get the data
  • staaVarData ; Store it in RAM
  • ldaa2,x ; Get another byte
  • staaVarData+1 ; Store it
  • Inx ; Increment the pointer
  • decb ; Decrement the counter
simulation cont1
Simulation (cont.)
  • bne loop ; Loop until B = 0
  • nop
  • ; Forever
  • bra main_loop
simulation cont2
Simulation (cont.)
  • ;***************************************MyConst: SECTION
  • ; Place constant data here
  • ConstData: DC.B $0a,$0b,$11,10
  • ;***************************************
  • MyData: SECTION
  • ; Place variable data here
  • VarData: DS.B 2 ; Two bytes of storage
ad