fix min(), max(), sum(), abs()

This commit is contained in:
Irmen de Jong
2021-03-06 22:37:38 +01:00
parent 2950d26c8e
commit a1729b65ab
13 changed files with 112 additions and 97 deletions

View File

@@ -440,6 +440,7 @@ func_min_ub_stack .proc
func_min_b_into_A .proc
; -- min(barray) -> A. (array in P8ZP_SCRATCH_W1, num elements in A)
tay
dey
lda #127
sta P8ZP_SCRATCH_B1
- lda (P8ZP_SCRATCH_W1),y
@@ -556,6 +557,7 @@ func_min_w_stack .proc
func_max_ub_into_A .proc
; -- max(ubarray) -> A (array in P8ZP_SCRATCH_W1, num elements in A)
tay
dey
lda #0
sta P8ZP_SCRATCH_B1
- lda (P8ZP_SCRATCH_W1),y