LC3Tools ✰ 1 .ORIG x3000 opgave2.asm AND RO, RO, #0 ; Read first digit GETC OUT LD R1, ASCII_OFFSET ADD RO, RO, R1 ADD RO, RO, #-48 ADD RO, RO, RO 2 3 readS 4 LEA RO, prompt PUTS 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 RET 25 ; Read second digit GETC OUT LD R1, ASCII_OFFSET ADD R2, RO, R1 ADD R2, R2, #-48 ADD RO, RO, R2 ; Load effective address of prompt message ; Display prompt message ; Clear RO to store the result ; Read first digit ; Echo first digit ; Load ASCII offset to subtract from digit character ;Convert digit character to integer ; Convert ASCII digit to integer ; Shift to left to make room for second digit ; Read second digit ; Echo second digit ; Load ASCII offset to subtract from digit character ; Convert digit character to integer ;Convert ASCII digit to integer ; Combine first and second digit ; Return from function 26 prompt .STRINGZ "Input a 2 digit decimal number: 27 ASCII_OFFSET .FILL XFFD0 " ; ASCII offset to convert digit character to integer 28 LEND 22 /Users/omar/Desktop/opgave2.asm: 21:20: error: cannot encode as 5-bit 2's complement number ADD R2, R2, #23-48 122~
LC3Tools ✰ 1 .ORIG x3000 opgave2.asm AND RO, RO, #0 ; Read first digit GETC OUT LD R1, ASCII_OFFSET ADD RO, RO, R1 ADD RO, RO, #-48 ADD RO, RO, RO 2 3 readS 4 LEA RO, prompt PUTS 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 RET 25 ; Read second digit GETC OUT LD R1, ASCII_OFFSET ADD R2, RO, R1 ADD R2, R2, #-48 ADD RO, RO, R2 ; Load effective address of prompt message ; Display prompt message ; Clear RO to store the result ; Read first digit ; Echo first digit ; Load ASCII offset to subtract from digit character ;Convert digit character to integer ; Convert ASCII digit to integer ; Shift to left to make room for second digit ; Read second digit ; Echo second digit ; Load ASCII offset to subtract from digit character ; Convert digit character to integer ;Convert ASCII digit to integer ; Combine first and second digit ; Return from function 26 prompt .STRINGZ "Input a 2 digit decimal number: 27 ASCII_OFFSET .FILL XFFD0 " ; ASCII offset to convert digit character to integer 28 LEND 22 /Users/omar/Desktop/opgave2.asm: 21:20: error: cannot encode as 5-bit 2's complement number ADD R2, R2, #23-48 122~
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
100%
I get an error in LC3 assembly
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 1 steps
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY