Skip to content

Commit

Permalink
Fixed bug where (L|R)SHIFT returned wrong result with non-constant ar…
Browse files Browse the repository at this point in the history
…gument 0
  • Loading branch information
neilsf committed Jan 2, 2021
1 parent 3ab2e7c commit 4b96909
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 7 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.3.06
v2.3.07
20 changes: 16 additions & 4 deletions lib/nucleus.asm
Original file line number Diff line number Diff line change
Expand Up @@ -2171,9 +2171,12 @@ NUCL_SQRW SUBROUTINE
tay
pla
.loop
cpy #$00
beq .endloop
asl
dey
bne .loop
bpl .loop ; = branch always
.endloop
IF !FPUSH
pha
ENDIF
Expand All @@ -2186,9 +2189,12 @@ NUCL_SQRW SUBROUTINE
tay
pla
.loop
cpy #$00
beq .endloop
lsr
dey
bne .loop
bpl .loop ; = branch always
.endloop
IF !FPUSH
pha
ENDIF
Expand All @@ -2208,10 +2214,13 @@ NUCL_SQRW SUBROUTINE
tay
tsx
.loop
cpy #$00
beq .endloop
asl.wx stack+2
rol.wx stack+1
dey
bne .loop
bpl .loop ; = branch always
.endloop
ENDM
MAC rshiftw
Expand All @@ -2221,10 +2230,13 @@ NUCL_SQRW SUBROUTINE
tay
tsx
.loop
cpy #$00
beq .endloop
lsr.wx stack+1
ror.wx stack+2
dey
bne .loop
bpl .loop ; = branch always
.endloop
ENDM
; LSHIFT!() function
Expand Down
2 changes: 1 addition & 1 deletion modules/xcb-module-grammar
2 changes: 1 addition & 1 deletion source/app.d
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ string listfile="";
* Version
*/

string compiler_version = "v2.3.06";
string compiler_version = "v2.3.07";

/**
* Application entry point
Expand Down

0 comments on commit 4b96909

Please sign in to comment.