|
@@ -17,12 +17,17 @@
|
17
|
17
|
;
|
18
|
18
|
; A simple precise stopwatch
|
19
|
19
|
; Build : nasm -felf64 wtfstopw.asm && ld -s -melf_x86_64 wtfstopw.o -o wtfstopw
|
20
|
|
-; Build Debug : nasm -felf64 -l wtfstopw.lst wtfstopw.asm && ld -melf_x86_64 wtfstopw.o -o wtfstopw
|
21
|
|
-;
|
22
|
|
-; Usage : ./wtfstopw
|
23
|
|
-; press enter to exit
|
24
|
|
-; send SIGINT (with kill -2 or ctrl + c) for new lap on stdout
|
|
20
|
+; Build Debug : nasm -g -F dwarf -felf64 -l wtfstopw.lst wtfstopw.asm && ld -melf_x86_64 wtfstopw.o -o wtfstopw
|
25
|
21
|
;
|
|
22
|
+; ./wtfstopw [-h] [-r NDIGITS]
|
|
23
|
+; Options :
|
|
24
|
+; -h print this help and exit
|
|
25
|
+; -r number of digits bellow seconds to display, default is 2
|
|
26
|
+; Interact :
|
|
27
|
+; press enter to exit
|
|
28
|
+; send SIGINT (with kill -2 ir ctrl + c) for a new lap
|
|
29
|
+
|
|
30
|
+
|
26
|
31
|
|
27
|
32
|
[bits 64]
|
28
|
33
|
|
|
@@ -81,6 +86,12 @@ section .data
|
81
|
86
|
db 0x9, "-h print this help and exit", 0xA
|
82
|
87
|
db 0x9, "-r Number of digits bellow seconds, between [1..8]"
|
83
|
88
|
db 0xA
|
|
89
|
+ db "Interactions :", 0xA
|
|
90
|
+ db 0x9, "Press enter or close stdin to exit", 0xA
|
|
91
|
+ db 0x9, "Send SIGINT (with kill -2 or ctrl + c) for a new lap"
|
|
92
|
+ db 0xA
|
|
93
|
+ db 0x9, "Elapsed time is sent on stderr and laps infos on stdout"
|
|
94
|
+ db 0xA
|
84
|
95
|
usage_postlen: equ $ - usage_post
|
85
|
96
|
|
86
|
97
|
badarg_msg: db "Unexpected argument : "
|