Assembly Language Division

From TRCCompSci - AQA Computer Science
Revision as of 08:17, 14 January 2019 by Admin (talk | contribs)
Jump to: navigation, search
      INP R0,2
      INP R1,2
      MOV R2,#0
LOOP: SUB R0,R0,R1
      ADD R2,R2,#1
      CMP R0,#0
      BGT LOOP
      BEQ END
      SUB R2,R2,#1
END:  OUT R2,4
      HALT