X-Git-Url: http://git.subgeniuskitty.com/vvhitespace/.git/blobdiff_plain/c6e2791fac7c7b29257588f99d350371d2e10627..d8954ff0eef3998b84815d6f05bea317a4fd3f41:/stdlib/stack.pvvs diff --git a/stdlib/stack.pvvs b/stdlib/stack.pvvs index c543d98..8705c6a 100644 --- a/stdlib/stack.pvvs +++ b/stdlib/stack.pvvs @@ -6,6 +6,7 @@ @ stackrotate @ Description: @ Maximum rotation depth is 14. Stomps on heap[1]-heap[15]. +@ Assumes rotation depth is at least 2. @ Call Stack: @ stack word n @ ... @@ -22,10 +23,11 @@ NSSVTSTSN | Mark: 1010 (stackrotate) @ For the convenience of other functions, modulo the @ rotation depth by the available registers. -SSSTTTSN | PUSH 14 +SSSTTTTN | PUSH 15 TSTT | MODULO @ Use heap[15] for generating register addresses. +@ TODO: Switch to using heap[1] so number of registers is limited only by user. SSSTTTTN | PUSH 15 (ptr) SSSSN | PUSH 0 TTS | STORE @@ -109,6 +111,7 @@ NTN | RTS @ stackrotatereverse @ Description: @ Maximum rotation depth is 14. Stomps on heap[1]-heap[15]. +@ Assumes rotation depth is at least 2. @ Call Stack: @ stack word n @ ... @@ -125,10 +128,11 @@ NSSVTSTTN | Mark: 1011 (stackrotatereverse) @ For the convenience of other functions, modulo the @ rotation depth by the available registers. -SSSTTTSN | PUSH 14 +SSSTTTTN | PUSH 15 TSTT | MODULO @ Use heap[15] for generating register addresses. +@ TODO: Switch to using heap[1] so number of registers is limited only by user. SSSTTTTN | PUSH 15 (ptr) SSSSN | PUSH 0 TTS | STORE