summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.s24
1 files changed, 18 insertions, 6 deletions
diff --git a/main.s b/main.s
index a548e94..14b10a2 100644
--- a/main.s
+++ b/main.s
@@ -824,21 +824,30 @@ poll_loop:
movb $EV_EXIT, (event)
jmp exit
- 1:
- cmpb $'r, %al
+ 1: cmpb $'r, %al
jne 1f
movb $EV_RESTART, (event)
- 1:
- cmpb $' ', %al
+ 1: cmpb $' ', %al
jne 1f
notl (pause)
- 1:
- cmpb $'p', %al
+ 1: cmpb $'p', %al
jne 1f
movb $EV_PRINT, (event)
+ 1: cmpb $'-', %al
+ jne 1f
+ cmpl $TIMESTEP, (timespec + 4)
+ jle 1f
+ subl $TIMESTEP, (timespec + 4)
+
+ 1: cmpb $'=', %al
+ jne 1f
+ cmpl $TIMEUPTO, (timespec + 4)
+ jge 1f
+ addl $TIMESTEP, (timespec + 4)
+
1:
jmp poll_loop
@@ -1029,6 +1038,9 @@ str_fcntl: .asciz "fcntl"
sig_die_set:
.byte SIGINT, SIGQUIT, SIGILL, SIGABRT, SIGBUS, SIGTERM, SIGSEGV, 0
+.equ TIMEUPTO, 500000000
+.equ TIMESTEP, 25000000
+
timespec:
.int 0
.int 100000000