Course Solutions Uncategorized (Solved) : 1 Following Fragments Hack Assembly Language Would Implement Following Virtual Machine Com Q36823527 . . . .

(Solved) : 1 Following Fragments Hack Assembly Language Would Implement Following Virtual Machine Com Q36823527 . . . .

 

1. Which of the following fragments of Hack assembly languagewould implement the following virtual machine command? If there ismore than one correct answer, select all of them.

push constant 0A@0D=A@SPA=MM=D@SPAM=M+1

B

@0D=A@SPM=D@SPM=M+1

C

@0D=A@SPM=M+1A=MM=D@SP

D

A=0M=M+1AD=M-1M=0

E

@SPA=MM=0@SPM=M+1

F

@SPM=M+1A=MM=0@SP

2. Which of the following virtual machine commands wouldimplement the following Jack expression?

let b = c – a

The variables a, b and c are in the local segment at offsets 2,7 and 9 respectively.

A.

push local 2

push local 3

push local 4

sub

pop

B

push local 2

push local 9

sub

pop local 7

C

pop local 9

pop local 2

sub

push local 7

D

push local 9

push local 2

sub

push local 7

E

push local 9

push local 2

sub

pop local 7

3. How many memory segments does the Hack Virtual

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post