I am trying to write binary opcodes, but I can't in a text editor as 1s and 0s because:
1 or 0 on a text editor ends up being stored as the literal ASCII equivalent code on the storage medium, not the individual bit values as part of a machine instruction. I want to write a program in machine code to be executable directly to the CPU without assembling/etc. However, there's only one way I can think of:
I can flip the conundrum backwards, and instead of worrying about the formation of bits, I can write ASCII characters and save them in a text editor so long as their ASCII-binary equivalent matches the identical configuration of an opcode byte(s) for the target machine. But then the problem arises again ... there is not an existing one-byte ASCII character that can match every possible combination of bits within an opcode, so I can't code this way.
For me to write in machine code, I'd need a way of directly placing the right formation of bits that make up each byte(s) and instruction(s).
How could I do this?
CORRECTION: I am not trying to write a single bit at a time (not possible in x86), but get a byte configured with the correct bits in order to be stored that make up the correct machine instructions.