Macros - itIsBrando/GBzLib GitHub Wiki

macros.inc contains routines pseudo ops and other useful functions

List of routines:

ld_indirect r16, [hl]

  • Performs a ld r16, [hl] instruction
  • ex: ld_indirect bc, [hl]

Destroys: A

sto_indirect [hl], r16

  • Performs a ld [hl], r16 pseudo opcode
  • ex: sto_indirect [hl], de

Destroys: A

enum

  • Creates an enumeration starting at 0
  • Unlimited number of parameters
  • ex: enum T1,T2,T3

Destroys: None

cart_name

  • For use in the header
  • Automatically pads string with 0s
  • ex: cart_name “Test Cart”

Destroys: None