ThomasSpeedrunner

And GS said I couldn't do it...

Nov 18th, 2013
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     lea $FFFFD080,a1    ; Load Object_RAM+$80 into a1 to be read from later.
  2.     tst.b   $FFFFA420   ; Is flag $FFFFA420 set?
  3.     beq @u      ; If not, branch to subroutine "@u" without doing any other operation.
  4.     ; Otherwise:
  5.     bsr @u      ; Branch to subroutine "@u" once.
  6.     lea $FFFFD140,a1    ; Load Object_RAM+$140 into a1 to be read from later.
  7.     bsr @u      ; Branch to subroutine "@u" again.
  8.     lea $FFFFD180,a1    ; Load Object_RAM+$180 into a1 to be read from later.
  9. @u  btst    #0,$FFFFD04E    ; Test the first bit of flag $FFFFD04E. Is it set?
  10.     bne @d      ; If said bit is not set, branch.
  11.     addq.w  #4,$A(a1)   ; Quickly add 4 to whatever value is in the y-position equate (I think).
  12. @d  btst    #1,$FFFFD04E    ; Test the second bit of flag $FFFFD04E. Is it set?
  13.     bne @none       ; If said bit is not set, branch.
  14.     subq.w  #4,$A(a1)   ; Quickly subtract 4 from whatever value is in the y-position equate (I think).
  15. @l  btst    #2,$FFFFD04E    ; Test the third bit of flag $FFFFD04E. Is it set?
  16.     bne @r      ; If said bit is not set, branch.
  17.     addq.w  #8,8(a1)    ; Quickly add 8 to whatever value is in the x-position equate (I think).
  18. @r  btst    #3,$FFFFD04E    ; Test the fourth bit of flag $FFFFD04E. Is it set?
  19.     bne @none       ; If said bit is not set, branch.
  20.     subq.w  #8,8(a1)    ; Quickly subtract 8 from whatever value is in the x-position equate (I think).
  21. @none   rts         ; Go back to whatever we were doing before starting this subroutine.
Advertisement