please write Hack Assembly code for the Nand2Tetris cpu emulator that will produce the text "CS 220" on the simulated monitor of the CPU Emulator tool in Nand2Tetris. Please center the text both horizontally and vertically and should look like the picture and please use the following as starter code which is the  code for drawing a vertical rectangle, which is part of the Letter (C) in "CS 220" program: // Built in constant in Assembly// @SCREEN //A=16384//D=A // let's say we start at: 16640@16640D=A@address M=D //address=16640  // Loop 48 times (arbitrary number, feel free to adjust as needed)@countM=0 (LOOP)// while (count < 48  , ENDLOOP when count >=48(or count-48 >= 0)@48D=A //D=48@countD=M-D  //count - 48@ENDLOOPD;JGE // Put 255 into RAM[address]@255D=A  // D=255@addressA=M //A=16640M=D // Update address by 32// to go to the next row underneath@32D=A@addressM=D+M //address= 16640 + 32 // increment the count!@countM=M+1 // Unconditinal jump back to (LOOP)@LOOP0;JMP (ENDLOOP)// prevent the no-op condition@ENDLOOP0;JMP

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter5: Looping
Section: Chapter Questions
Problem 15E
icon
Related questions
Topic Video
Question

please write Hack Assembly code for the Nand2Tetris cpu emulator that will produce the text "CS 220" on the simulated monitor of the CPU Emulator tool in Nand2Tetris. Please center the text both horizontally and vertically and should look like the picture and please use the following as starter code which is the  code for drawing a vertical rectangle, which is part of the Letter (C) in "CS 220" program:

// Built in constant in Assembly
// @SCREEN //A=16384
//D=A

// let's say we start at: 16640
@16640
D=A
@address 
M=D //address=16640 

// Loop 48 times (arbitrary number, feel free to adjust as needed)
@count
M=0

(LOOP)
// while (count < 48  , ENDLOOP when count >=48(or count-48 >= 0)
@48
D=A //D=48
@count
D=M-D  //count - 48
@ENDLOOP
D;JGE

// Put 255 into RAM[address]
@255
D=A  // D=255
@address
A=M //A=16640
M=D


// Update address by 32
// to go to the next row underneath
@32
D=A
@address
M=D+M //address= 16640 + 32

// increment the count!
@count
M=M+1

// Unconditinal jump back to (LOOP)
@LOOP
0;JMP

(ENDLOOP)
// prevent the no-op condition
@ENDLOOP
0;JMP

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Instruction Format
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT