ref: faae0e10290d962e595dceea5013c4b1ffea409f
parent: 8898f63fc788d1d0e9cb3efab7f833fcba07fe07
author: yenatch <[email protected]>
date: Tue Aug 27 21:24:52 EDT 2013
serial interrupt
--- a/main.asm
+++ b/main.asm
@@ -44,7 +44,7 @@
jp Timer
SECTION "serial",ROM0[$58] ; serial interrupt
- jp Function6ef
+ jp Serial
SECTION "joypad",ROM0[$60] ; joypad interrupt
jp JoypadInt
@@ -633,20 +633,24 @@
-Function6ef: ; 6ef
+Serial: ; 6ef
push af
push bc
push de
push hl
+
ld a, [$ffc9]
and a
jr nz, .asm_71c
+
ld a, [$c2d4]
bit 0, a
jr nz, .asm_721
+
ld a, [$ffcb]
inc a
jr z, .asm_726
+
ld a, [rSB]
ld [$ffce], a
ld a, [$ffcd]
@@ -654,7 +658,8 @@
ld a, [$ffcb]
cp $2
jr z, .asm_752
- ld a, $0
+
+ ld a, $00
ld [rSC], a
ld a, $80
ld [rSC], a
@@ -688,7 +693,7 @@
ld a, [rDIV]
bit 7, a
jr nz, .asm_73f
- ld a, $0
+ ld a, $00
ld [rSC], a
ld a, $80
ld [rSC], a