fix missing abs(byte) routine

This commit is contained in:
Irmen de Jong 2022-06-24 01:51:54 +02:00
parent eb53e44cb0
commit 5656ec11d3
3 changed files with 7 additions and 3 deletions

View File

@ -86,9 +86,9 @@ func_all_w_stack .proc
abs_b_stack .proc
; -- push abs(A) on stack (as unsigned word)
jsr abs_b_into_A
jsr abs_b_into_AY
sta P8ESTACK_LO,x
stz p8ESTACK_HI,x
stz P8ESTACK_HI,x
dex
rts
.pend

View File

@ -4,7 +4,7 @@ TODO
For next release
^^^^^^^^^^^^^^^^
- 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 some more optimizations in vmPeepholeOptimizer
- vm Instruction needs to know what the read-registers/memory are, and what the write-register/memory is.

View File

@ -48,6 +48,10 @@ main {
sub start() {
ubyte value
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): ")
wvalue = funcw() and funcFalseWord() and funcw() and funcw()