Added STR and LDR to the cpp generator

This commit is contained in:
Kacper 2020-06-10 13:00:40 +01:00
parent 20f2adc4a1
commit 6839781fa0

View file

@ -254,6 +254,12 @@ string getInstructionHex(string instruction){
binary+="101001";
rs1="R0";
rs2="R0";
}else if(opcode=="LDR"){
binary+="101010";
rs2="R0";
}else if(opcode=="STR"){
binary+="101011";
rs2="R0";
}else if(opcode=="NOP"){
binary+="111110";
rd="R0";