Skip to content

Commit

Permalink
Correct ALDI with zero value
Browse files Browse the repository at this point in the history
ALDI did not append anything to the alpha register if the value was
0, base was anything except decimal and zero-fill was inactive.
  • Loading branch information
hth313 committed May 12, 2020
1 parent f628428 commit 3879ea8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions doc/ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ Update to use OS4, May X, 2020.
digit, ended digit entry and disabled stack lift. This has now been
changed so that 0 is put in X and stack lift is disabled.

* ALDI did not append anything to the alpha register if the value was
0, base was anything except decimal and zero-fill was inactive.

## Version 0C

Expand Down
2 changes: 2 additions & 0 deletions src/ladybug.s
Original file line number Diff line number Diff line change
Expand Up @@ -4160,6 +4160,8 @@ ALDI: nop
44$: b=c x ; B.X= updated value
?st=1 Flag_ZeroFill
goc 45$
?c#0 m ; last digit?
gonc 45$ ; yes, we always emit that one
?c#0 xs
gonc 55$
st=1 Flag_ZeroFill ; non-zero seen
Expand Down

0 comments on commit 3879ea8

Please sign in to comment.