Skip to content

Commit

Permalink
Corrigé bogue dans commande **SERVO.EN** la routine utilise **Y** mai…
Browse files Browse the repository at this point in the history
…s ne préservait pas la valeur. V3.2R2
  • Loading branch information
Picatout committed Apr 24, 2023
1 parent 00b135e commit 498f14b
Show file tree
Hide file tree
Showing 7 changed files with 151 additions and 149 deletions.
6 changes: 4 additions & 2 deletions BASIC/input.bas
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ NEW
10 INPUT "age? "A,"sex(1=M,2=F)? "S
14 IF A=0 : END
20 IF S=1 PRINT "man "; : GOTO 40
30 PRINT "woman ";
40 IF A>59 : PRINT "babyboomer": GOTO 10
30 IF S=2 PRINT "woman "; : GOTO 40
34 ? "unknown gender ";
40 IF A>59 and A < 88 : PRINT "babyboomer": GOTO 10
44 IF A>88 PRINT "very old": GOTO 10
50 PRINT "still young" : GOTO 10
8 changes: 0 additions & 8 deletions BASIC/iwdg_test.bas

This file was deleted.

10 changes: 5 additions & 5 deletions BASIC/loop_test.bas
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
new
NEW
5 ' performance test
10 LET T = TICKS
12 FOR I = 1 TO 10000
14 NEXT I
16 ? TICKS - T ; " msec"
16 ? TICKS - T ; " msec"
20 LET I = 1 , T = TICKS
22 DO LET I = I + 1
24 UNTIL I > 10000
26 ? TICKS - T;" msec"
26 ? TICKS - T ; " msec"
30 LET I = 1 , T = TICKS
32 LET I = I + 1
34 IF I <= 10000 GOTO 32
36 ? TICKS - T ; " msec"

36 ? TICKS - T ; " msec"
4 changes: 3 additions & 1 deletion TinyBasic.asm
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ move_exit:
;-----------------------
MAJOR=3
MINOR=2
REV=1
REV=2
software: .asciz "\n\nTiny BASIC for STM8\nCopyright, Jacques Deschenes 2019,2022,2023\nversion "
board:
Expand Down Expand Up @@ -2990,10 +2990,12 @@ cmd_servo_enable:
jreq timer1_disable
; set TIMER1 pre-divisor to 8
; Ftimer=2Mhz
pushw y
ldw y,#7
; Period=(x+1)/2e6=20msec
ldw x,#39999 ; period
call timer1_setup
popw y
_next
timer1_disable:
; disable TIMER1
Expand Down
Binary file modified build/stm8s207k8/TinyBasic.bin
Binary file not shown.
266 changes: 133 additions & 133 deletions build/stm8s207k8/TinyBasic.ihx

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions journal.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
### 2023-04-24

* test tous les programmes dans dossier BASIC.
* Corrigé bogue dans commande **SERVO.EN** la routine utilise **Y** mais ne préservait pas la valeur.


### 2023-04-23

* dernier test avec [BASIC/loop_test1.bas](BASIC/loop_test1.bas)
Expand Down

0 comments on commit 498f14b

Please sign in to comment.