Question: Write a program in LC-3 assembly language that converts input decimal values into 16-bit binaries given the flow chart below. Read in a string and

Write a program in LC-3 assembly language that converts input decimal values into 16-bit binaries given the flow chart below.

Write a program in LC-3 assembly language that converts input decimal values

Read in a string and convert it into a two's complement binary integer and then print out the binary representation. Start MASK FILL x8000 FILL 24000 FILL x2000 int 0 flag = 0 GETC flag= 1 yes MASK x8000 x4000 x2000 is char no is char no digit-char-48 int-int x 10 + digit yes is flag yes int !int int-int1 no 1st MASK address count= 15 is count no yes Load MASK digit-int AND MASK is digit 0 Print 0 yes no MASKptr = MASKptr + 1 count- count -1 End Print "1" Note: This flow chart assumes the user only enters a first, if at all, and then only 0-9, ended with an 'enter" key

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!