mirror of
https://github.com/irmen/prog8.git
synced 2024-09-10 09:54:32 +00:00
fix missing abs(byte) routine
This commit is contained in:
parent
eb53e44cb0
commit
5656ec11d3
@ -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()
|
||||||
|
Loading…
Reference in New Issue
Block a user