back
Prime Number Compo


The Mission


Hi james. Your mission is now to determine whether a number is a prime number or not.

A prime number can only be divided by 1 & itself ; for example 0 is is NOT a prime number (can u divide something by 0??), 1 is NOT(exception), 2 is, 3 is, 4 isn't (coz 4/2=2), etc.. Have a look at this site


The Rulez

General rulez

  • Input is given in d0.l, it's an unsigned number
  • Result in d0.l : =1 if the input is prime number, 0 if not
  • The routine CAN crashes every register, except a7
  • The routine cannot use fpu, libraries, etc.., and shuld work on an 030


    Short Compo

  • It can only use a 512 bytes code section (shuld be enough:)
  • It can also use bruteforce!!
  • Rts is not included in size
  • Download the small package


    Fast Compo

  • It can only use a 1024 bytes code section and a 1 mb bss section wich is cleared before the first call
  • Rts is included in size
  • To get speed, two tests will be performed: the first one will call alot of times the routine with random numbers, the second one will clear Bss between calls. We'll take the average of the two tests
  • Download the fast package


    Deadline

    The deadline is Sun, February 18th

    Send your entry to tOlkIEn or Azure




  • Last change: 26.01.2001