diff options
author | Naren Ratan <narenratan@gmail.com> | 2019-12-11 22:15:06 +0000 |
---|---|---|
committer | Naren Ratan <narenratan@gmail.com> | 2019-12-11 22:15:06 +0000 |
commit | b31dcba4ea3314343aece10e794ca12df94c78b1 (patch) | |
tree | 48028580e134979a2ea025742d842cee284a421b | |
parent | 13042477656e8c03e477038cce174042b7b99e0c (diff) | |
download | jonesforth_arm64_apl-b31dcba4ea3314343aece10e794ca12df94c78b1.tar.gz |
Add another count register
-rw-r--r-- | jonesforth.S | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/jonesforth.S b/jonesforth.S index 4af6701..53c1b7a 100644 --- a/jonesforth.S +++ b/jonesforth.S @@ -26,7 +26,8 @@ #define E x17 // End pointer #define OUTB x11 // Output buffer pointer -#define n x10 // Count register +#define n x9 // Count register +#define m x10 // Count register // Stack macros .macro push s,x; str \x,[\s,-8]!; .endm // e.g. push D,x0 pushes x0 to data stack @@ -116,6 +117,10 @@ def "n"; push D,n; NEXT; def "n!"; pop D,n; NEXT def "n+"; add n,n,1; NEXT; def "n-"; sub n,n,1; NEXT def "n0"; mov n,0; NEXT +def "m"; push D,m; NEXT; def "m!"; pop D,m; NEXT +def "m+"; add m,m,1; NEXT; def "m-"; sub m,m,1; NEXT +def "m0"; mov m,0; NEXT + def KEY; bl key; push D,x0; NEXT; key: cmp K,E; b.ge fill; ldrb w0,[K],1; ret // Fill buffer if exhausted and read next character |