1 / 4

Chapters 6 & 7 Assembly Language Programming Examples on LC-3

Chapters 6 & 7 Assembly Language Programming Examples on LC-3. Example 1: Write an LC-3 assembly language routine to swap the contents two consecutive memory locations Let the address of the first memory location be x3339. The program should start at memory location x3300.

odin
Download Presentation

Chapters 6 & 7 Assembly Language Programming Examples on LC-3

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapters 6 & 7Assembly Language Programming Examples on LC-3 Example 1: Write an LC-3 assembly language routine to swap the contents two consecutive memory locations Let the address of the first memory location be x3339. The program should start at memory location x3300.

  2. Assembly Language Programming Examples on LC-3 Example 2: Write an LC-3 assembly language routine to display exactly 100 “Z”s on the screen.The program should start at memory location x3100. The character “Z” is stored in the memory location x3106 and the count 100 is stored in the memory location x3107.

  3. Assembly Language Programming Examples on LC-3 Example 3: Write an LC-3 assembly language routine to test whether R2 is even or odd. The program should start at memory location x3100. The program branches to x3110 if the number in R2 is even and branches to x3120 if the number in R2 is odd.

  4. Assembly Language Programming Examples on LC-3 Example 4: Write an LC-3 assembly language routine to increment each of the numbers stored in memory location A through memory location B. Assume that these memory locations have already been initialized with meaningful numbers. The addresses A and B can be found in memory locations x3100 and x3101. The program starts at x3000.

More Related