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
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
Step by step
Solved in 2 steps