Download presentation
Presentation is loading. Please wait.
1
The Simulator project
2
Assignment 1 Create a subroutine for delay between the individual diplays in the assignment. Use a BSR instruction for this. First, attach a 7-segment display to Port B Then write code to light up each of the individual segments of the display with a delay between each. Then write code to activate the segments such that the display shows 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 in order with a delay between the display of each digit.
3
Detail on the use of BSR BSR stands for Branch to Subroutine
All that is stacked on a BSR is the Program Counter. If you want to save any other register, you need to do it. Convention is to stack (and then restore before return) any registers that your routine uses. The return to the calling program is achieved by a RTS instruction.
4
Assignment 2 Add a 2nd display on Port C and be able to output the most-significant-nibble of what is in accumulator A to this. For this you will have a couple levels of subroutines.
5
The subroutines The program flow using subroutines.
6
Assignment 2 Add the second 7-Segment Display for the MSB.
The intent is to display the contents in the A accumulator (BCD) on the display. In assignment 2 you set up the subroutines to display the digits on the respective display.
7
Assignment 2 structure The subroutine calling structure of 2
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.