Advertisement
NovaYoshi

local

May 10th, 2017
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;unsigned short wario(unsigned short a, unsigned short b, unsigned short c, unsigned short d) {
  2.     code
  3.     xdef    __wario
  4.     func
  5. __wario:
  6.     longa   on
  7.     longi   on
  8.     tsc
  9.     sec
  10.     sbc #L2
  11.     tcs
  12.     phd
  13.     tcd
  14. a_0 set 3
  15. b_0 set 5
  16. c_0 set 7
  17. d_0 set 9
  18. ;  return a+b+c+d;
  19.     lda <L2+a_0
  20.     clc
  21.     adc <L2+b_0
  22.     clc
  23.     adc <L2+c_0
  24.     clc
  25.     adc <L2+d_0
  26.     tay
  27.     lda <L2+1
  28.     sta <L2+1+8
  29.     pld
  30.     tsc
  31.     clc
  32.     adc #L2+8
  33.     tcs
  34.     tya
  35.     rts
  36. ;}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement