Edit: 6/25/19:
It turns out my CMPA proposal is not possible, as the Kenbak doesn't use status register bits for doing conditional jumps. Instead, it actually tests the state of the register (so a "jump if A is equal" literally means jump if A == 0). Since the whole point of the CMPA was avoid modifying A, that doesn't work. I'm going to leave the orignal post here (but turn it into italics), to avoid confusing people who read the thread fromt he top.
This may not fly well for Kenbak purists, but I would like to propose an additional opcode for the µKenbak-1 emulator.
Currently the opcodes 031x, where x is a memory address type 3-7, is treated as a two-byte NOP.
In the same way that 0360 has been used for the SYStem call, I propose that 031x be treated as a CMPA instruction, something that was not provided in the original instruction set. It is unfortunate that it wasn't, since SUBA used the opcode 01x , and CMPA is just a SUBA without storing the result. With the middle digit the same (1), I don't know why Mr. Blankenbaker left that as a NOP; the decoding couldn't have been that hard. Any existing 031x opcode can be replaced by two 0200 bytes.
The advantage of having a CMPA instruction is obvious, it allows one to compare the value in A with something without destroying it (requiring another instruction to reload it). With the limited memory in the µKenbak-1, saving two bytes here and there can make a difference.
Obviously, if one had a "real" Kenbak-1 (as I once did), this could have been accomplished by modifying the logic using the available schematics, since the CPU was implemented in discrete 7400 ICs. In fact I modified my machine to add an interrupt capability so I could efficiently read paper tape from an ASR-33 Teletype (I later removed the modification before selling it).
To be completely compatible with the original Kenbak-1, this new feature (CMPA opcode) could be enabled by setting a second flag (b1) in the RTC flags register, 010, to 1.
End of abandoned proposal. The remaining proposal, to extend the memory 10 1K, is still active:
Another, much bigger addition I've thought about would be the ability to extend the Kenbak-1's program memory to 1024 bytes (1 KB), in a way that doesn't impact current programs. Looking a the current emulator code, it appears there is a little over 4KB of program space, and 1200 bytes of RAM available, so this would be doable.
It turns out the unconditional branch instruction (jmp in my instruction set, or JMP DIRECT in the original) only requires the lower three bits to be in the range 3-7, but otherwise they are not used. If one always sets bit 2, then one could use the last two bits as a page #. The current opcode for jmp (0344 in my assembler) would still go to the base page 0. But opcodes 0345, 0346, and 0347 would go to pages 1 (address 0400-0777), 2 (address 01000-1377), or 3 (addresses (01400-01777). Opcodes of 0343 could be converted to 0344 in the emulator, to make them work with page 0 by default.
Any data references in instructions on the other pages would still go to the base page, so all data would be placed in page 0. The only exception, is that indirect jumps would go to the current page, to allow for subroutine returns to calls in the same page.
This would only work for unconditional jumps. Unconditional calls would always go to the current page (otherwise we would have to allocate two bytes for the return address, getting too messy). Not as nice as being able to call from one page to another, but that would be a big change and impact all existing code. If one is currently using 0344 for unconditional jumps, existing code is unaffected.
So one could continue a long program into page 1, then continue it again into page 2 etc.
Since all data references would still go to page 0, there would be no special locations (000-003, 0200-0203, and 0377) in the extended memory, so programs could use all of the space (768 bytes in three pages).
The bits for the additional two pages could be kept in bits b7 and b6 of location 0203 (X status register).
Once again, to be completely compatible with the original Kenbak-1, this new feature could be enabled/disabled using another flag (b2) in the RTC flags register, 010, so if disabled (0), jumps using 0345-0347 would always stay on page 0.
I would support both of these changes in my assembler, adding a cmpa opcode, and also jmp1 (0345), jmp2 (0346), and jmp3 (0347) opcaodes, which would be automatically generated when a user coded a jump to a label in another page. The existing jmp instruction would be left as is (0344) for page 0.
Tom