Integer sequence: Difference between revisions

Content deleted Content added
Puppydrum64 (talk | contribs)
Puppydrum64 (talk | contribs)
Line 2,653: Line 2,653:


===Arbitrarily Large Integers===
===Arbitrarily Large Integers===
This version displays an ever-increasing 64-bit unsigned integer. Unlike the previous version, this one continues forever and underflows to 0 after it reaches <tt>0xFFFFFFFFFFFFFFFF</tt>. This logic can be extended to integers of any size, provided you have enough memory to store them all (and enough patience to watch them uptick - I think we all know which will run out first.)
This version displays an ever-increasing 64-bit unsigned integer. Unlike the previous version, this one continues forever and underflows to 0 after it reaches <tt>0xFFFFFFFFFFFFFFFF</tt>. This logic can be extended to integers of up to 128 bytes in size (since <code>IX+#</code> uses a signed offset, you'd need some way to alter the pointer to memory if you wanted even larger numbers than that, it's possible but a bit cumbersome. Not that this method wasn't cumbersome to begin with.)
<lang z80>org &1000
<lang z80>org &1000
PrintChar equ &BB5A
PrintChar equ &BB5A