@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ Dumps the heap from 'startaddr' to 'endaddr'.
@ This subroutine stomps on heap[1] after printing the first heap location.
@ If you dump starting from heap[0], then heap[1] will print inaccurately.
@ Starting the dump from any other location will work without error.
@ TODO: Should I use heap[0] and DIE rather than RTS?
@ At the moment, the ability to continue is too useful to me.
@ If it's useful to me, it's probably useful to other people.
@ For now, leave dumpheap as-is.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
NSSVTTTSSSN | Mark: 111000 (dump heap)
@ Prepare a numeric address and value on the stack
@ Print output line for this memory location
NSTTSSSSTTN | JSR>1000011 (print absolute value of number)
SSSTTTSTSN | PUSH ASCII ':'
SSSTSSTN | PUSH ASCII '\t'
NSTTSSTN | JSR>1001 (print number from stack)
SSSTSTSN | PUSH ASCII '\n'
@ Figure out if the loop is complete.
NTSSSTTTSSSSSSSSSSSN | BRZ > 00111000 00000000
NSNTTTSSSN | JMP>111000 (dump heap)
NSSVSSTTTSSSSSSSSSSSN | Mark: 00111000 00000000
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ Dumps 'count' entries from the stack.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
NSSVTTTSSTN | Mark: 111001 (dump stack)
@ Print output line for the current TOS.
NSTTSSSSTTN | JSR>1000011 (print absolute value of number)
SSSTTTSTSN | PUSH ASCII ':'
SSSTSSTN | PUSH ASCII '\t'
NSTTSSTN | JSR>1001 (print number from stack)
SSSTSTSN | PUSH ASCII '\n'
@ Figure out if the loop is complete.
NTSSSTTTSSTSSSSSSSSN | BRZ > 00111001 00000000
NSNTTTSSTN | JMP>111001 (dump stack)
NSSVSSTTTSSTSSSSSSSSN | Mark: 00111001 00000000