How did these earlier programmers know what combinations of binary produced certain results? Is there a way I can create an assembler from binary today?
2 Answers
Every microprocessor has an instruction set. Each instruction corresponds to a specific binary code. You can find out which binary code corresponds to which processor instruction by reading the specification sheet for the microprocessor.
From there, it's simply a matter of specifying the binary codes in the right order to produce the desired result.
-
2
-
1
Robert Harvey is correct.
However, you can create an assembly language at the same time you write an assembler. It's a cyclical process, where you add code to the assembler to process your assembly language into operation codes, or opcodes.
Ideally, each assembly language instruction is represented by an opcode. Sometimes, one assembly instruction requires many opcodes.
You also need a linker, to link assembly object modules together into an executable program. Back when assembly was the only language choice, the linker was a separate program, run after your code was assembled.
-
1So to create an assembler, I should download the Intel list of opcodes and go from there? Commented Feb 15, 2015 at 23:39
-
1@user2759612 I wouldn't start from any list Intel produces, as to the best of my knowledge no such list is complete. The best list of opcodes and description of how they are generated to my knowledge is Appendix A of the NASM manual.– JulesCommented Feb 16, 2015 at 8:39