Advertisement
Guest User

In my own style

a guest
Apr 28th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; Moves the print cursor, clipping x and y to visible screen
  2. ; @param a New X position
  3. ; @param b New Y position
  4. PrintGotoXY:
  5.     cp a, PRINT_MAX_X
  6.     jr c, .setX
  7.     ld a, PRINT_MAX_X
  8. .setX
  9.     ld [PrintX], a
  10.  
  11.     ld a, b
  12.     cp a, PRINT_MAX_Y
  13.     jr c, .setY
  14.     ld a, PRINT_MAX_Y
  15. .setY
  16.     ld [PrintY], a
  17.     ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement