Advertisement
Aslai

Untitled

Nov 24th, 2011
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.             ;For the sake of this example,
  2.             ;(IX+0) = A.X1,
  3.             ;(IX+1) = A.Y1,
  4.             ;(IX+2) = A.X2,
  5.             ;(IX+3) = A.Y2,
  6.             ;(IX+4) = B.X1,
  7.             ;(IX+5) = B.Y1,
  8.             ;(IX+6) = B.X2,
  9.             ;(IX+7) = B.Y2
  10.    
  11.     LD A,(IX+0) ;A.X1
  12.     CP (IX+6)   ;B.X2
  13.     JP NC,False ;Excape if greater than
  14.     LD A,(IX+2) ;A.X2
  15.     CP (IX+4)   ;B.X1
  16.     JP C,False  ;Escape if less than
  17.     LD A,(IX+1) ;A.Y1
  18.     CP (IX+7)   ;B.Y2
  19.     JP NC,False ;Excape if greater than
  20.     LD A,(IX+3) ;A.Y2
  21.     CP (IX+5)   ;B.Y1
  22.     JP C,False  ;Escape if less than
  23.    
  24.             ;Do stuff if true
  25.  
  26. False:
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement