Skip to content

Commit 0e5bb5a

Browse files
committed
Awk script to see mode values
1 parent 1d99446 commit 0e5bb5a

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tools/modes.awk

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#! /usr/bin/awk -f
2+
3+
# Run against tetris.dbg to see modes and values
4+
5+
BEGIN { FS="," }
6+
7+
/MODE_/ && /scope=0/ {
8+
gsub("name=", "", $2 );
9+
gsub("\"", "", $2 );
10+
for (i=3;i<=NF;i++) {
11+
if ($i ~ /^val=/) {
12+
gsub("val=", "", $i );
13+
print sprintf("%02d",strtonum($i)), $2
14+
}
15+
}
16+
};
17+

0 commit comments

Comments
 (0)