Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Make IO words vectored

  • Loading branch information...
commit 329304133044ec564ce96f83cde9dedbe3471f3a 1 parent b82d604
Eckhart Köppen authored May 27, 2012
94  generic/CoreForth.s
@@ -132,6 +132,10 @@ cold_start:
132 132
     .word LIT, 10, BASE, STORE
133 133
     .word LIT, data_start, DP, STORE
134 134
     .word LIT, last_word, LATEST, STORE
  135
+    .word LIT, NOOP, DUP, TICKWAIT_KEY, STORE, TICKFINISH_OUTPUT, STORE
  136
+    .word LIT, XKEY, TICKKEY, STORE
  137
+    .word LIT, XEMIT, TICKEMIT, STORE
  138
+    .word LIT, READ_LINE, TICKACCEPT, STORE
135 139
     .word COLD
136 140
 
137 141
     .ltorg
@@ -270,7 +274,7 @@ readline:
270 274
     movs r3, r1
271 275
     beq readline_end
272 276
 readline_loop:
273  
-    bl read_key
  277
+    bl readkey
274 278
     cmp r0, #13
275 279
     beq readline_end
276 280
     cmp r0, #127
@@ -301,41 +305,6 @@ readline_end:
301 305
     subs r0, r5, r4
302 306
     pop {r3, r4, r5, pc}
303 307
 
304  
-/* read keys including escape sequences. Reading escape itself is
305  
- * not supported yet. Escape sequences return negative numbers
306  
- */
307  
-read_widekey:
308  
-    push {r4, r5, lr}
309  
-    bl read_key
310  
-    cmp r0, #27
311  
-    bne 1f
312  
-    bl read_key
313  
-    cmp r0, '['
314  
-    bne 1f
315  
-    bl read_key
316  
-    cmp r0, 'A'
317  
-    blt 3f
318  
-    cmp r0, 'Z'
319  
-    bgt 3f
320  
-    subs r4, r0, '@'
321  
-    b 4f
322  
-3:  movs r4, #10
323  
-    movs r5, #10
324  
-2:  cmp r0, '~'
325  
-    beq 4f
326  
-    cmp r0, '0'
327  
-    blt 1f
328  
-    cmp r0, '9'
329  
-    bgt 1f
330  
-    subs r0, '0'
331  
-    muls r4, r4, r5
332  
-    adds r4, r0
333  
-    bl read_key
334  
-    b 2b
335  
-4:  movs r0, #0
336  
-    subs r0, r4
337  
-1:  pop {r4, r5, pc}
338  
-
339 308
 printrstack:
340 309
     push {r4, lr}
341 310
     ldr r4, =addr_TASKZRTOS
@@ -889,7 +858,7 @@ fill_done:
889 858
     bl printrstack
890 859
     NEXT
891 860
 
892  
-    defcode "EMIT", EMIT
  861
+    defcode "PUTCHAR", PUTCHAR
893 862
     pop {r0}
894 863
     bl putchar
895 864
     NEXT
@@ -942,23 +911,41 @@ fill_done:
942 911
     defword ".", DOT
943 912
     .word DOTH, SPACE, EXIT
944 913
 
945  
-    defcode "(KEY)", XKEY
946  
-    bl read_key
947  
-    push {r0}
948  
-    NEXT
949  
-
950  
-    defcode "KEY", KEY
951  
-    bl read_widekey
  914
+    defcode "READ-KEY", READ_KEY
  915
+    bl readkey
952 916
     push {r0}
953 917
     NEXT
954 918
 
955  
-    defcode "READLINE", READLINE
956  
-    pop {r1}
957  
-    pop {r0}
  919
+    defcode "READ-LINE", READ_LINE
  920
+    ldr r0, =constaddr_TIB
  921
+    ldr r0, [r0]
  922
+    ldr r1, =constaddr_TIBSIZE
  923
+    ldr r1, [r1]
958 924
     bl readline
959 925
     push {r0}
960 926
     NEXT
961 927
 
  928
+    defword "WAIT-KEY", WAIT_KEY
  929
+    .word TICKWAIT_KEY, FETCH, EXECUTE, EXIT
  930
+
  931
+    defword "FINISH-OUTPUT", FINISH_OUTPUT
  932
+    .word TICKFINISH_OUTPUT, FETCH, EXECUTE, EXIT
  933
+
  934
+    defword "(KEY)", XKEY
  935
+    .word WAIT_KEY, READ_KEY, EXIT
  936
+
  937
+    defword "KEY", KEY
  938
