Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • tobiasm1/swen90006-a2-2018
  • callumb/swen90006-a2-2018
  • zhaolind/swen90006-a2-2018
  • minzhex/swen90006-a2-2018
  • xujiaz/swen90006-a2-2018
5 results
Select Git revision
Show changes
Commits on Source (12)
......@@ -18,8 +18,16 @@ public class Fuzzer {
/* We just print one instruction.
Hint: you might want to make use of the instruction
grammar which is effectively encoded in Instruction.java */
/*pw.println("MOV R1 0");
for(int x=0;x<20000;x++){
pw.println("LDR R0 R1 " + x);
}
pw.println("RET R0");
*/
//pw.println("RET R-1");
pw.println("MOV R1 1");
pw.println("SUB R0 R0 R1");
pw.println("RET R0");
}catch (Exception e){
e.printStackTrace(System.err);
System.exit(1);
......
......@@ -58,7 +58,7 @@ static void machine_init(void){
memory = malloc(sizeof(int32_t)*MEMORY_SIZE);
regs = malloc(sizeof(int32_t)*NUM_REGS);
memset(memory,0,sizeof(int32_t)*MEMORY_SIZE);
memset(regs,0,sizeof(int32_t)*NUM_REGS);
memset(regs,512,sizeof(int32_t)*NUM_REGS);
count = 0;
}
......