BGE rmv15@If the multiple of 3 is greater than 1000, go to rmv15
BGE rmv15@If the multiple of 3 is greater than 1000, go to rmv15
check5:
check5:
CMP R1,#1000@Is R1 less than 1000?
CMP R1,R3@Is R1 less than 1000?
BLT loop@If true, go back to loop
BLT loop@If true, go back to loop
BGE add3@If the multiple of 5 reaches 1000, go to add3 - Continue adding multiples of 3, because those wouldn't have reached 1000 yet
BGE add3@If the multiple of 5 reaches 1000, go back to add3 instead of loop - Continue adding multiples of 3, because those wouldn't have reached 1000 yet
rmv15:
rmv15:
MOV R0,#15@The loop that follows is intended to subtract multiples of 15, which would have been added twice - 3, 6, 9, 12, 15, 18 ; 5, 10, 15, 20
MOV R0,#15@The loop that follows is intended to subtract multiples of 15, which would have been added twice - 3, 6, 9, 12, [15], 18 ; 5, 10, [15], 20