Assembly Language Division

From TRCCompSci - AQA Computer Science
Revision as of 09:03, 14 January 2019 by Admin (talk | contribs)
Jump to: navigation, search
1      INP R0,2
2      INP R1,2
3      MOV R2,#0
4 LOOP:SUB R0,R0,R1
5      ADD R2,R2,#1
6      CMP R0,#0
7      BGT LOOP
8      BEQ END
9      SUB R2,R2,#1
10 END:OUT R2,4
11     HALT