;APS00000000000000000000000000000000000000000000000000000000000000000000000000000000 ;******************************************** ; ; Small primenumBaa by Rachael/Copy`n`Paste ; for Amycoders' PrimeNumber compo ; ; 68020+ only ; ; another 22 bytes ; Can be 14bytes if the 3 lines after .ud is removed ; but then d0 ain`t cleared if it is a none prime number. ; It still returnes a 1 for a prime though. ; ; ; Email: Rachael_@gmx.net ; ;******************************************** Test move.L #$ffffff,d0 bsr.b PrimeNumber rts ; -------- PrimeNumber ; Include your code here move.l d0,d1 .loop subq.l #$01,d0 beq.s .ud move.l d1,d2 .loop2 sub.l d0,d2 bhi.s .loop2 bne.s .loop .ud bftst d0{0:31} beq.s .exit clr.l d0 .exit rts PRINTT "Code size:" PRINTV .exit-PrimeNumber .