4 ms·
Any insight into how CALL/RET opcodes were decided or why they are in different groups? Is it merely that these would have been free opcodes? Digging up some s
by ngneer 3y ago
Any insight into how CALL/RET opcodes were decided or why they are in different groups? Is it merely that these would have been free opcodes?
Digging up some stack history:
https://en.wikichip.org/wiki/intel/mcs-4/4004 https://en.wikichip.org/wiki/intel/mcs-4/4004
4004 - 4-level stack using PCx registers, with JMS/BBL to transition to/from subroutine, causing return address pushes/pops (deepest ones lost);
4040 – 8-level stack using PCx registers;
8008 – 8-level stack using AS call levels;
8080 – stack pointer register (SP)
...
- kens 3y agoI think CALL/RET are mostly arbitrary, where there were free opcodes. But RET iw and RETF iw share the microcode, using bit 3 of the instruction to distinguish them. So they need to have opcodes differing only in bit 3.
- ngneer 3y agoCool, thank you! Interesting about the encoding proximity for flows with shared microcode. I wonder if that simplified the decoder.