Twenty four places moved Q into A or B by pushing it and popping it back. That is four bus cycles and two bytes to do what MVQA does in one of each, and several of them are inside loops - Life, the calculator, int8. Nineteen more loaded zero with INIA 0d0 where RSTA says the same thing in one byte. Both are equivalent at the CPU rather than by assertion: RSTA and INIA both leave Status alone, and PSHQ followed by POPA nets to A = Q with the Stack Pointer where it started. The one difference is that the pair leaves a copy of Q in memory just below the Stack Pointer and MVQA does not, which nothing here reads. Five recorded outputs moved and every one of them says the change worked: - 16x16Life fits five more generations into the same cycle budget, the first 457 lines identical, because the loop got cheaper. - Life.sbx is 1409 bytes rather than 1411, in three tests that list it. - Edit.sbx is 1995 rather than 1996. That last one broke a check I added this morning, and the hole is worth recording: the CosmOS README's claim about Edit's size did not have the word "Edit" on the same line as the number, because the subject was in the sentence before, so the check that measures quoted sizes skipped it silently. The sentence now names what it is talking about, which makes it both checkable and clearer, and the check fails on a wrong number there. Comments on either half of a replaced pair are carried onto the instruction that replaces them, so nothing anybody wrote was lost.
17 lines
347 B
Plaintext
17 lines
347 B
Plaintext
CosmOS
|
|
> greet.sbx 210
|
|
hello.sbx 52
|
|
Life.sbx 1409
|
|
Snake.sbx 2175
|
|
Keys.sbx 663
|
|
Say.sbx 155
|
|
Break.sbx 148
|
|
notes.txt 21
|
|
8 files
|
|
> loaded, starting at 4000
|
|
> it says: the disk took its time
|
|
finished
|
|
> halted
|
|
Execution halted.
|
|
[exit 0]
|