e-LMC extended Little Man Computer bubble embedded program continuous input
问题 I am looking for a e-LMC extended little man computer program that will accept an indefinite inputs and bubble-sort them. I need to have more inputs continuous and then do the bubble sort. INP //read 1st value STA 0 // for store INP // read 2nd value STA 1 // store INP // read 3rd value STA 2 // store LDA 1 // LOOP 1, STEP 1: SUB 0 // BRP STEP2 // if R0 and R1 are in order, don't swap them LDA 1 // Begin swapping registers STA 3 LDA 0 STA 1 // R1 = R0 LDA 3 STA 0 //R0 = temp STEP2 LDA 2 //