aboutsummaryrefslogtreecommitdiffstats
path: root/c/count.c
diff options
context:
space:
mode:
Diffstat (limited to 'c/count.c')
-rw-r--r--c/count.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/c/count.c b/c/count.c
new file mode 100644
index 0000000..37cdcce
--- /dev/null
+++ b/c/count.c
@@ -0,0 +1,16 @@
+#include "gbos.h"
+/* count [n]: print n numbered lines (default 25) to observe terminal scrolling
+ and the OSK scroll-region. Each line is tagged so you can tell which lines
+ are visible after scrolling. */
+void main(void) {
+ char *argv[4];
+ unsigned char argc = argv_parse(argv, 4);
+ unsigned char n = 25, i;
+ if (argc >= 1) n = atou(argv[0]);
+ for (i = 1; i <= n; i++) {
+ puts("line ");
+ putu(i);
+ puts(" ------------------");
+ nl();
+ }
+}