Developing a java based assembler for 8085
<p>I am reading a text file which contains the assembly language program (like MOV A B; LDA 1600 etc). I want to convert this mnemonic code into object code (not in the same file but directly print them into the console).</p>

<p>For MOV I am replacing it by 01, A by 111, B by 000, C by 001, D by 010.
However  how should I replace MVI R,32 The opcode is 00rrr110 0011 0010 
Please suggest a general algorithm..</p>
