Close

Jumps simplification

A project log for ECM-16/TTL homebrew computer

16 bit Computer made from ttl logic chips

pavelPavel 11/20/2022 at 18:500 Comments

The State Machine diagram and Jump instruction layouts are updated.

It looks like there is no need for jumps with offsets in GPR - such jumps are unpredictable at time of coding/assembly, and it is likely that no use can be gained from such an instruction -> removing this option. 

Jumps using MPs other than PC as base would be too confusing, and there is also no clear idea what they can be used for -> removing this option.

It seems that jumps with current value in PC as base address are the only useful option -- they are easily predictable.

Thus, decode complexity is reduced, and now also there is no distinction between JMP and JSR states, so only one of them remains.

Jumping to absolute address can be accomplished using interrupts, or via direct or immediate load of address into PC register pair or via double-word MOV into this pair.

For JSR, use of PC can be made implicit.

All of the above simplifies the use of jumps in assembly, the instruction will look like this:

JUMP offset

,where JUMP is any of 10 varieties of jump instructions, and offset is the distance from jump address and current PC value.

In practice, the offset is to be calculated by the assembler, and user should use labels.

Discussions