daily pastebin goal
22%
SHARE
TWEET

2015 Challenge24 Finals: C2 by HoChockiGon

a guest Jul 1st, 2015 251 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. alias 0 tmp
  2. alias 4 i
  3. alias 104 n
  4. alias 108 sizeint
  5. alias 120 floop
  6. alias 128 finputloop_end
  7. alias 132 D
  8. alias 136 old
  9. alias 144 finnerloop
  10. alias 148 fchoose_old
  11. alias 156 fadd_and_cont
  12.  
  13. mov sizeint,SLOW_SIZEINT
  14. mov floop,addr_loop
  15. mov finputloop_end,addr_inputloop_end
  16. mov D,SLOW_D
  17. mov finnerloop,addr_innerloop
  18. mov fchoose_old,addr_choose_old
  19. mov fadd_and_cont,addr_add_and_cont
  20.  
  21. jmp inputloop
  22. add_and_cont:
  23.     rmov tmp,*i
  24. inputloop:
  25.     in tmp
  26.     jz tmp,*finputloop_end
  27.     mov i,tmp
  28.     div i,D
  29.     mul i,sizeint
  30.     mov old,*i
  31.     jz old,*fadd_and_cont
  32.     innerloop:
  33.         sub old,tmp
  34.         jneg old,*fchoose_old
  35.         mov old,*i
  36.         choose_new:
  37.             rmov tmp,*i
  38.             mov tmp,old
  39.         choose_old:
  40.             add i,sizeint
  41.             mov old,*i
  42.             jz old,*fadd_and_cont
  43.             jmp *finnerloop
  44. inputloop_end:
  45.  
  46. xor i,i
  47. add i,OFFSET
  48. rmov SLOW_MONE,*i
  49. mov i,SLOW_TSIZE
  50. loop:
  51.     mov tmp,*i
  52.     sub i,sizeint
  53.     jz tmp,*floop
  54.     jneg tmp,0
  55.     out tmp
  56.     jmp *floop
  57.  
  58. SLOW_SIZEINT:
  59. dw 4
  60. SLOW_TSIZE:
  61. dw 6868
  62. SLOW_D:
  63. dw 1250000
  64. addr_loop:
  65. dw loop
  66. addr_inputloop_end:
  67. dw inputloop_end
  68. addr_innerloop:
  69. dw innerloop
  70. addr_choose_old:
  71. dw choose_old
  72. SLOW_MONE:
  73. dw -1
  74. addr_add_and_cont:
  75. dw add_and_cont
  76. OFFSET:
  77. dw 3196
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top