git.y1.nz

gbdk-2020

GameBoy Development Kit
download: https://git.y1.nz/archives/gbdk.tar.gz
README | Files | Log | Refs | LICENSE

gbdk-lib/libc/targets/sm83/lcd.s

      1 	.include	"global.s"
      2 
      3 
      4 	.area	_HEADER_LCD (ABS)
      5 
      6 	.org	0x48		; LCD
      7 .int_LCD:
      8 	JP	.int_lcd_handler
      9 
     10 	.area	_HOME
     11 
     12 .int_lcd_handler:
     13 	PUSH	AF
     14 	PUSH	HL
     15 	PUSH	BC
     16 	PUSH	DE
     17 	LD	HL, #.int_0x48 + 0
     18 	PUSH    HL		; for stack compatibility with std handler only!
     19 	LD	A,(HL+)
     20 	LD      H,(HL)
     21 	LD	L,A
     22 	OR	H
     23 	JR 	Z, 1$
     24 	RST     0x20		; .call_hl
     25 	LD	HL, #.int_0x48 + 2
     26 	LD	A,(HL+)
     27 	LD      H,(HL)
     28 	LD	L,A
     29 	OR      H
     30 	JR      Z, 1$
     31 	RST     0x20		; .call_hl
     32 	LD	HL, #.int_0x48 + 4
     33 	LD	A,(HL+)
     34 	LD      H,(HL)
     35 	LD	L,A
     36 	OR      H
     37 	CALL    NZ, .call_hl
     38 1$:
     39 	POP     HL
     40 	POP	DE
     41 	POP	BC
     42 	POP	HL
     43 
     44 	;; we return at least at the beginning of mode 2
     45 	WAIT_STAT
     46 
     47 	POP	AF
     48 	RETI
     49 
     50 _add_LCD::
     51 .add_LCD::
     52 	LD	HL,#.int_0x48
     53 	JP	.add_int
     54 
     55 _remove_LCD::
     56 .remove_LCD::
     57 	LD	HL,#.int_0x48
     58 	JP	.remove_int
     59 
     60 	.area	_DATA
     61 
     62 .int_0x48::
     63 	.blkw	0x04

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.