03b-MicroBlazeAssemblyLanguageProgramming

03b-MicroBlazeAssemblyLanguageProgramming - Overview of...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
Overview of assembly language rogramming with the programming with the MicroBlaze Assemble Æ Link Æ Download Æ Run
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
rogramming procedure Programming procedure • Soon you'll write programs in assembly language for the MicroBlaze • Here is an overly simple example program to illustrate the procedure ######################################################## # # PROGRAM: example1.s #p # DESCRIPTION: Overly simple example program # CREATED BY: A. L. Abbott # ######################################################## te t .text .org 0x50 .globl _start # must define "_start" at address 0x50 _start: addi r12,r0,0 # Initialize r12 to 0 on reset of CPU MAINLOOP: addi r12,r12,1 # Increment r12, and repeat bri MAINLOOP
Background image of page 2
• Before the MicroBlaze can n this program run this program … – the assembly-language ode needs to be 0100001 050 Address (hex) Contents code needs to be converted to machine language, and 00100001 10000000 00000000 0000000 0050 0051 0052 053 – the machine-language code needs to be 00000000 00100001 10001100 00000000 0053 0054 0055 0056 transferred to the MicroBlaze memory 00000001 10111000 00000000 0057 0058 0059 • Here is the machine code that results from the given 11111111 11111100 005a 005b assembly-lang. program
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
######################################################## # # PROGRAM: example1.s File name: example1.s # DESCRIPTION: Overly simple example program # CREATED BY: A. L. Abbott # ######################################################## .text .org 0x50 .globl _start # must define "_start" at address 0x50 _start: addi r12,r0,0 # Initialize r12 to 0 on reset of CPU MAINLOOP: addi r12,r12,1
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/07/2011 for the course ECE 2534 taught by Professor Abbott during the Fall '10 term at Virginia Tech.

Page1 / 12

03b-MicroBlazeAssemblyLanguageProgramming - Overview of...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online