Skip to content

Instantly share code, notes, and snippets.

@zorchenhimer
Last active June 26, 2019 19:06
Show Gist options
  • Save zorchenhimer/9b9891de17a59d20c3984ce51ff05218 to your computer and use it in GitHub Desktop.
Save zorchenhimer/9b9891de17a59d20c3984ce51ff05218 to your computer and use it in GitHub Desktop.
;; cmp word [ball_x], WIDTH - BALL_WIDTH
ref_x: cmp word 30, WIDTH - BALL_WIDTH
;; the "+ 1" here is the size of the "cmp word" opcode
;; ball_x will point to the memory address of "30" above
%define ball_x (ref_x + 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment