17 lines
313 B
NASM
17 lines
313 B
NASM
// Add two numbers which will compute the result in R2
|
|
// R0 and R1 will be the numbers to add
|
|
// Remember to set them in the assember program before running it.
|
|
//
|
|
|
|
//
|
|
//
|
|
@R0
|
|
D=M
|
|
@R1
|
|
D=D+M // Add playground (R0 + M(R1)) to new playground D || D = R0 + R1
|
|
@R2
|
|
M=D
|
|
(END)
|
|
@END
|
|
0;JMP
|