Skip to content

Commit

Permalink
Corrigé autre bogue dans UM/MOD lié au test de débordement de la divi…
Browse files Browse the repository at this point in the history
…sion
  • Loading branch information
Jacques committed Feb 8, 2021
1 parent ae8618c commit e412479
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build/eForth.ihx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
:208900009390FE90B3242F014FF7E7018188F1034D4158909390EE0290BF24909390FE9037
:20892000B3242F02EF021C000281890F034D494E909390EE0290BF24909390FE90B3242CC6
:2089400002EF021C000281892C0657495448494ECD8644CD888ECD85E3CD888ECD85C4CC83
:2089600088D5894906554D2F4D4F4489FEBF24160190EE041E01EE02B324230D855C5C902B
:2089600088D5894906554D2F4D4F4489FEBF24160190EE041E01EE02B324250D855C5C9029
:20898000AEFFFFFF905FEF0281A611B324250572B00024988C9059594A270425F220EC5679
:2089A000BF24855C5CFF90BE24EF02818964054D2F4D4F44CD861ACD8653CD861ACD85E3B1
:2089C000CD852889D1CD8840CD85E3CD8852CD85C4CD85E3CD861ACD8653CD852889E5CD3F
Expand Down
2 changes: 1 addition & 1 deletion build/eForth.lst
Original file line number Diff line number Diff line change
Expand Up @@ -3213,7 +3213,7 @@ Hexadecimal [24-Bits]
0008F4 1E 01 [ 2] 1797 LDW X,(1,SP) ; X
0008F6 EE 02 [ 2] 1798 LDW X,(2,X) ; X=udh
0008F8 B3 24 [ 2] 1799 CPW X,YTEMP
0008FA 23 0D [ 2] 1800 JRULE MMSM1 ; X is still on the R-stack
0008FA 25 0D [ 1] 1800 JRULT MMSM1 ; X is still on the R-stack
1801 ; division overflow return q=0,r=-1
0008FC 85 [ 2] 1802 POPW X
0008FD 5C [ 1] 1803 INCW X ; pop off 1 level
Expand Down
2 changes: 1 addition & 1 deletion build/eForth.rel
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,7 @@ T 00 08 EB
R 00 00 00 06
T 00 08 EB 89 FE BF 24 16 01 90 EE 04 1E 01 EE 02
R 00 00 00 06
T 00 08 F8 B3 24 23 0D 85 5C 5C 90 AE FF FF FF 90
T 00 08 F8 B3 24 25 0D 85 5C 5C 90 AE FF FF FF 90
R 00 00 00 06
T 00 09 05 5F EF 02 81
R 00 00 00 06
Expand Down
2 changes: 1 addition & 1 deletion build/eForth.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3213,7 +3213,7 @@ Hexadecimal [24-Bits]
008974 1E 01 [ 2] 1797 LDW X,(1,SP) ; X
008976 EE 02 [ 2] 1798 LDW X,(2,X) ; X=udh
008978 B3 24 [ 2] 1799 CPW X,YTEMP
00897A 23 0D [ 2] 1800 JRULE MMSM1 ; X is still on the R-stack
00897A 25 0D [ 1] 1800 JRULT MMSM1 ; X is still on the R-stack
1801 ; division overflow return q=0,r=-1
00897C 85 [ 2] 1802 POPW X
00897D 5C [ 1] 1803 INCW X ; pop off 1 level
Expand Down
4 changes: 4 additions & 0 deletions journal.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#### 2021-02-07

* Corrigé bogue autre bogue dans **UM/MOD** . Le test de débordement de la division acceptait un dividende dont la partie haute était égale au diviseur. hors une telle situation conduit à la perte du bit le plus significatif du quotient. Par exempel 0x20000 2 UM/MOD donnait 0 0 au lieu de 0 0x10000.

#### 2021-02-06
* Modification au [readme](readme.md)

Expand Down
2 changes: 1 addition & 1 deletion stm8ef.asm
Original file line number Diff line number Diff line change
Expand Up @@ -1797,7 +1797,7 @@ UMMOD:
LDW X,(1,SP) ; X
LDW X,(2,X) ; X=udh
CPW X,YTEMP
JRULE MMSM1 ; X is still on the R-stack
JRULT MMSM1 ; X is still on the R-stack
; division overflow return q=0,r=-1
POPW X
INCW X ; pop off 1 level
Expand Down

0 comments on commit e412479

Please sign in to comment.