+    .word TICKKEY, FETCH, EXECUTE, EXIT
  939
+
  940
+    defword "(EMIT)", XEMIT
  941
+    .word FINISH_OUTPUT, PUTCHAR, EXIT
  942
+
  943
+    defword "ACCEPT", ACCEPT
  944
+    .word TICKACCEPT, FETCH, EXECUTE, EXIT
  945
+
  946
+    defword "EMIT", EMIT
  947
+    .word TICKEMIT, FETCH, EXECUTE, EXIT
  948
+
962 949
     defword "DUMP", DUMP
963 950
     .word QDUP, QBRANCH, dump_end - .
964 951
     .word SWAP
@@ -1055,6 +1042,9 @@ is_positive:
1055 1042
 @ ---------------------------------------------------------------------
1056 1043
 @ -- Control flow -----------------------------------------------------
1057 1044
 
  1045
+    defcode "NOOP", NOOP
  1046
+    NEXT
  1047
+
1058 1048
     defcode "BRANCH", BRANCH
1059 1049
     ldr r0, [r7]
1060 1050
     adds r7, r0
@@ -1396,6 +1386,9 @@ words_loop:
1396 1386
     .word FETCH, QDUP, ZEQU, QBRANCH, words_loop - .
1397 1387
     .word EXIT
1398 1388
 
  1389
+    defword "DEFINED?", DEFINEDQ
  1390
+    .word BL, WORD, FIND, NIP, EXIT
  1391
+
1399 1392
 @ ---------------------------------------------------------------------
1400 1393
 @ -- Disassembler -----------------------------------------------------
1401 1394
 
@@ -1465,7 +1458,7 @@ QUOTE_CHARS:
1465 1458
 4:  .word TWODROP, EXIT
1466 1459
 
1467 1460
     defword "VALID-ADDR?", ISVALIDADDR
1468  
-    .word DUP, LIT, 0x400, LIT, last_word, WITHIN, QDUP, QBRANCH, 1f - .
  1461
+    .word DUP, LIT, 0x400, LIT, last_word, FROMLINK, CELL, ADD, WITHIN, QDUP, QBRANCH, 1f - .
1469 1462
     .word NIP, EXIT
1470 1463
 1:  .word LIT, ram_start, LIT, ram_top, WITHIN, EXIT
1471 1464
 
@@ -1662,6 +1655,11 @@ print_xt_suffix:
1662 1655
     defvar "SOURCE#", SOURCECOUNT
1663 1656
     defvar ">SOURCE", SOURCEINDEX
1664 1657
     defvar "UP", UP
  1658
+    defvar "\047KEY", TICKKEY
  1659
+    defvar "\047ACCEPT", TICKACCEPT
  1660
+    defvar "\047EMIT", TICKEMIT
  1661
+    defvar "\047WAIT-KEY", TICKWAIT_KEY
  1662
+    defvar "\047FINISH-OUTPUT", TICKFINISH_OUTPUT
1665 1663
 
1666 1664
 @ ---------------------------------------------------------------------
1667 1665
 @ -- Main task user variables -----------------------------------------
2  generic/Makefile
... ...
@@ -1,4 +1,4 @@
1  
-GEN = ../generic/ansi.gen.s ../generic/accept.gen.s \
  1
+GEN = ../generic/ansi.gen.s \
2 2
       ../generic/editor.gen.s ../generic/protothreads.gen.s \
3 3
       ../generic/find.gen.s ../generic/strings.gen.s ../generic/multitasking.gen.s \
4 4
       ../generic/blocks.gen.s ../generic/quit.gen.s
