diff options
| Commit | 5e9819bd6c535f42d68c896e21fa060d048aa43d (patch) | |
|---|---|---|
| Author | 2025-08-03 12:11:09 +0300 | |
| Committer | 2025-08-03 12:11:09 +0300 | |
| Files | 8d3368e46103c5d446acc73f466211703e15b535 /catalan/math.a65 | |
| c64-programs-5e9819bd6c535f42d68c896e21fa060d048aa43d.tar c64-programs-5e9819bd6c535f42d68c896e21fa060d048aa43d.tar.gz c64-programs-5e9819bd6c535f42d68c896e21fa060d048aa43d.zip | ||
| Parent | 9a0030d051bbfe54a987bf3628d9e87779276241 (diff) | |
feat(catalan): Implement number printing subroutine
1 files changed, 13 insertions, 0 deletions
| -rw-r--r-- | catalan/math.a65 | 13 |
diff --git a/catalan/math.a65 b/catalan/math.a65 index 667d651..3a93854 100644 --- a/catalan/math.a65 +++ b/catalan/math.a65 @@ -1,6 +1,19 @@ #ifndef CATALAN_MATH #define CATALAN_MATH +#define starg(name, value) .( :\ + pha ; push a :\ + lda value ; a = value :\ + sta name ; name = a :\ + pla ; pop a :\ +.) + +#define applya(subroutine, valuea, arg, value) .( :\ + lda valuea :\ + starg(arg, value) :\ + jsr subroutine :\ +.) + ; a *= multa_arg multa .( ora #0 ; Update flags, so they're accurate with the accumulator value |
