In other words: you're sticking by the mailbox?

This commit is contained in:
2015-06-09 15:36:34 +02:00
parent 58cf428549
commit 00533fcde1

View File

@@ -4,29 +4,29 @@
* Date : 2015-06-09
* Description: RTFT
*-----------------------------------------------------------
ORG $3000
ORG $3000
* Put program code here
FACTORIZATION:
move.l #2, D2
move.l #2, D2
FACTORIZATION_LOOP:
move.l D0, D3
divu D2, D0
swap D0
cmp.w #0, D0
beq FACTOR_FOUND
move.l D0, D3
divu D2, D0
swap D0
cmp.w #0, D0
beq FACTOR_FOUND
add.w #1, D2
move.l D3, D0
bra FACTORIZATION_LOOP
add.w #1, D2
move.l D3, D0
bra FACTORIZATION_LOOP
FACTOR_FOUND:
swap D0
move.w D2, (A1)+
swap D0
move.w D2, (A1)+
cmp.w #1, D0
bgt FACTORIZATION_LOOP
cmp.w #1, D0
bgt FACTORIZATION_LOOP
rts