24  generic/accept.ft
... ...
@@ -1,24 +0,0 @@
1  
-DECIMAL
2  
-
3  
-: TIB-TAIL   >TIB @ TIB# @ OVER - SWAP TIB + SWAP ;
4  
-: .TIB-TAIL   CLR-EOL !CURSOR TIB-TAIL TYPE @CURSOR ;
5  
-: CURSOR>   1 >TIB +! CURSOR-RIGHT ;
6  
-: CURSOR<   1 >TIB -! CURSOR-LEFT ;
7  
-: INSERT   TIB-TAIL OVER 1+ SWAP CMOVE>   1 TIB# +!   TIB >TIB @ + C! ;
8  
-: DELETE   1 TIB# -! TIB-TAIL OVER 1+ -ROT CMOVE ;
9  
-: -START?   >TIB @ 0> ;   : -END?   >TIB @ TIB# @ < ;
10  
-: -FULL?   TIB# @ #TIB < ;
11  
-
12  
-: ACCEPT
13  
-    0 TIB# !   0 >TIB !
14  
-    BEGIN
15  
-        KEY
16  
-        CASE
17  
-            DUP 32 127 WITHIN -FULL? AND IF INSERT .TIB-TAIL CURSOR> ELSE
18  
-            DUP 127 = -START? AND IF DROP CURSOR< DELETE .TIB-TAIL ELSE
19  
-            DUP 8 = OVER -103 = OR -END? AND IF DROP DELETE .TIB-TAIL ELSE
20  
-            DUP 13 = OVER 10 = OR IF DROP TIB# @ EXIT ELSE
21  
-            DUP -3 = -END? AND IF DROP CURSOR> ELSE
22  
-            DUP -4 = -START? AND IF DROP CURSOR< ELSE
23  
-        ENDCASE
24  
-    AGAIN ;
68  generic/ansi.ft
@@ -13,14 +13,62 @@ DECIMAL
13 13
 : CLR-SOL   ANSI-ESC-START 49 EMIT 75 EMIT ;
14 14
 : CLR-LINE   ANSI-ESC-START 50 EMIT 75 EMIT ;
15 15
 
16  
--1 CONSTANT KEY-UP
17  
--2 CONSTANT KEY-DOWN
18  
--4 CONSTANT KEY-LEFT
19  
--3 CONSTANT KEY-RIGHT
20  
--101 CONSTANT KEY-HOME
21  
--104 CONSTANT KEY-END
22  
--102 CONSTANT KEY-INSERT
23  
--103 CONSTANT KEY-DELETE
24  
--105 CONSTANT KEY-PGUP
25  
--106 CONSTANT KEY-PGDOWN
  16
+$5B410000 CONSTANT KEY-UP
  17
+$5B420000 CONSTANT KEY-DOWN
  18
+$5B440000 CONSTANT KEY-LEFT
  19
+$5B430000 CONSTANT KEY-RIGHT
  20
+$5B317E00 CONSTANT KEY-HOME
  21
+$5B347E00 CONSTANT KEY-END
  22
+$5B327E00 CONSTANT KEY-INSERT
  23
+$5B337E00 CONSTANT KEY-DELETE
  24
+$5B357E00 CONSTANT KEY-PGUP
  25
+$5B367E00 CONSTANT KEY-PGDOWN
26 26
 127 CONSTANT KEY-BACKSPACE
  27
+
  28
+: ROTKEY   ( current rot-count key -- current' rot-count' )
  29
+    OVER ROTATE ROT OR SWAP 8 -
  30
+;
  31
+
  32
+: READWKEY
  33
+     WAIT-KEY READ-KEY   DUP #27 = IF
  34
+        DROP 0 #24 WAIT-KEY READ-KEY   DUP #91 = IF
  35
+            ROTKEY
  36
+            BEGIN
  37
+                WAIT-KEY READ-KEY DUP >R ROTKEY R>
  38
+                DUP #65 #91 WITHIN SWAP #126 = OR
  39
+            UNTIL DROP
  40
+        ELSE DUP #79 = IF
  41
+                ROTKEY WAIT-KEY READ-KEY ROTKEY DROP
  42
+            THEN
  43
+        THEN
  44
+    THEN
  45
+;
  46
+
  47
+: TIB-TAIL   >TIB @ TIB# @ OVER - SWAP TIB + SWAP ;
  48
+: .TIB-TAIL   CLR-EOL !CURSOR TIB-TAIL TYPE @CURSOR ;
  49
+: CURSOR>   1 >TIB +! CURSOR-RIGHT ;
  50
+: CURSOR<   1 >TIB -! CURSOR-LEFT ;
  51
+: INSERT   TIB-TAIL OVER 1+ SWAP CMOVE>   1 TIB# +!   TIB >TIB @ + C! ;
  52
+: DELETE   1 TIB# -! TIB-TAIL OVER 1+ -ROT CMOVE ;
  53
+: -START?   >TIB @ 0> ;   : -END?   >TIB @ TIB# @ < ;
  54
+: -FULL?   TIB# @ #TIB < ;
  55
+
  56
+: READLINE-CRSR
  57
+    0 TIB# !   0 >TIB !
  58
+    BEGIN
  59
+        KEY
  60
+        CASE
  61
+            DUP 32 127 WITHIN -FULL? AND IF INSERT .TIB-TAIL CURSOR> ELSE
  62
+            DUP 127 = -START? AND IF DROP CURSOR< DELETE .TIB-TAIL ELSE
  63
