I'm thinking about making a SUBLEQ based CPU on FPGA. SUBLEQ (subtract and branch if less than or equal to zero) is an instruction which is universal. However, how can you have immediates/constants with this?
One way is to have the compiler/assembler store constants at fixed locations in memory that you then access with your instruction by using it as an operand. Since you only have a subtract instruction you would actually load the 2's complement of the constant you need.
This technique was used with computers such as the PDP-8 although you could create some constants with judicious use of the various accumulator instructions.
The PDP-8 only had a 3 bit instruction field so 8 basic instructions. It didn't even have a load accumulator, you had to clear the accumulator then add a constant to it. (Of course you had to have placed that constant into memory in the first place).
This link shows some techniques (including this one) to use the single instruction computer. Using the SUBEQ instructions
You don't have immediate values available to you. Instead, you have to compute them by cleverly using your subleq instruction.