mirror of
https://github.com/irmen/prog8.git
synced 2025-08-07 05:27:10 +00:00
fix missing abs(byte) routine
This commit is contained in:
@@ -86,9 +86,9 @@ func_all_w_stack .proc
|
|||||||
|
|
||||||
abs_b_stack .proc
|
abs_b_stack .proc
|
||||||
; -- push abs(A) on stack (as unsigned word)
|
; -- push abs(A) on stack (as unsigned word)
|
||||||
jsr abs_b_into_A
|
jsr abs_b_into_AY
|
||||||
sta P8ESTACK_LO,x
|
sta P8ESTACK_LO,x
|
||||||
stz p8ESTACK_HI,x
|
stz P8ESTACK_HI,x
|
||||||
dex
|
dex
|
||||||
rts
|
rts
|
||||||
.pend
|
.pend
|
||||||
|
@@ -4,7 +4,7 @@ TODO
|
|||||||
For next release
|
For next release
|
||||||
^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^
|
||||||
- bug: 2 repeats in same subroutine -> duplicate label error? see repeat_bug.p8
|
- bug: 2 repeats in same subroutine -> duplicate label error? see repeat_bug.p8
|
||||||
- bug: f_read() can't deal with running out of banked ram?
|
- bug: f_read() can't deal with running out of banked ram? maybe only cx16diskio.f_read()?
|
||||||
- add McCarthy evaluation to shortcircuit and/or expressions. Both conditional expressions and assignments!
|
- add McCarthy evaluation to shortcircuit and/or expressions. Both conditional expressions and assignments!
|
||||||
- add some more optimizations in vmPeepholeOptimizer
|
- add some more optimizations in vmPeepholeOptimizer
|
||||||
- vm Instruction needs to know what the read-registers/memory are, and what the write-register/memory is.
|
- vm Instruction needs to know what the read-registers/memory are, and what the write-register/memory is.
|
||||||
|
@@ -48,6 +48,10 @@ main {
|
|||||||
sub start() {
|
sub start() {
|
||||||
ubyte value
|
ubyte value
|
||||||
uword wvalue
|
uword wvalue
|
||||||
|
byte svalue = -99
|
||||||
|
|
||||||
|
wvalue = 3*abs(svalue) +abs(svalue)+abs(svalue)+abs(svalue)
|
||||||
|
txt.print_uw(wvalue)
|
||||||
|
|
||||||
txt.print("short and with false (word): ")
|
txt.print("short and with false (word): ")
|
||||||
wvalue = funcw() and funcFalseWord() and funcw() and funcw()
|
wvalue = funcw() and funcFalseWord() and funcw() and funcw()
|
||||||
|
Reference in New Issue
Block a user