+            DUP 8 = OVER KEY-DELETE = OR -END? AND IF DROP DELETE .TIB-TAIL ELSE
  64
+            DUP 13 = OVER 10 = OR IF DROP TIB# @ EXIT ELSE
  65
+            DUP KEY-RIGHT = -END? AND IF DROP CURSOR> ELSE
  66
+            DUP KEY-LEFT = -START? AND IF DROP CURSOR< ELSE
  67
+        ENDCASE
  68
+    AGAIN
  69
+;
  70
+
  71
+: ANSI-IO
  72
+    ['] READWKEY 'KEY !
  73
+    ['] READLINE-CRSR  'ACCEPT !
  74
+;
9  generic/multitasking.ft
@@ -78,3 +78,12 @@ CELL -       USER TOS           \ task's top of stack when switching
78 78
     UNTIL
79 79
     DROP
80 80
 ;
  81
+
  82
+: STOP-FOR-KEY
  83
+    BEGIN KEY? 0= WHILE STOP REPEAT
  84
+;
  85
+
  86
+: MULTITASKING-KEY
  87
+    UP@ UART0-TASK !
  88
+    ['] STOP-FOR-KEY 'WAIT-KEY !
  89
+;
4  lm3s811/lm3s811_board.s
@@ -271,7 +271,7 @@ init_board:
271 271
     .align 2, 0
272 272
     .ltorg
273 273
 
274  
-read_key:
  274
+readkey:
275 275
     push {r1, r2, r3, lr}
276 276
 2:  ldr r1, =addr_SBUF_TAIL
277 277
     ldrb r3, [r1]
@@ -396,7 +396,7 @@ uart0_key_handler:
396 396
     adds r3, #1
397 397
     ands r3, r1
398 398
     strb r3, [r2]
399  
-    ldr r0, =addr_UART0_TASK
  399
+    ldr r0, =addr_UARTZ_TASK
400 400
     ldr r0, [r0]
401 401
     cmp r0, #0
402 402
     beq 2b
6  lm3s811/lm3s811_ram.ft
@@ -22,7 +22,9 @@ TASK0 AWAKE
22 22
     BEGIN ." Task 2 " PAUSE AGAIN
23 23
 ;
24 24
 
25  
-T1RUN
26  
-T2RUN
  25
+\ T1RUN
  26
+\ T2RUN
  27
+
  28
+ANSI-IO
27 29
 
28 30
 ABORT
2  lm3s811/lm3s811_words.s
@@ -180,6 +180,6 @@
180 180
     defvar "SBUF-HEAD", SBUF_HEAD
181 181
     defvar "SBUF-TAIL", SBUF_TAIL
182 182
     defvar "IVT", IVT, 48 * 4
183  
-    defvar "UART0-TASK", UART0_TASK
  183
+    defvar "UART0-TASK", UARTZ_TASK
184 184
 
185 185
     .ltorg
39  lm3s811/precompiled_words.s
@@ -559,39 +559,45 @@
559 559
     defword "CLR-LINE", CLR_LINE, 0x0
560 560
     .word ANSI_ESC_START, LIT, 0x32, EMIT, LIT, 0x4B, EMIT, EXIT
561 561
 
562  
-    defconst "KEY-UP", KEY_UP, 0xFFFFFFFF
  562
+    defconst "KEY-UP", KEY_UP, 0x5B410000
563 563
 
564 564
 
565  
-    defconst "KEY-DOWN", KEY_DOWN, 0xFFFFFFFE
  565
+    defconst "KEY-DOWN", KEY_DOWN, 0x5B420000
566 566
 
567 567
 
568  
-    defconst "KEY-LEFT", KEY_LEFT, 0xFFFFFFFC
  568
+    defconst "KEY-LEFT", KEY_LEFT, 0x5B440000
569 569
 
570 570
 
571  
-    defconst "KEY-RIGHT", KEY_RIGHT, 0xFFFFFFFD
  571
+    defconst "KEY-RIGHT", KEY_RIGHT, 0x5B430000
572 572
 
573 573
 
574  
-    defconst "KEY-HOME", KEY_HOME, 0xFFFFFF9B
  574
+    defconst "KEY-HOME", KEY_HOME, 0x5B317E00
575 575
 
576 576
 
577  
-    defconst "KEY-END", KEY_END, 0xFFFFFF98
  577
+    defconst "KEY-END", KEY_END, 0x5B347E00
578 578
 
579 579
 
580  
-    defconst "KEY-INSERT", KEY_INSERT, 0xFFFFFF9A
  580
+    defconst "KEY-INSERT", KEY_INSERT, 0x5B327E00
581 581
 
582 582
 
583  
-    defconst "KEY-DELETE", KEY_DELETE, 0xFFFFFF99
  583
+    defconst "KEY-DELETE", KEY_DELETE, 0x5B337E00
584 584
 
585 585
 
586  
-    defconst "KEY-PGUP", KEY_PGUP, 0xFFFFFF97
  586
+    defconst "KEY-PGUP", KEY_PGUP, 0x5B357E00
587 587
 
588 588
 
589  
-    defconst "KEY-PGDOWN", KEY_PGDOWN, 0xFFFFFF96
  589
+    defconst "KEY-PGDOWN", KEY_PGDOWN, 0x5B367E00
590 590
 
591 591
 
592 592
     defconst "KEY-BACKSPACE", KEY_BACKSPACE, 0x7F
593 593
 
594 594
 
  595
+    defword "ROTKEY", ROTKEY, 0x0
  596
+    .word OVER, ROTATE, ROT, OR, SWAP, LIT, 0x8, MINUS, EXIT
  597
+
  598
+    defword "READWKEY", READWKEY, 0x0
  599
+    .word WAIT_KEY, READ_KEY, DUP, LIT, 0x1B, EQU, QBRANCH, 0xC0, DROP, LIT, 0x0, LIT, 0x18, WAIT_KEY, READ_KEY, DUP, LIT, 0x5B, EQU, QBRANCH, 0x60, ROTKEY, WAIT_KEY, READ_KEY, DUP, GTR, ROTKEY, RGT, DUP, LIT, 0x41, LIT, 0x5B, WITHIN, SWAP, LIT, 0x7E, EQU, OR, QBRANCH, 0xFFFFFFB8, DROP, BRANCH, 0x30, DUP, LIT, 0x4F, EQU, QBRANCH, 0x18, ROTKEY, WAIT_KEY, READ_KEY, ROTKEY, DROP, EXIT
  600
+
595 601
     defword "TIB-TAIL", TIB_TAIL, 0x0
596 602
     .word GTTIB, FETCH, TIBNUM, FETCH, OVER, MINUS, SWAP, TIB, PLUS, SWAP, EXIT
597 603
 
@@ -619,8 +625,11 @@
619 625
     defword "-FULL?", MINUSFULLQ, 0x0
620 626
     .word TIBNUM, FETCH, NUMTIB, LT, EXIT
621 627
 
622  
-    defword "ACCEPT", ACCEPT, 0x0
623  
-    .word LIT, 0x0, TIBNUM, STORE, LIT, 0x0, GTTIB, STORE, KEY, DUP, LIT, 0x20, LIT, 0x7F, WITHIN, MINUSFULLQ, AND, QBRANCH, 0x18, INSERT, DOTTIB_TAIL, CURSORGT, BRANCH, 0x12C, DUP, LIT, 0x7F, EQU, MINUSSTARTQ, AND, QBRANCH, 0x1C, DROP, CURSORLT, DELETE, DOTTIB_TAIL, BRANCH, 0xF4, DUP, LIT, 0x8, EQU, OVER, LIT, 0xFFFFFF99, EQU, OR, MINUSENDQ, AND, QBRANCH, 0x18, DROP, DELETE, DOTTIB_TAIL, BRANCH, 0xAC, DUP, LIT, 0xD, EQU, OVER, LIT, 0xA, EQU, OR, QBRANCH, 0x1C, DROP, TIBNUM, FETCH, EXIT, BRANCH, 0x68, DUP, LIT, 0xFFFFFFFD, EQU, MINUSENDQ, AND, QBRANCH, 0x14, DROP, CURSORGT, BRANCH, 0x38, DUP, LIT, 0xFFFFFFFC, EQU, MINUSSTARTQ, AND, QBRANCH, 0x14, DROP, CURSORLT, BRANCH, 0x8, DROP, BRANCH, 0xFFFFFE94, EXIT
  628
+    defword "READLINE-CRSR", READLINE_CRSR, 0x0
  629
+    .word LIT, 0x0, TIBNUM, STORE, LIT, 0x0, GTTIB, STORE, KEY, DUP, LIT, 0x20, LIT, 0x7F, WITHIN, MINUSFULLQ, AND, QBRANCH, 0x18, INSERT, DOTTIB_TAIL, CURSORGT, BRANCH, 0x120, DUP, LIT, 0x7F, EQU, MINUSSTARTQ, AND, QBRANCH, 0x1C, DROP, CURSORLT, DELETE, DOTTIB_TAIL, BRANCH, 0xE8, DUP, LIT, 0x8, EQU, OVER, KEY_DELETE, EQU, OR, MINUSENDQ, AND, QBRANCH, 0x18, DROP, DELETE, DOTTIB_TAIL, BRANCH, 0xA4, DUP, LIT, 0xD, EQU, OVER, LIT, 0xA, EQU, OR, QBRANCH, 0x1C, DROP, TIBNUM, FETCH, EXIT, BRANCH, 0x60, DUP, KEY_RIGHT, EQU, MINUSENDQ, AND, QBRANCH, 0x14, DROP, CURSORGT, BRANCH, 0x34, DUP, KEY_LEFT, EQU, MINUSSTARTQ, AND, QBRANCH, 0x14, DROP, CURSORLT, BRANCH, 0x8, DROP, BRANCH, 0xFFFFFEA0, EXIT
  630
+
  631
+    defword "ANSI-IO", ANSI_IO, 0x0
  632
+    .word LIT, READWKEY, TICKKEY, STORE, LIT, READLINE_CRSR, TICKACCEPT, STORE, EXIT
624 633
 
625 634
     defconst "C/L", CSLASHL, 0x40
626 635
 
@@ -782,6 +791,12 @@
782 791
     defword ".TASKS", DOTTASKS, 0x0
783 792
     .word UPFETCH, DUP, DOTTASK, FOLLOWER, TICKS, FETCH, CELL, PLUS, DUP, UPFETCH, EQU, QBRANCH, 0xFFFFFFD4, DROP, EXIT
784 793
 
  794
+    defword "STOP-FOR-KEY", STOP_FOR_KEY, 0x0
  795
+    .word KEYQ, ZEQU, QBRANCH, 0x10, STOP, BRANCH, 0xFFFFFFE8, EXIT
  796
+
  797
+    defword "MULTITASKING-KEY", MULTITASKING_KEY, 0x0
  798
+    .word UPFETCH, UARTZ_TASK, STORE, LIT, STOP_FOR_KEY, TICKWAIT_KEY, STORE, EXIT
  799
+
785 800
     defword "INTERPRET", INTERPRET, 0x0
786 801
     .word LIT, 0x0, STATE, STORE, TIB, LPARENSOURCERPAREN, STORE, LIT, 0x0, GTSOURCE, STORE, ACCEPT, SOURCENUM, STORE, SPACE, LPARENINTERPRETRPAREN, QBRANCH, 0x20, DROP, LPARENSQUOTRPAREN, 0x6B6F2004, 0x20, TYPE, BRANCH, 0x18, COUNT, TYPE, LIT, 0x3F, EMIT, CR, EXIT
787 802
 
1  lm3s811/precompiler.s
@@ -4,7 +4,6 @@
4 4
 precompile_words:
5 5
     .include "lm3s811.gen.s"
6 6
     .include "ansi.gen.s"
7  
-    .include "accept.gen.s"
8 7
     .include "editor.gen.s"
9 8
     .include "blocks.gen.s"
10 9
     .include "protothreads.gen.s"
2  precompiler/board.s
@@ -82,7 +82,7 @@ _start:
82 82
 init_board:
83 83
     mov pc, lr
84 84
 
85  
-read_key:
  85
+readkey:
86 86
     b .
87 87
 
88 88
 putchar:
8  stm32p103/stm32p103_board.s
@@ -148,10 +148,10 @@ init_board:
148 148
     .align 2, 0
149 149
     .ltorg
150 150
 
151  
-read_key_interrupt:
  151
+readkey_interrupt:
152 152
     mov pc, lr
153 153
 
154  
-read_key_polled:
  154
+readkey_polled:
155 155
     push {r1, r2, r3, lr}
156 156
     ldr r1, =UART2
157 157
     mov r2, #32
@@ -163,9 +163,9 @@ read_key_polled:
163 163
     pop {r1, r2, r3, pc}
164 164
 
165 165
 .ifdef UART_USE_INTERRUPTS
166  
-    .set read_key, read_key_interrupt
  166
+    .set readkey, readkey_interrupt
167 167
 .else
168  
-    .set read_key, read_key_polled
  168
+    .set readkey, readkey_polled
169 169
 .endif
170 170
 
171 171
 putchar:

0 notes on commit 3293041

Please sign in to comment.
Something went wrong with that request. Please try again.