Skip to content

Instantly share code, notes, and snippets.

@reidrac
Created September 8, 2018 20:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reidrac/981ebfb3c08611fd556f9ec83dc3413a to your computer and use it in GitHub Desktop.
Save reidrac/981ebfb3c08611fd556f9ec83dc3413a to your computer and use it in GitHub Desktop.
di ;c000
in a,(0a8h) ;c001
and 0f3h ;c003
ld hl,04000h ;c005
ld c,004h ;c008
call sub_c04bh ;c00a
and 0cfh ;c00d
ld c,010h ;c00f
lc011h:
ld hl,08000h ;c011
call sub_c04bh ;c014
call 000e1h ;c017
ld hl,04000h ;c01a
ld b,0feh ;c01d
lc01fh:
call sub_c041h ;c01f
cp 041h ;c022
jr nz,lc01fh ;c024
ld (hl),a ;c026
inc hl ;c027
lc028h:
call sub_c041h ;c028
ld (hl),a ;c02b
inc hl ;c02c
djnz lc028h ;c02d
ld b,07fh ;c02f
lc031h:
push bc ;c031
ld b,000h ;c032
lc034h:
call sub_c041h ;c034
ld (hl),a ;c037
inc hl ;c038
djnz lc034h ;c039
pop bc ;c03b
djnz lc031h ;c03c
jp 0402ah ;c03e
sub_c041h:
push bc ;c041
push hl ;c042
push de ;c043
call 000e4h ;c044
pop de ;c047
pop hl ;c048
pop bc ;c049
ret ;c04a
sub_c04bh:
ld b,004h ;c04b
lc04dh:
out (0a8h),a ;c04d
ld (hl),a ;c04f
cp (hl) ;c050
jr z,lc056h ;c051
add a,c ;c053
djnz lc04dh ;c054
lc056h:
ret ;c056
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment