Public » Elements of Computing
Clone URL:  
Pushed to one repository · View In Graph Contained in tip

tip Mult.asm

Changeset 30e6dbf0542a

Parent 50e1a57a2f0c

by Profile picture of Benjamin PollackBenjamin Pollack

Changes to one file · Browse files at 30e6dbf0542a Showing diff from parent 50e1a57a2f0c Diff from another changeset...

 
6
7
8
9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
7
8
 
 
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
@@ -6,4 +6,22 @@
 // Multiplies R0 and R1 and stores the result in R2.  // (R0, R1, R2 refer to RAM[0], RAM[1], and RAM[3], respectively.)   -// Put your code here. \ No newline at end of file
+// Put your code here. + @R2 + M=0 +(loop) + @R0 + D=M + @done + D;JEQ + @R0 + MD=M-1 + @R1 + D=M + @R2 + M=M+D + @loop + 0;JMP +(done) + @done + 0;JMP