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 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