Skip to content

Commit

Permalink
refinements to blinking stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
wa1tnr committed Jan 2, 2022
1 parent f3a4031 commit dfc85e5
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 55 deletions.
19 changes: 17 additions & 2 deletions libtnr.fs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,20 @@
drop drop 1- drop
;

: stop -77 #, fl! ;
: start -22 #, fl! ;
: wiggle blink blink blink blink blink ;

\ literals

: dlit dup 1+ ; \ simple and does what's wanted
: jlit dlit dlit swap - ; \ always exactly '1'

: nxt jlit + echo ; \ show next char
: led 25 #, ;

: blik led on 100 #, ms led off 800 #, ms ;

: blinks ( n -- )
1- for blik next ." ok " ;

: stop -77 #, fl! ." blinking " led off ;
: start -22 #, fl! ." blinking " ;
15 changes: 0 additions & 15 deletions main.fs
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,6 @@ turnkey

: test ." this is going to be good " ;

: wiggle blink blink blink blink blink ;

\ literals

: dlit dup 1+ ; \ simple and does what's wanted
: jlit dlit dlit swap - ; \ always exactly '1'

: nxt jlit + echo ; \ show next char
: led 25 #, ;

: blik led on 100 #, ms led off 800 #, ms ;

: blinks ( n -- )
1- for blik next ." ok " ;

: id ." 2 Jan Sunday 17:11z" cr
." rp2040-dvlp-dd-multc-a"cr ;

Expand Down
56 changes: 28 additions & 28 deletions memory.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// memory.h

const uint16_t memory[] = {
943,
969,
1, 2, 3, 4, 5, 6, 7, 8,
9, 10, 11, 12, 13, 15, 16, 17,
18, 19, 20, 21, 22, 23, 24, 25,
Expand Down Expand Up @@ -100,30 +100,30 @@ const uint16_t memory[] = {
6, 32, 0, 4, 19, 18, 737, 628,
29, 9, 774, 21, 4, 19, 18, 319,
324, 737, 28, 8, 786, 19, 19, 7,
746, 19, 19, 83, 19, 1, 0, 6,
65459, 65535, 75, 1, 0, 6, 65514, 65535,
75, 1, 210, 62, 0, 58, 25, 116,
746, 19, 19, 83, 19, 1, 0, 70,
70, 70, 70, 70, 1, 0, 18, 77,
1, 0, 798, 798, 20, 23, 1, 0,
802, 22, 483, 1, 0, 6, 25, 0,
1, 0, 813, 72, 6, 100, 0, 24,
813, 73, 6, 800, 0, 24, 1, 0,
83, 11, 818, 10, 835, 58, 3, 111,
107, 32, 89, 1, 0, 6, 65459, 65535,
75, 58, 9, 98, 108, 105, 110, 107,
105, 110, 103, 32, 89, 813, 73, 1,
0, 6, 65514, 65535, 75, 58, 9, 98,
108, 105, 110, 107, 105, 110, 103, 32,
89, 1, 210, 62, 0, 58, 25, 116,
104, 105, 115, 32, 105, 115, 32, 103,
111, 105, 110, 103, 32, 116, 111, 32,
98, 101, 32, 103, 111, 111, 100, 32,
89, 1, 0, 70, 70, 70, 70, 70,
1, 0, 18, 77, 1, 0, 842, 842,
20, 23, 1, 0, 846, 22, 483, 1,
0, 6, 25, 0, 1, 0, 857, 72,
6, 100, 0, 24, 857, 73, 6, 800,
0, 24, 1, 0, 83, 11, 862, 10,
879, 58, 3, 111, 107, 32, 89, 1,
0, 58, 22, 32, 50, 32, 74, 97,
110, 32, 83, 117, 110, 100, 97, 121,
32, 32, 32, 49, 55, 58, 49, 49,
122, 89, 25, 58, 22, 114, 112, 50,
48, 52, 48, 45, 100, 118, 108, 112,
45, 100, 100, 45, 109, 117, 108, 116,
99, 45, 97, 89, 25, 1, 210, 62,
719, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
89, 1, 0, 58, 22, 32, 50, 32,
74, 97, 110, 32, 83, 117, 110, 100,
97, 121, 32, 32, 32, 49, 55, 58,
49, 49, 122, 89, 25, 58, 22, 114,
112, 50, 48, 52, 48, 45, 100, 118,
108, 112, 45, 100, 100, 45, 109, 117,
108, 116, 99, 45, 97, 89, 25, 1,
210, 62, 719, 65535, 65535, 65535, 65535, 65535,
65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
Expand Down Expand Up @@ -451,12 +451,12 @@ const uint16_t memory[] = {
65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
65535, 65535, 65535, 65535, 65535, 65535, 65535, 26882,
8292, 889, 25094, 26988, 27502, 8307, 876, 25092,
26988, 8299, 862, 27651, 25701, 857, 28163, 29816,
852, 27140, 26988, 8308, 846, 25604, 26988, 8308,
842, 30470, 26473, 27751, 8293, 835, 29700, 29541,
8308, 805, 29445, 24948, 29810, 797, 29444, 28532,
8304, 791, 23554, 8284, 742, 23556, 21317, 8259,
8292, 915, 29700, 29541, 8308, 885, 29445, 24948,
29810, 865, 29444, 28532, 8304, 845, 25094, 26988,
27502, 8307, 832, 25092, 26988, 8299, 818, 27651,
25701, 813, 28163, 29816, 808, 27140, 26988, 8308,
802, 25604, 26988, 8308, 798, 30470, 26473, 27751,
8293, 791, 23554, 8284, 742, 23556, 21317, 8259,
737, 26889, 29806, 29285, 29296, 29797, 719, 11778,
8307, 647, 15617, 628, 12290, 8253, 619, 16129,
615, 9985, 611, 26626, 8227, 586, 26116, 28265,
Expand Down
20 changes: 10 additions & 10 deletions tags
Original file line number Diff line number Diff line change
Expand Up @@ -208,16 +208,16 @@ h# core.fs +247
interpret core.fs +263
\ESC libtnr.fs +1
\\ libtnr.fs +2
stop libtnr.fs +15
start libtnr.fs +16
wiggle libtnr.fs +15
dlit libtnr.fs +19
jlit libtnr.fs +20
nxt libtnr.fs +22
led libtnr.fs +23
blik libtnr.fs +25
blinks libtnr.fs +27
stop libtnr.fs +30
start libtnr.fs +31
test main.fs +9
wiggle main.fs +11
dlit main.fs +15
jlit main.fs +16
nxt main.fs +18
led main.fs +19
blik main.fs +21
blinks main.fs +23
id main.fs +26
id main.fs +11
.stack job.fs +57
check job.fs +58

0 comments on commit dfc85e5

Please sign in to comment.