diff --git a/projects/04/tests/Flip.asm b/projects/04/tests/Flip.asm new file mode 100644 index 0000000..c43c084 --- /dev/null +++ b/projects/04/tests/Flip.asm @@ -0,0 +1,29 @@ +//Flip.asm +//flips the values of RAM[0] and RAM[1] + +//temp=R1 +//R1=R0 +//R0=temp + +@R1 +D=M +@temp // Variable +M=D // temp = R1 + +@R0 +D=M +@R1 +M=D // R1 = R0 + +@temp +D=M +@R0 +M=D // R0 = temp + +(END) +@END +0;JMP + +//@temp --> find some available memory register (register n) +//and use it to represent the variable temp. So, from now on, each +//occurance of @temp in the program will be translated into @n \ No newline at end of file diff --git a/projects/04/tests/Frage.txt b/projects/04/tests/Frage.txt new file mode 100644 index 0000000..dbac032 --- /dev/null +++ b/projects/04/tests/Frage.txt @@ -0,0 +1,4 @@ +How would a assembler distinguish between a branching symbol and a variable symbol? +Wie würde ein Assembler zwischen einem Verzweigungssymbol und einem variablen Symbol unterscheiden? + +A branching symbol has a label declaration somewhere in the program, and a variable symbol doesn't