test1.asm 883 B

1234567891011121314151617181920212223242526272829
  1. ; Simple program to test some basic pipeline hazards detections and other functionality
  2. Main:
  3. load 5 r1 ; r1:=5
  4. load 2 r2 ; r2:=2
  5. add r1 r2 r3 ; r3:=7
  6. add r3 r2 r3 ; r3:=9
  7. add r1 r3 r3 ; r3:=14
  8. add r3 r3 r3 ; r3:=28
  9. write 10 r3 r3 ; mem(10+28):=28
  10. write 0 r3 r1 ; mem(28):=5
  11. read 10 r3 r4 ; r4:=28
  12. add r4 r1 r5 ; r5:=5+28
  13. bgt r5 r1 3 ; true
  14. halt ; skip
  15. load 0 r1 ; skip
  16. load 0 r2 ; skip
  17. load 1 r9 ; r9:=1
  18. load 18 r10 ; r10:=18
  19. push r10 ; push 18
  20. pop r11 ; pop r11:=18
  21. add r10 r10 r15 ; r15:=36
  22. savpc r12 ; r12:=pc
  23. add r12 1 r13 ; r13:=r12+1
  24. halt ; halt
  25. load 37 r1 ; unreached
  26. Int:
  27. reti