cscg22-gearboy

CSCG 2022 Challenge 'Gearboy'
git clone https://git.sinitax.com/sinitax/cscg22-gearboy
Log | Files | Refs | sfeed.txt

get_bk_t.s (324B)


      1	.include	"global.s"
      2
      3	.area	_HOME
      4
      5_get_bkg_tiles::
      6	PUSH	BC
      7
      8	LDA	HL,4(SP)	; Skip return address and registers
      9	LD	A,(HL+)		; D = x
     10	LD	D, A
     11	LD	E,(HL)		; E = y
     12	LDA	HL,9(SP)
     13	LD	A,(HL-)		; BC = tiles
     14	LD	B, A
     15	LD	A,(HL-)
     16	LD	C, A
     17	LD	A,(HL-)		; A = h
     18	LD	H,(HL)		; H = w
     19	LD	L,A		; L = h
     20
     21	CALL	.get_xy_btt
     22
     23	POP	BC
     24	RET