Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Complete Task 1, Style guidelines included for code comments Lab 6a_1asm code outline provided must be finished for task 1 ELE209 Lab 6a LC-3 Assembly

Complete Task 1, image text in transcribed
Style guidelines included for code comments
image text in transcribed
image text in transcribed
Lab 6a_1asm code outline provided must be finished for task 1
image text in transcribed
ELE209 Lab 6a LC-3 Assembly Language Programming and Debugging Due: You must email your code to the TA and demonstrate it by the start of lab the next week. This lab is a two week lab. It consists of one large assembly language program which is broken into subtasks. The subtasks must be completed and demonstrated to the TA in the order they are given. various Style requirements: You must follow the style guidelines given at the end of this assignment. Assignment: You will write an assembly language program that will coavert a number entered from the keyboard into a 16 bit two's compliment value, then display it to the console as a binary number. The numbers have a form similar to how you enter values into registers in the LC-3 simulator. Specifically, they have the form [SIGN] ITYPE] number where SIGN is an optional minus sign (ie. "") and TYPE is an optional number type, where ""means hexadecimal and "" means decimal. If TYPE is not present, the type is assumed to be hexadecimal. Some examples are 123,-#456, xAB4, and-xFFFF A summary of the subtasks are as follows: 1. Read a null terminated string from keyboard into a buffer. (week 1) 2. Parse the non numeric part of the string to determine its sign and radix. (week 1) 3. Convert the numeric part of the string to a 16 bit twos compliment binary number. (week 2) 4. Output the 16 bit number to the console in binary. (week 2) Task 1: Download 1ab6a.1.asm from the course website and complete it as follows. Add code that reads a sequence of characters from the keyboard, converts any lowercase letters to uppercase, and stores them as a null terminated string in memory. Stop reading when either the enter key is pressed or the buffer is full. Do not include the enter key in your null terminated string. Your code should be placed in the file where it says Insert your code here !" Your code must start with a label named "ReadCore". On entry to your code, RI will contain the length of the input buffer where you will store the null terminated string R2 will contain the address of this input buffer in memory On exit from your code, The input buffer given in R2 must contain a null terminated string of at most R1-1 characters. At the end of your code, it must unconditionally branch to a label called "ProcessInput". Hint: You will probably want to use the GETC trap to read keys, and you will have to echo them yourself using the OUT trap. Also, it might be easier to implement it without case conversion first, then add it after the basic routine is working

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introductory Relational Database Design For Business With Microsoft Access

Authors: Jonathan Eckstein, Bonnie R. Schultz

1st Edition

1119329418, 978-1119329411

More Books

Students also viewed these Databases questions