forked from TheThirdOne/rars
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cancel syscall TheThirdOne#69 from privat
The user can now cancel sycalls with popup. A cancel button is present and has the same effect that a breakpoint.
- Loading branch information
Showing
14 changed files
with
98 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package rars; | ||
|
||
/** | ||
* This exception is only used to trigger breakpoints for I/O and other system call where the user selected cancel or equivalent. | ||
*/ | ||
public class CancelException extends SimulationException { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/bin/bash | ||
javac -cp rars.jar test/RarsTest.java | ||
java -cp test:rars.jar RarsTest | ||
java -cp test:rars.jar RarsTest "$@" | ||
err=$? | ||
rm test/RarsTest.class | ||
exit "$err" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#stdin:10\n20\n0 | ||
#stdout:1020 | ||
loop: | ||
li a7, 5 | ||
ecall | ||
|
||
beqz a0, end | ||
|
||
li a7, 1 | ||
ecall | ||
j loop | ||
end: | ||
li a7, 10 | ||
ecall |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#stdin:10\n20\n0 | ||
#stdout:1020 | ||
loop: | ||
li a7, 5 | ||
ecall | ||
|
||
beqz a0, end | ||
|
||
li a7, 1 | ||
ecall | ||
j loop | ||
|
||
end: | ||
li a7, 10 | ||
ecall |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#stdin:Hello\nthe\nworld | ||
#stdout:Hello\nthe\nworld | ||
.data | ||
buffer: .space 256 | ||
|
||
.text | ||
loop: | ||
li a7, 8 | ||
la a0, buffer | ||
li a1, 256 | ||
ecall | ||
|
||
lb t0, 0(a0) | ||
li t1, '\n' | ||
beq t0, t1, end | ||
|
||
li a7, 4 | ||
la a0, buffer | ||
ecall | ||
j loop | ||
|
||
end: | ||
li a7, 10 | ||
ecall |