-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGlossary_u4th_functional_tab.txt
526 lines (512 loc) · 37 KB
/
Glossary_u4th_functional_tab.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
4e-init430G2553-uMMT.s43
4e-boot-uMMT.s43
; STARTUP WORDS ================================================================
;Z ITHERE -- adr find first free flash cell
;U SAVE -- save user area to infoB
;Z BOOT -- boot system
;Z WARM -- use user area from RAM (hopefully intact)
;Z COLD -- set user area to latest application
;Z FACTORY -- set user area to plain kernel
;U WIPE -- erase flash but not kernel, reset user area.
;U INITUMMT -- init uMMT system variables
4e-deps430G2553.s43
;C (EMIT) c -- output character to console; core routine
;C (KEY) -- c get character from keyboard; core routine
;C ALIGN -- align HERE
;C ALIGNED addr -- a-addr align given addr
;Z CELL -- n size of one cell
;C CELL+ a-addr1 -- a-addr2 add cell size
;C CELLS n1 -- n2 cells->adrs units
;C CHAR+ c-addr1 -- c-addr2 add char size
;C CHARS n1 -- n2 chars->adrs units
;C >BODY xt -- a-addr adrs of CREATE data
;X COMPILE, xt -- append execution token
;Z !CF adrs cfa -- set code action of a word
;Z ,CF adrs -- append a code field
;Z ,CALL adrs -- append a subroutine CALL
;Z ,JMP adrs -- append an absolute 16-bit JMP
;Z !COLON -- change code field to DOCOLON
;Z ,EXIT -- append hi-level EXIT action
;Z ,BRANCH xt -- append a branch instruction
;Z ,DEST dest -- append a branch address
;Z !DEST dest adrs -- change a branch dest'n
;Z ,NONE -- append a null destination (Flashable)
;Z (none) --- keine da
4e-core430.s43
;C EXECUTE i*x xt -- j*x execute Forth word at 'xt'
;Z LIT -- x fetch inline literal to stack
;C EXIT -- exit a colon definition
;C VARIABLE -- define a Forth VARIABLE
;C CONSTANT -- define a Forth constant
;Z USER n -- define user variable 'n'
;C DUP x -- x x duplicate top of stack
;C ?DUP x -- 0 | x x DUP if nonzero
;C DROP x -- drop top of stack
;C SWAP x1 x2 -- x2 x1 swap top two items
;C OVER x1 x2 -- x1 x2 x1 per stack diagram
;C ROT x1 x2 x3 -- x2 x3 x1 per stack diagram
;X NIP x1 x2 -- x2 per stack diagram
;C >R x -- R: -- x push to return stack
;C R> -- x R: x -- pop from return stack
;C R@ -- x R: x -- x fetch from rtn stk
;Z SP@ -- a-addr get data stack pointer
;Z SP! a-addr -- set data stack pointer
;Z RP@ -- a-addr get return stack pointer
;Z RP! a-addr -- set return stack pointer
;X TUCK x1 x2 -- x2 x1 x2 per stack diagram
;C @ a-addr -- x fetch cell from memory
;C ! x a-addr -- store cell in memory
;C C@ c-addr -- char fetch char from memory
;C C! char c-addr -- store char in memory
;Z FLERASE a-addr n -- erase n bytes of flash, full segment sizes.
;Z I! x a-addr -- store cell in Instruction memory
;Z IC! x a-addr -- store char in Instruction memory
;Z D->I c-addr1 c-addr2 u -- move Data->Code
;C + n1/u1 n2/u2 -- n3/u3 add n1+n2
;C +! n/u a-addr -- add cell to memory
;X M+ d n -- d add single to double
;C - n1/u1 n2/u2 -- n3/u3 subtract n1-n2
;C AND x1 x2 -- x3 logical AND
;C OR x1 x2 -- x3 logical OR
;C XOR x1 x2 -- x3 logical XOR
;C INVERT x1 -- x2 bitwise inversion
;C NEGATE x1 -- x2 two's complement
;C 1+ n1/u1 -- n2/u2 add 1 to TOS
;C 1- n1/u1 -- n2/u2 subtract 1 from TOS
;Z >< x1 -- x2 swap bytes (not ANSI)
;C 2* x1 -- x2 arithmetic left shift
;C 2/ x1 -- x2 arithmetic right shift
;C LSHIFT x1 u -- x2 logical L shift u places
;C RSHIFT x1 u -- x2 logical R shift u places
;C 0= n/u -- flag return true if TOS=0
;C 0< n -- flag true if TOS negative
;C = x1 x2 -- flag test x1=x2
;X <> x1 x2 -- flag test not eq (not ANSI)
;C < n1 n2 -- flag test n1<n2, signed
;C > n1 n2 -- flag test n1>n2, signed
;C U< u1 u2 -- flag test u1<u2, unsigned
;X U> u1 u2 -- flag u1>u2 unsgd (not ANSI)
;C RLA n1 -- n2 f rotate left through carry, true if carry set
;Z BRANCH -- branch always
;Z ?BRANCH x -- branch if TOS zero
;Z (do) n1|u1 n2|u2 -- R: -- sys1 sys2 run-time code for DO
;Z (loop) R: sys1 sys2 -- | sys1 sys2 run-time code for LOOP
;Z (+loop) n -- R: sys1 sys2 -- | sys1 sys2 run-time code for +LOOP
;C I -- n R: sys1 sys2 -- sys1 sys2 get the innermost loop index
;C J -- n R: 4*sys -- 4*sys get the second loop index
;C UNLOOP -- R: sys1 sys2 -- drop loop parms
;C UM* u1 u2 -- ud unsigned 16x16->32 mult.
;C UM/MOD ud u1 -- u2 u3 unsigned 32/16->16
;C FILL c-addr u char -- fill memory with char
;X CMOVE c-addr1 c-addr2 u -- move from bottom
;X CMOVE> c-addr1 c-addr2 u -- move from top
;Z I->D c-addr1 c-addr2 u -- move Code->Data
;Z SKIP c-addr u c -- c-addr' u' skip matching chars
;Z SCAN c-addr u c -- c-addr' u' find matching char
;Z S= c-addr1 c-addr2 u -- n string compare, n<0: s1<s2, n=0: s1=s2, n>0: s1>s2
;Z N= c-addr1 c-addr2 u -- n name compare, n<0: s1<s2, n=0: s1=s2, n>0: s1>s2
;C KEY -- c get character from keyboard; vectored
;C EMIT c -- output character to console; vectored
;X KEY? -- f return true if char waiting
;X ZERO -- 0 put zero on stack. Often usesd word.
4e-hilvl430.s43
; SYSTEM VARIABLES & CONSTANTS =================================================
;Z U0 -- a-addr current user area adrs
;C >IN -- a-addr holds offset into TIB
;C BASE -- a-addr holds conversion radix
;C STATE -- a-addr holds compiler state
;Z DP -- a-addr holds dictionary ptr
;Z 'SOURCE -- a-addr two cells: len, adrs
;Z LATEST -- a-addr last word in dict.
;Z HP -- a-addr HOLD pointer
;Z LP -- a-addr Leave-stack pointer
;Z IDP -- a-addr ROM dictionary pointer
;Z NEWEST -- a-addr temporary LATEST storage
;Z APP -- a-addr app pointer ( was TURNKEY), use as APP ! To start App.
;Z CAPS -- a-addr capitalize words pointer
;Z USERKEY -- a-addr KEY pointer
;Z USEREMIT -- a-addr EMIT pointer
;Z NEWLINE -- a-addr CR pointer
;X PAD -- a-addr user PAD buffer = end of hold area!
;Z L0 -- a-addr bottom of Leave stack
;Z R0 -- a-addr end of return stack
;Z S0 -- a-addr end of parameter stack
;X TIB -- a-addr Terminal Input Buffer
;Z TIBSIZE -- n size of TIB
;C BL -- char an ASCII space
;Z UINIT -- addr initial values for user area
;Z #INIT -- n #bytes of user area init data
;Z COR -- adr cause of reset
;Z INFOB -- adr start of info B segment
;Z INFOC -- adr start of info C segment
;Z INFOD -- adr start of info C segment
;Z APPU0 -- adr start of Application user area
; ARITHMETIC OPERATORS =========================================================
;C S>D n -- d single -> double prec.
;Z ?NEGATE n1 n2 -- n3 negate n1 if n2 negative
;C ABS n1 -- +n2 absolute value
;X DNEGATE d1 -- d2 negate double precision
;Z ?DNEGATE d1 n -- d2 negate d1 if n negative
;X DABS d1 -- +d2 absolute value dbl.prec.
;C M* n1 n2 -- d signed 16*16->32 multiply
;C SM/REM d1 n1 -- n2 n3 symmetric signed div
;C FM/MOD d1 n1 -- n2 n3 floored signed div'n
;C * n1 n2 -- n3 signed multiply
;C /MOD n1 n2 -- n3 n4 signed divide/rem'dr
;C / n1 n2 -- n3 signed divide
;C MOD n1 n2 -- n3 signed remainder
;C */MOD n1 n2 n3 -- n4 n5 n1*n2/n3, rem"
;C */ n1 n2 n3 -- n4 n1*n2/n3
;C MAX n1 n2 -- n3 signed maximum
;C MIN n1 n2 -- n3 signed minimum
; DOUBLE OPERATORS =============================================================
;C 2@ a-addr -- x1 x2 fetch 2 cells
;C 2! x1 x2 a-addr -- store 2 cells
;C 2DROP x1 x2 -- drop 2 cells
;C 2DUP x1 x2 -- x1 x2 x1 x2 dup top 2 cells
;C 2SWAP x1 x2 x3 x4 -- x3 x4 x1 x2 per diagram
;C 2OVER x1 x2 x3 x4 -- x1 x2 x3 x4 x1 x2 per diagram
; INPUT/OUTPUT =================================================================
;C COUNT c-addr1 -- c-addr2 u counted->adr/len
;C DOCR -- output newline
;C CR -- output newline
;C SPACE -- output a space
;C SPACES n -- output n spaces
;Z UMIN u1 u2 -- u unsigned minimum
;Z UMAX u1 u2 -- u unsigned maximum
;C ACCEPT c-addr +n -- +n' get line from term'l
;C TYPE c-addr +n -- type line to term'l
;Z (IS") -- c-addr u run-time code for S"
;Z (S") -- c-addr u run-time code for S"
;Z IS" -- compile in-line string
;Z IS" -- compile in-line string
;C S" -- compile in-line string
;C S" -- compile in-line string
;C ." -- compile string to print
;Z IWORD c -- c-addr WORD to Code space
;Z IWORDC c -- c-addr maybe capitalize WORD to Code space
; NUMERIC OUTPUT ===============================================================
;Z UD/MOD ud1 u2 -- u3 ud4 32/16->32 divide
;Z UD* ud1 d2 -- ud3 32*16->32 multiply
;C HOLD char -- add char to output string
;C <# -- begin numeric conversion
;Z >digit n -- c convert to 0..9A..Z
;C # ud1 -- ud2 convert 1 digit of output
;C #S ud1 -- ud2 convert remaining digits
;C #> ud1 -- c-addr u end conv., get string
;C SIGN n -- add minus sign if n<0
;C U. u -- display u unsigned
;C . n -- display n signed
;C DECIMAL -- set number base to decimal
;X HEX -- set number base to hex
; DICTIONARY MANAGEMENT ========================================================
;C HERE -- addr returns dictionary ptr
;C ALLOT n -- allocate n bytes in dict
;C , x -- append cell to dict
;C C, char -- append char to dict
;C IHERE -- addr returns Code dictionary ptr
;C IALLOT n -- allocate n bytes in Code dict
;C I, x -- append cell to Code dict
;C IC, char -- append char to Code dict
; INTERPRETER ==================================================================
;C SOURCE -- adr n current input buffer
;X /STRING a u n -- a+n u-n trim string
;Z >counted src n dst -- copy to counted str
;Z ADR>IN c-addr' -- set >IN to offset to given adr
;X PARSE char -- c-addr n word delim'd by char
;C WORD char -- c-addr word delim'd by char
;C WORD char -- c-addr word delim'd by char
;Z NFA>LFA nfa -- lfa name adr -> link field
;Z NFA>CFA nfa -- cfa name adr -> code field
;Z IMMED? nfa -- f fetch immediate flag
;C FIND c-addr -- c-addr 0 if not found
;C FIND c-addr -- xt 1c if immediate
;C FIND c-addr -- xt -1 if "normal"
;C UPC char -- char capitalize character
;C CAPITALIZE c-addr -- c-addr capitalize string
;C LITERAL x -- append numeric literal
;Z DIGIT? c -- n -1 | x 0 if c is a valid digit | otherwise
;Z ?SIGN adr n -- adr' n' f get optional sign; advance adr/n if sign; return NZ if negative
;C >NUMBER ud adr u -- ud' adr' u' convert string to number
;Z ?NUMBER c-addr -- n -1 string->number
;Z ?NUMBER c-addr -- c-addr 0 if convert error
;Z INTERPRET i*x c-addr u -- j*x interpret given buffer
;C EVALUATE i*x c-addr u -- j*x interprt string
;C QUIT -- R: i*x -- interpret from kbd
;C ABORT i*x -- R: j*x -- clear stk & QUIT
;Z ?ABORT f c-addr u -- abort & print msg
;C ABORT" i*x 0 -- i*x R: j*x -- j*x x1=0
;C ABORT" i*x x1 -- R: j*x -- x1<>0
;C ' -- xt find word in dictionary
;C CHAR -- char parse ASCII character
;C [CHAR] -- compile character literal
;C ( -- skip input until )
; COMPILER =====================================================================
;Z HEADER -- create a Forth word header
;Z <BUILDS -- define a word with t.b.d. action & no data
;C CREATE -- create an empty definition pointing to RAM
;Z (DOES>) -- run-time action of DOES>
;C DOES> -- change action of latest def'n
;C RECURSE -- recurse current definition
;C [ -- enter interpretive state
;C ] -- enter compiling state
;Z HIDE -- "hide" latest definition
;Z REVEAL -- "reveal" latest definition
;C IMMEDIATE -- make last def'n immediate
;C : -- begin a colon definition
;C ; -- end a colon definition
;C ['] -- find word & compile as literal
;C POSTPONE -- postpone compile action of word
;Z COMPILE -- append inline execution token
; CONTROL STRUCTURES ===========================================================
;C IF -- adrs conditional forward branch
;C THEN adrs -- resolve forward branch
;C ELSE adrs1 -- adrs2 branch for IF..ELSE
;C BEGIN -- adrs target for bwd. branch
;C UNTIL adrs -- conditional backward branch
;X AGAIN adrs -- uncond'l backward branch
;C WHILE adrs1 -- adrs2 adrs1 branch for WHILE loop
;C REPEAT adrs2 adrs1 -- resolve WHILE loop
;Z >L x -- L: -- x move to leave stack
;Z L> -- x L: x -- move from leave stack
;C DO -- adrs L: -- 0 start a loop
;Z ENDLOOP adrs xt -- L: 0 a1 a2 .. aN -- common factor of LOOP and +LOOP
;C LOOP adrs -- L: 0 a1 a2 .. aN -- finish a loop
;C +LOOP adrs -- L: 0 a1 a2 .. aN -- finish a loop
;C LEAVE -- L: -- adrs leave a loop
; OTHER OPERATIONS =============================================================
;X WITHIN n1|u1 n2|u2 n3|u3 -- f n2<=n1<n3?
;C MOVE addr1 addr2 u -- smart move
;C DEPTH -- +n number of items on stack
;C ENVIRONMENT? c-addr u -- false | i*x true system query
; UTILITY WORDS ================================================================
;Z NOOP -- do nothing
;Z FLALIGNED a -- a' align IDP to flash boundary
;X MARKER -- create word to restore dictionary
;X WORDS -- list all words in dict. Stop and go key version.
;X (U.R) u n -- xxx display u unsigned in n width; primitiv
;X U.R u n -- display u unsigned in n width
;X 0U.R u n -- display u unsigned in n width with leading zeros
;X ZEROS n -- output n zeros
;X DUMP adr n -- dump memory
;X .S -- print stack contents
;Z CRC n addr len -- n' crc process string
; MISC =========================================================================
;C 2CONSTANT <name> w1 w2 -- define a Forth double constant
;U \ -- backslash
;Z .VER -- type message
;U BELL -- send $07 to Terminal
;Z ESC[ -- start esc-sequence
;Z PN -- send parameter of esc-sequence
;Z ;PN -- send delimiter ; followed by parameter
;U AT-XY x y -- set cursor position in terminal
;U PAGE -- send "page" command to terminal to clear screen.
;U BIN -- set number base to binary
;U RAM -- compile into RAM. SAVE your system befor using RAM.
;U TRUE -- f true flag
;U FALSE -- f false flag
;C TABLE -- create an empty definition pointing to FLASH
; MCU specific words ===========================================================
;U 1MS -- wait about 1 millisecond
;U MS n -- wait about n milliseconds
;U SET mask addr -- set bit from mask in addr (cell); use even adr!
;U CSET mask addr -- set bit from mask in addr (byte)
;U CLR mask addr -- reset bit from mask in addr (cell); use even adr!
;U CCLR mask addr -- reset bit from mask in addr (byte)
;U CTOGGLE mask addr -- flip bit from mask in addr (byte)
;U CGET mask addr -- flag test bit from mask in addr (byte)
;Z RESETADR -- adr reset vector address
;Z MEMBOT -- adr begining of USERflash
;Z MEMTOP -- adr end of USERflash
;U MEM -- u bytes left in flash
;U UNUSED -- u bytes left in RAM
;Z VARBOT -- a-addr bottom of Variable Area
;Z TOPSEG -- a-addr bottom of top most segment
;Z VECBOT -- a-addr begining of vector segment
;U ? adr -- u display content of variable
;Z P1 -- adr address of port1 output register
;Z P2 -- adr address of port2 output register
;Z P3 -- adr address of port2 output register
4e-vecs430G2553-uMMT.s43
4e-infoB.s43
4e-infoC.s43
4e-infoD.s43
4e-lpm-uMMT.s43
;U SLEEP -- enter low power mode, get out: reset /key, LEDs off first
4e-uMMT.s43
4e-uMMT-words.s43
;Z SWH1 -- adr upper timer value, ON time
;Z SWH0 -- adr lower timer value, ON time
;Z SWL1 -- adr upper timer value, OFF time
;Z SWL0 -- adr lower timer value, OFF time
;U OUTV -- adr output backup register, general purpose register too
;Z DITV -- adr tone duration register
;Z BLI0 -- adr blinker counter low
;Z BLI1 -- adr blinker counter high
;Z ETC0 -- adr timer counter low
;Z ETC1 -- adr timer counter high
;U LBL -- LED blink
;U LON -- Turn LED on, i.e. stop blink
;U LOFF -- Turn LED off.
;U ETC -- electronic time clock (stoppuhr)
;U ETCOFF -- Turn timer A0 off.
;U ETC@ -- etc1 etc0 ta0r fetch timer values
;U S2 -- mask port S2 button mask and port address
;U S2? -- f test button S2, true is pressed
;U S3 -- mask port S3 button mask and port address
;U S3? -- f test button S3, true is pressed
;Z 1# n -- type 1 digit
;Z 2# n -- type 2 digits
;Z 4# n -- type 4 digits
;U ??? -- show uMMT user variables
;U SETGPIO -- select GPIO function of P2
;U SETOUTIN -- set direction register P2
;U ENRES -- set resistor enable register P2
;U INITP2 -- set all P2 defaults for uMMT
;U BIT7OUT -- set P2.7 to output direction
;U BIT6OUT -- set P2.6 to output direction
;U BIT5OUT -- set P2.5 to output direction
;U BIT4OUT -- set P2.4 to output direction
;U BIT7H -- set P2.7 (high)
;U BIT6H -- set P2.6 (high)
;U BIT5H -- set P2.5 (high)
;U BIT4H -- set P2.4 (high)
;U BIT7L -- reset P2.7 (low)
;U BIT6L -- reset P2.6 (low)
;U BIT5L -- reset P2.5 (low)
;U BIT4L -- reset P2.4 (low)
;U SCOUNTER n -- binary counter OUT, n sets tempo
;U COUNTER -- 8Hz binary counter OUT
;U OUT! n -- write n to upper nibble of P2 (4 LEDs)
;U IN@ -- n read lower nibble digital input of P2
;U OUTL -- write OUTV to upper nibble of P2 (4 LEDs)
;U 4shiftl -- shift value in OUTV to the left one nibble (up)
;Z ONTIME -- execute ON timer once
;Z OFFTIME -- execute OFF timer once
;U 1KHZ -- 1 kHz frequency, 50% duty cycle
;U 1KHZ25 -- 1 kHz frequency, 25% duty cycle
;U 1KHZ5 -- 1 kHz frequency, 5% duty cycle
;U 50HZ -- 50 Hz frequency, 50% duty cycle
;U LEFTMOST -- servo puls, turning servo to the left
;U MIDDLE -- servo puls, turning servo to a middle position
;U RIGHTMOST -- servo puls, turning servo to the right
; Examples =====================================================================
;U FRQ -- Output frequency at P2.7 using SW timer values.
;U POSITION -- drive servo line at P2.6 to position using SW1H value
;Z SLIM n -- lim limit n using values of SWL0 and SWL1
;U SERVO n -- make a new servo position by adding n to SWH1
;U SR -- turn servo to the right some degree
;U SL -- turn servo to the left some degree
;U PWM -- Output frequency at P2.5 using SW timer values.
;U SWEEP -- sweep PWM duty cycles up an dowm
;U INTOOUT -- endless loop reading IN and puting it OUT to the LEDs
;U COND-IN0 -- Condition of IN0 stored to OUT0, endless loop
;U INVERT-IN0 -- Invert IN0 and store to OUT0, endless loop
;U AND-IN01 -- logic AND of IN0 and IN1 stored to OUT0, endless loop
;U OR-IN01 -- logic OR of IN0 and IN1 stored to OUT0, endless loop
;U XOR-IN01 -- logic XOR of IN0 and IN1 stored to OUT0, endless loop
;U GAP -- play a short gap
;U DIT -- play a short tone
;U DAH -- play a long tone
;U CGAP -- play a character gap
;U WGAP -- play a word gap
;U SOS -- play morse code S O S once
;U ADC -- adc sample & convert once, fetch adc
;U ADCR -- ADC to OUT (LEDs), endless loop
4e-uMMT-first-words.s43
;Z SWH1 -- adr upper timer value, ON time
;Z SWH0 -- adr lower timer value, ON time
;Z SWL1 -- adr upper timer value, OFF time
;Z SWL0 -- adr lower timer value, OFF time
;U OUTV -- adr output backup register, general purpose register too
;Z DITV -- adr tone duration register
;Z BLI0 -- adr blinker counter low
;Z BLI1 -- adr blinker counter high
;Z BLCN -- adr blinker counter high
;Z ETC0 -- adr timer counter low
;Z ETC1 -- adr timer counter high
;U BIT0 -- n 16 bit value with bitx set
;U BIT1 -- n 16 bit value with bitx set
;U BIT2 -- n 16 bit value with bitx set
;U BIT3 -- n 16 bit value with bitx set
;U BIT4 -- n 16 bit value with bitx set
;U BIT5 -- n 16 bit value with bitx set
;U BIT6 -- n 16 bit value with bitx set
;U BIT7 -- n 16 bit value with bitx set
;U LBL -- LED blink
;U LON -- Turn LED on, i.e. stop blink
;U LOFF -- Turn LED off.
;U ETC -- electronic time clock (stoppuhr)
;U ETCOFF -- Turn timer A0 off.
;U ETC@ -- etc1 etc0 ta0
;U portpin P1.3 --->0_0----GND
;U S2 -- mask port second button mask and port address
;U S2? -- f test button S2, true is pressed
;U portpin P1.7 --->0_0----GND
;U S3 -- mask port second button mask and port address
;U S3? -- f test button S2, true is pressed
;Z 1# n -- type 1 digit
;Z 2# n -- type 2 digits
;Z 4# n -- type 4 digits
;U ??? -- show uMMT user variables
;U SETGPIO -- select GPIO function of P2
;U SETOUTIN -- set direction register P2
;U ENRES -- set resistor enable register P2
;U INITP2 -- set all P2 defaults for uMMT
;U BIT7OUT -- set P2.7 to output direction
;U BIT6OUT -- set P2.6 to output direction
;U BIT5OUT -- set P2.5 to output direction
;U BIT4OUT -- set P2.4 to output direction
;U BIT7H -- set P2.7 (high)
;U BIT6H -- set P2.6 (high)
;U BIT5H -- set P2.5 (high)
;U BIT4H -- set P2.4 (high)
;U BIT7L -- reset P2.7 (low)
;U BIT6L -- reset P2.6 (low)
;U BIT5L -- reset P2.5 (low)
;U BIT4L -- reset P2.4 (low)
;U SCOUNTER n -- binary counter OUT, n sets tempo
;U COUNTER -- 8Hz binary counter OUT
;U OUT! n -- write n to upper nibble of P2 (4 LEDs)
;U IN@ -- n read lower nibble digital input of P2
;U OUTL -- write OUTV to upper nibble of P2 (4 LEDs)
;U 4shiftl -- shift value in OUTV to the left one nibble (up)
;Z ONTIME -- execute ON timer once
;Z OFFTIME -- execute OFF timer once
;U 1KHZ -- 1 kHz frequency, 50% duty cycle
;U 1KHZ25 -- 1 kHz frequency, 25% duty cycle
;U 1KHZ5 -- 1 kHz frequency, 5% duty cycle
;U 50HZ -- 50 Hz frequency, 50% duty cycle
;U LEFTMOST -- servo puls, turning servo to the left
;U MIDDLE -- servo puls, turning servo to a middle position
;U RIGHTMOST -- servo puls, turning servo to the right
; Examples =====================================================================
;U FRQ -- Output frequency at P2.7 using SW timer values.
;U POSITION -- drive servo line at P2.6 to position using SW1H value
;Z SLIM n -- lim limit n using values of SWL0 and SWL1
;U SERVO n -- make a new servo position by adding n to SWH1
;U SR -- turn servo to the right some degree
;U SL -- turn servo to the left some degree
;U PWM -- Output frequency at P2.5 using SW timer values.
;U SWEEP -- sweep PWM duty cycles up an dowm
;U INTOOUT -- endless loop reading IN and puting it OUT to the LEDs
;U COND-IN0 -- Condition of IN0 stored to OUT0, endless loop
;U INVERT-IN0 -- Invert IN0 and store to OUT0, endless loop
;U AND-IN01 -- logic AND of IN0 and IN1 stored to OUT0, endless loop
;U OR-IN01 -- logic OR of IN0 and IN1 stored to OUT0, endless loop
;U XOR-IN01 -- logic XOR of IN0 and IN1 stored to OUT0, endless loop
;U GAP -- play a short gap
;U DIT -- play a short tone
;U DAH -- play a long tone
;U CGAP -- play a character gap
;U WGAP -- play a word gap
;U SOS -- play morse code S O S once
;U ADC -- adc sample & convert once, fetch adc (pin 6, CA4, P1.4)
;U ADCR -- ADC to OUT (LEDs), endless loop
4e-uMMT-for-microbox.s43
;U INIT -- Set P2 I/O
;U LED0 -- mask port LEDx mask and OUT address
;U LED1 -- mask port LEDx mask and OUT address
;U LED2 -- mask port LEDx mask and OUT address
;U LED3 -- mask port LEDx mask and OUT address
;Z OUTV -- adr holds value for ON time