; Disassembly of the file "C:\Documents and Settings\Martin\My Documents\Vintage\California Computer systems\S-100 Boards\CCS 2810 Z80 CPU\U8.bin"
; 
; CPU Type: Z80
; 
; Created with dZ80 2.0
; 
; on Wednesday, 03 of February 2010 at 04:07 PM
; 
0000 c35bf0    jp      0f05bh
0003 c346f6    jp      0f646h
0006 c356f6    jp      0f656h
0009 c300f6    jp      0f600h
000c c37cf6    jp      0f67ch
000f c310f6    jp      0f610h
0012 c323f6    jp      0f623h
0015 c36af1    jp      0f16ah
0018 c365f1    jp      0f165h
001b c38af0    jp      0f08ah
001e c394f6    jp      0f694h
0021 c394f6    jp      0f694h
0024 c3cff3    jp      0f3cfh
0027 f8        ret     m

0028 f0        ret     p

0029 09        add     hl,bc
002a f1        pop     af
002b 09        add     hl,bc
002c f1        pop     af
002d ac        xor     h
002e f1        pop     af
002f f6f4      or      0f4h
0031 3c        inc     a
0032 f1        pop     af
0033 fdf1      pop     af
0035 d0        ret     nc

0036 f5        push    af
0037 4d        ld      c,l
0038 f209f1    jp      p,0f109h
003b 09        add     hl,bc
003c f1        pop     af
003d 0ef5      ld      c,0f5h
003f 5d        ld      e,l
0040 f209f1    jp      p,0f109h
0043 55        ld      d,l
0044 f209f1    jp      p,0f109h
0047 21f54c    ld      hl,4cf5h
004a f5        push    af
004b 67        ld      h,a
004c f28ff2    jp      p,0f28fh
004f 09        add     hl,bc
0050 f1        pop     af
0051 91        sub     c
0052 f1        pop     af
0053 8d        adc     a,l
0054 f5        push    af
0055 ecf29f    call    pe,9ff2h
0058 f482f1    call    p,0f182h
005b f3        di      
005c 313f00    ld      sp,003fh
005f 2100c3    ld      hl,0c300h
0062 11b2f6    ld      de,0f6b2h
0065 0610      ld      b,10h
0067 d5        push    de
0068 e5        push    hl
0069 10fc      djnz    0067h
006b 3195f0    ld      sp,0f095h
006e 3ec5      ld      a,0c5h
0070 0100f0    ld      bc,0f000h
0073 21ffff    ld      hl,0ffffh
0076 24        inc     h
0077 7e        ld      a,(hl)
0078 2f        cpl     
0079 77        ld      (hl),a
007a be        cp      (hl)
007b 2f        cpl     
007c 77        ld      (hl),a
007d 2004      jr      nz,0083h
007f 7c        ld      a,h
0080 b8        cp      b
0081 20f3      jr      nz,0076h
0083 25        dec     h
0084 01deff    ld      bc,0ffdeh
0087 09        add     hl,bc
0088 c1        pop     bc
0089 c9        ret     

008a e5        push    hl
008b cd6ff0    call    0f06fh
008e 7d        ld      a,l
008f d63c      sub     3ch
0091 3001      jr      nc,0094h
0093 25        dec     h
0094 44        ld      b,h
0095 e1        pop     hl
0096 c9        ret     

0097 99        sbc     a,c
0098 f0        ret     p

0099 f9        ld      sp,hl
009a 1145f4    ld      de,0f445h
009d eb        ex      de,hl
009e 011d00    ld      bc,001dh
00a1 edb0      ldir    
00a3 010600    ld      bc,0006h
00a6 d5        push    de
00a7 e1        pop     hl
00a8 2b        dec     hl
00a9 edb0      ldir    
00ab 21e8ff    ld      hl,0ffe8h
00ae 39        add     hl,sp
00af e5        push    hl
00b0 23        inc     hl
00b1 23        inc     hl
00b2 220600    ld      (0006h),hl
00b5 160a      ld      d,0ah
00b7 c5        push    bc
00b8 15        dec     d
00b9 20fc      jr      nz,00b7h
00bb cd94f6    call    0f694h
00be cd9ff4    call    0f49fh
00c1 cd94f6    call    0f694h
00c4 2190f4    ld      hl,0f490h
00c7 cd95f6    call    0f695h
00ca 1843      jr      010fh
00cc 0601      ld      b,01h
00ce 210000    ld      hl,0000h
00d1 180c      jr      00dfh
00d3 1079      djnz    014eh
00d5 2032      jr      nz,0109h
00d7 05        dec     b
00d8 c8        ret     z

00d9 210000    ld      hl,0000h
00dc cd7bf3    call    0f37bh
00df 4f        ld      c,a
00e0 cdb0f3    call    0f3b0h
00e3 3808      jr      c,00edh
00e5 29        add     hl,hl
00e6 29        add     hl,hl
00e7 29        add     hl,hl
00e8 29        add     hl,hl
00e9 b5        or      l
00ea 6f        ld      l,a
00eb 18ef      jr      00dch
00ed e3        ex      (sp),hl
00ee e5        push    hl
00ef 79        ld      a,c
00f0 cdc3f3    call    0f3c3h
00f3 30e0      jr      nc,00d5h
00f5 1012      djnz    0109h
00f7 c9        ret     

00f8 cd7bf3    call    0f37bh
00fb 216ef1    ld      hl,0f16eh
00fe 110500    ld      de,0005h
0101 0604      ld      b,04h
0103 be        cp      (hl)
0104 2842      jr      z,0148h
0106 19        add     hl,de
0107 10fa      djnz    0103h
0109 218cf4    ld      hl,0f48ch
010c cd98f6    call    0f698h
010f 2a0600    ld      hl,(0006h)
0112 f9        ld      sp,hl
0113 210ff1    ld      hl,0f10fh
0116 e5        push    hl
0117 220100    ld      (0001h),hl
011a 3ec3      ld      a,0c3h
011c 320000    ld      (0000h),a
011f cda9f6    call    0f6a9h
0122 cd78f3    call    0f378h
0125 d641      sub     41h
0127 38e0      jr      c,0109h
0129 fe1a      cp      1ah
012b 30dc      jr      nc,0109h
012d 87        add     a,a
012e 5f        ld      e,a
012f 1600      ld      d,00h
0131 0602      ld      b,02h
0133 2127f0    ld      hl,0f027h
0136 19        add     hl,de
0137 7e        ld      a,(hl)
0138 23        inc     hl
0139 66        ld      h,(hl)
013a 6f        ld      l,a
013b e9        jp      (hl)
013c cd86f3    call    0f386h
013f 71        ld      (hl),c
0140 cd8ff3    call    0f38fh
0143 30fa      jr      nc,013fh
0145 d1        pop     de
0146 18c7      jr      010fh
0148 50        ld      d,b
0149 0604      ld      b,04h
014b cd78f3    call    0f378h
014e 23        inc     hl
014f be        cp      (hl)
0150 2081      jr      nz,00d3h
0152 68        ld      l,b
0153 2d        dec     l
0154 42        ld      b,d
0155 2603      ld      h,03h
0157 05        dec     b
0158 2804      jr      z,015eh
015a 29        add     hl,hl
015b 29        add     hl,hl
015c 10fc      djnz    015ah
015e 3a0300    ld      a,(0003h)
0161 b4        or      h
0162 ac        xor     h
0163 b5        or      l
0164 4f        ld      c,a
0165 79        ld      a,c
0166 320300    ld      (0003h),a
0169 c9        ret     

016a 3a0300    ld      a,(0003h)
016d c9        ret     

016e 4c        ld      c,h
016f 32314c    ld      (4c31h),a
0172 54        ld      d,h
0173 50        ld      d,b
0174 323150    ld      (5031h),a
0177 54        ld      d,h
0178 52        ld      d,d
0179 323150    ld      (5031h),a
017c 54        ld      d,h
017d 43        ld      b,e
017e 314243    ld      sp,4342h
0181 54        ld      d,h
0182 0602      ld      b,02h
0184 cd8ff6    call    0f68fh
0187 fe07      cp      07h
0189 20f7      jr      nz,0182h
018b cd7ef3    call    0f37eh
018e 10f4      djnz    0184h
0190 c9        ret     

0191 cd86f3    call    0f386h
0194 0a        ld      a,(bc)
0195 c5        push    bc
0196 46        ld      b,(hl)
0197 b8        cp      b
0198 280c      jr      z,01a6h
019a f5        push    af
019b cdfbf5    call    0f5fbh
019e 78        ld      a,b
019f cdf4f5    call    0f5f4h
01a2 f1        pop     af
01a3 cde6f5    call    0f5e6h
01a6 c1        pop     bc
01a7 cd9bf3    call    0f39bh
01aa 18e8      jr      0194h
01ac cda4f6    call    0f6a4h
01af cdfbf5    call    0f5fbh
01b2 7d        ld      a,l
01b3 cdf0f1    call    0f1f0h
01b6 e5        push    hl
01b7 7e        ld      a,(hl)
01b8 cde6f5    call    0f5e6h
01bb cd8ff3    call    0f38fh
01be 382a      jr      c,01eah
01c0 cdfef5    call    0f5feh
01c3 7d        ld      a,l
01c4 e60f      and     0fh
01c6 20ef      jr      nz,01b7h
01c8 e1        pop     hl
01c9 7d        ld      a,l
01ca e60f      and     0fh
01cc cdf5f1    call    0f1f5h
01cf 7e        ld      a,(hl)
01d0 e67f      and     7fh
01d2 4f        ld      c,a
01d3 fe20      cp      20h
01d5 3804      jr      c,01dbh
01d7 fe7e      cp      7eh
01d9 3802      jr      c,01ddh
01db 0e2e      ld      c,2eh
01dd cd09f0    call    0f009h
01e0 cd9cf3    call    0f39ch
01e3 7d        ld      a,l
01e4 e60f      and     0fh
01e6 20e7      jr      nz,01cfh
01e8 18c5      jr      01afh
01ea 93        sub     e
01eb cdf0f1    call    0f1f0h
01ee 18d8      jr      01c8h
01f0 e60f      and     0fh
01f2 47        ld      b,a
01f3 87        add     a,a
01f4 80        add     a,b
01f5 47        ld      b,a
01f6 04        inc     b
01f7 cdfef5    call    0f5feh
01fa 10fb      djnz    01f7h
01fc c9        ret     

01fd cdc0f3    call    0f3c0h
0200 3837      jr      c,0239h
0202 2810      jr      z,0214h
0204 cdccf0    call    0f0cch
0207 d1        pop     de
0208 213400    ld      hl,0034h
020b 39        add     hl,sp
020c 72        ld      (hl),d
020d 2b        dec     hl
020e 73        ld      (hl),e
020f 79        ld      a,c
0210 fe0d      cp      0dh
0212 2825      jr      z,0239h
0214 0602      ld      b,02h
0216 213500    ld      hl,0035h
0219 39        add     hl,sp
021a c5        push    bc
021b e5        push    hl
021c 0602      ld      b,02h
021e cdd7f0    call    0f0d7h
0221 d1        pop     de
0222 e1        pop     hl
0223 7a        ld      a,d
0224 b3        or      e
0225 280a      jr      z,0231h
0227 73        ld      (hl),e
0228 23        inc     hl
0229 72        ld      (hl),d
022a 23        inc     hl
022b 1a        ld      a,(de)
022c 77        ld      (hl),a
022d 23        inc     hl
022e 3ecf      ld      a,0cfh
0230 12        ld      (de),a
0231 79        ld      a,c
0232 fe0d      cp      0dh
0234 c1        pop     bc
0235 2802      jr      z,0239h
0237 10e1      djnz    021ah
0239 cda9f6    call    0f6a9h
023c e1        pop     hl
023d 2143f4    ld      hl,0f443h
0240 e5        push    hl
0241 21cff3    ld      hl,0f3cfh
0244 220900    ld      (0009h),hl
0247 211800    ld      hl,0018h
024a 39        add     hl,sp
024b d1        pop     de
024c e9        jp      (hl)
024d cdd7f0    call    0f0d7h
0250 c1        pop     bc
0251 ed58      in      e,(c)
0253 1851      jr      02a6h
0255 cdd9f0    call    0f0d9h
0258 d1        pop     de
0259 c1        pop     bc
025a ed59      out     (c),e
025c c9        ret     

025d cd86f3    call    0f386h
0260 7e        ld      a,(hl)
0261 02        ld      (bc),a
0262 cd9bf3    call    0f39bh
0265 18f9      jr      0260h
0267 cdd7f0    call    0f0d7h
026a e1        pop     hl
026b 7e        ld      a,(hl)
026c cdf4f5    call    0f5f4h
026f cdc0f3    call    0f3c0h
0272 d8        ret     c

0273 280f      jr      z,0284h
0275 fe0a      cp      0ah
0277 280d      jr      z,0286h
0279 e5        push    hl
027a cdccf0    call    0f0cch
027d d1        pop     de
027e e1        pop     hl
027f 73        ld      (hl),e
0280 79        ld      a,c
0281 fe0d      cp      0dh
0283 c8        ret     z

0284 23        inc     hl
0285 23        inc     hl
0286 2b        dec     hl
0287 7d        ld      a,l
0288 e607      and     07h
028a ccfbf5    call    z,0f5fbh
028d 18dc      jr      026bh
028f cda4f6    call    0f6a4h
0292 7e        ld      a,(hl)
0293 f5        push    af
0294 2f        cpl     
0295 77        ld      (hl),a
0296 ae        xor     (hl)
0297 c4a1f2    call    nz,0f2a1h
029a f1        pop     af
029b 77        ld      (hl),a
029c cd9cf3    call    0f39ch
029f 18f1      jr      0292h
02a1 d5        push    de
02a2 5f        ld      e,a
02a3 cdfbf5    call    0f5fbh
02a6 0608      ld      b,08h
02a8 7b        ld      a,e
02a9 07        rlca    
02aa 5f        ld      e,a
02ab 3e18      ld      a,18h
02ad 17        rla     
02ae 4f        ld      c,a
02af cd09f0    call    0f009h
02b2 10f4      djnz    02a8h
02b4 d1        pop     de
02b5 c9        ret     

02b6 23        inc     hl
02b7 23        inc     hl
02b8 34        inc     (hl)
02b9 c8        ret     z

02ba f2c1f2    jp      p,0f2c1h
02bd f680      or      80h
02bf 1802      jr      02c3h
02c1 e67f      and     7fh
02c3 35        dec     (hl)
02c4 be        cp      (hl)
02c5 20ef      jr      nz,02b6h
02c7 cdfef5    call    0f5feh
02ca cd15f3    call    0f315h
02cd cdf7f5    call    0f5f7h
02d0 cdc0f3    call    0f3c0h
02d3 d8        ret     c

02d4 2812      jr      z,02e8h
02d6 e5        push    hl
02d7 cdccf0    call    0f0cch
02da e1        pop     hl
02db 7d        ld      a,l
02dc 13        inc     de
02dd 12        ld      (de),a
02de e3        ex      (sp),hl
02df 7e        ld      a,(hl)
02e0 e3        ex      (sp),hl
02e1 07        rlca    
02e2 3003      jr      nc,02e7h
02e4 13        inc     de
02e5 7c        ld      a,h
02e6 12        ld      (de),a
02e7 e1        pop     hl
02e8 79        ld      a,c
02e9 fe0d      cp      0dh
02eb c8        ret     z

02ec 213df3    ld      hl,0f33dh
02ef cdc0f3    call    0f3c0h
02f2 380b      jr      c,02ffh
02f4 28f9      jr      z,02efh
02f6 fe27      cp      27h
02f8 20be      jr      nz,02b8h
02fa 2155f3    ld      hl,0f355h
02fd 18f0      jr      02efh
02ff 7e        ld      a,(hl)
0300 4f        ld      c,a
0301 3c        inc     a
0302 c8        ret     z

0303 fca9f6    call    m,0f6a9h
0306 cd09f0    call    0f009h
0309 cdf7f5    call    0f5f7h
030c cd15f3    call    0f315h
030f cdfef5    call    0f5feh
0312 23        inc     hl
0313 18ea      jr      02ffh
0315 23        inc     hl
0316 7e        ld      a,(hl)
0317 e63f      and     3fh
0319 c602      add     a,02h
031b eb        ex      de,hl
031c 6f        ld      l,a
031d 2600      ld      h,00h
031f 39        add     hl,sp
0320 eb        ex      de,hl
0321 7e        ld      a,(hl)
0322 0601      ld      b,01h
0324 07        rlca    
0325 300e      jr      nc,0335h
0327 04        inc     b
0328 07        rlca    
0329 300a      jr      nc,0335h
032b e5        push    hl
032c 1a        ld      a,(de)
032d 67        ld      h,a
032e 1b        dec     de
032f 1a        ld      a,(de)
0330 6f        ld      l,a
0331 7e        ld      a,(hl)
0332 e1        pop     hl
0333 1001      djnz    0336h
0335 1a        ld      a,(de)
0336 cde6f5    call    0f5e6h
0339 1b        dec     de
033a 10f9      djnz    0335h
033c c9        ret     

033d c1        pop     bc
033e 15        dec     d
033f 42        ld      b,d
0340 13        inc     de
0341 43        ld      b,e
0342 12        ld      (de),a
0343 44        ld      b,h
0344 114510    ld      de,1045h
0347 46        ld      b,(hl)
0348 14        inc     d
0349 48        ld      c,b
034a 314c30    ld      sp,304ch
034d cdf150    call    50f1h
0350 b4        or      h
0351 53        ld      d,e
0352 97        sub     a
0353 49        ld      c,c
0354 03        inc     bc
0355 c1        pop     bc
0356 09        add     hl,bc
0357 42        ld      b,d
0358 0b        dec     bc
0359 43        ld      b,e
035a 0a        ld      a,(bc)
035b 44        ld      b,h
035c 0d        dec     c
035d 45        ld      b,l
035e 0c        inc     c
035f 46        ld      b,(hl)
0360 08        ex      af,af'
0361 48        ld      c,b
0362 0f        rrca    
0363 4c        ld      c,h
0364 0ecd      ld      c,0cdh
0366 cf        rst     08h
0367 58        ld      e,b
0368 87        add     a,a
0369 59        ld      e,c
036a 85        add     a,l
036b 52        ld      d,d
036c 02        ld      (bc),a
036d ff        rst     38h
036e e60f      and     0fh
0370 c690      add     a,90h
0372 27        daa     
0373 ce40      adc     a,40h
0375 27        daa     
0376 4f        ld      c,a
0377 c9        ret     

0378 cdf7f5    call    0f5f7h
037b cd8ff6    call    0f68fh
037e c5        push    bc
037f 4f        ld      c,a
0380 cd09f0    call    0f009h
0383 79        ld      a,c
0384 c1        pop     bc
0385 c9        ret     

0386 04        inc     b
0387 cdd9f0    call    0f0d9h
038a c1        pop     bc
038b d1        pop     de
038c c3aaf6    jp      0f6aah
038f 23        inc     hl
0390 7c        ld      a,h
0391 b5        or      l
0392 37        scf     
0393 c8        ret     z

0394 7b        ld      a,e
0395 95        sub     l
0396 7a        ld      a,d
0397 9c        sbc     a,h
0398 c9        ret     

0399 d1        pop     de
039a c9        ret     

039b 03        inc     bc
039c cd8ff3    call    0f38fh
039f 38f8      jr      c,0399h
03a1 cd12f0    call    0f012h
03a4 b7        or      a
03a5 c8        ret     z

03a6 cd8ff6    call    0f68fh
03a9 fe13      cp      13h
03ab 20ec      jr      nz,0399h
03ad c38ff6    jp      0f68fh
03b0 d630      sub     30h
03b2 d8        ret     c

03b3 fe17      cp      17h
03b5 3f        ccf     
03b6 d8        ret     c

03b7 fe0a      cp      0ah
03b9 3f        ccf     
03ba d0        ret     nc

03bb d607      sub     07h
03bd fe0a      cp      0ah
03bf c9        ret     

03c0 cd7bf3    call    0f37bh
03c3 fe20      cp      20h
03c5 c8        ret     z

03c6 fe2c      cp      2ch
03c8 c8        ret     z

03c9 fe0d      cp      0dh
03cb 37        scf     
03cc c8        ret     z

03cd 3f        ccf     
03ce c9        ret     

03cf e5        push    hl
03d0 d5        push    de
03d1 c5        push    bc
03d2 f5        push    af
03d3 cd6ff0    call    0f06fh
03d6 eb        ex      de,hl
03d7 210a00    ld      hl,000ah
03da 39        add     hl,sp
03db 0604      ld      b,04h
03dd eb        ex      de,hl
03de 2b        dec     hl
03df 72        ld      (hl),d
03e0 2b        dec     hl
03e1 73        ld      (hl),e
03e2 d1        pop     de
03e3 10f9      djnz    03deh
03e5 c1        pop     bc
03e6 0b        dec     bc
03e7 f9        ld      sp,hl
03e8 212500    ld      hl,0025h
03eb 39        add     hl,sp
03ec d5        push    de
03ed 1602      ld      d,02h
03ef 7e        ld      a,(hl)
03f0 91        sub     c
03f1 23        inc     hl
03f2 7e        ld      a,(hl)
03f3 98        sbc     a,b
03f4 2806      jr      z,03fch
03f6 23        inc     hl
03f7 23        inc     hl
03f8 15        dec     d
03f9 20f4      jr      nz,03efh
03fb 03        inc     bc
03fc 212000    ld      hl,0020h
03ff d1        pop     de
0400 39        add     hl,sp
0401 73        ld      (hl),e
0402 23        inc     hl
0403 72        ld      (hl),d
0404 c5        push    bc
0405 0e2a      ld      c,2ah
0407 cd09f0    call    0f009h
040a d1        pop     de
040b 3ef4      ld      a,0f4h
040d ba        cp      d
040e 2809      jr      z,0419h
0410 23        inc     hl
0411 23        inc     hl
0412 73        ld      (hl),e
0413 23        inc     hl
0414 72        ld      (hl),d
0415 eb        ex      de,hl
0416 cde1f5    call    0f5e1h
0419 212500    ld      hl,0025h
041c 39        add     hl,sp
041d 010002    ld      bc,0200h
0420 5e        ld      e,(hl)
0421 71        ld      (hl),c
0422 23        inc     hl
0423 56        ld      d,(hl)
0424 71        ld      (hl),c
0425 23        inc     hl
0426 7b        ld      a,e
0427 b2        or      d
0428 2802      jr      z,042ch
042a 7e        ld      a,(hl)
042b 12        ld      (de),a
042c 23        inc     hl
042d 10f1      djnz    0420h
042f 08        ex      af,af'
0430 d9        exx     
0431 e5        push    hl
0432 d5        push    de
0433 c5        push    bc
0434 f5        push    af
0435 dde5      push    ix
0437 fde5      push    iy
0439 ed57      ld      a,i
043b 47        ld      b,a
043c ed5f      ld      a,r
043e 4f        ld      c,a
043f c5        push    bc
0440 c313f1    jp      0f113h
0443 e5        push    hl
0444 cf        rst     08h
0445 c1        pop     bc
0446 79        ld      a,c
0447 ed4f      ld      r,a
0449 78        ld      a,b
044a ed47      ld      i,a
044c dde1      pop     ix
044e fde1      pop     iy
0450 f1        pop     af
0451 c1        pop     bc
0452 d1        pop     de
0453 e1        pop     hl
0454 08        ex      af,af'
0455 d9        exx     
0456 d1        pop     de
0457 c1        pop     bc
0458 f1        pop     af
0459 e1        pop     hl
045a f9        ld      sp,hl
045b 00        nop     
045c 210000    ld      hl,0000h
045f c30000    jp      0000h
0462 af        xor     a
0463 320300    ld      (0003h),a
0466 216cf4    ld      hl,0f46ch
0469 c3b5f6    jp      0f6b5h
046c 49        ld      c,c
046d 2f        cpl     
046e 4f        ld      c,a
046f 2045      jr      nz,04b6h
0471 52        ld      d,d
0472 d2cde8    jp      nc,0e8cdh
0475 f6b0      or      0b0h
0477 47        ld      b,a
0478 82        add     a,d
0479 57        ld      d,a
047a 78        ld      a,b
047b c9        ret     

047c 0e0d      ld      c,0dh
047e cd7cf6    call    0f67ch
0481 0e0a      ld      c,0ah
0483 c37cf6    jp      0f67ch
0486 cd56f6    call    0f656h
0489 e67f      and     7fh
048b c9        ret     

048c 3f        ccf     
048d 3f        ccf     
048e 3f        ccf     
048f bf        cp      a
0490 4d        ld      c,l
0491 4f        ld      c,a
0492 53        ld      d,e
0493 53        ld      d,e
0494 2056      jr      nz,04ech
0496 45        ld      b,l
0497 52        ld      d,d
0498 53        ld      d,e
0499 2032      jr      nz,04cdh
049b 2e32      ld      l,32h
049d 0d        dec     c
049e 8a        adc     a,d
049f 3e0f      ld      a,0fh
04a1 d324      out     (24h),a
04a3 114000    ld      de,0040h
04a6 62        ld      h,d
04a7 6a        ld      l,d
04a8 db26      in      a,(26h)
04aa a3        and     e
04ab 28fb      jr      z,04a8h
04ad db26      in      a,(26h)
04af 23        inc     hl
04b0 a3        and     e
04b1 a3        and     e
04b2 c2adf4    jp      nz,0f4adh
04b5 e5        push    hl
04b6 29        add     hl,hl
04b7 5c        ld      e,h
04b8 19        add     hl,de
04b9 19        add     hl,de
04ba e5        push    hl
04bb 29        add     hl,hl
04bc 29        add     hl,hl
04bd db20      in      a,(20h)
04bf 2b        dec     hl
04c0 7d        ld      a,l
04c1 b4        or      h
04c2 c2bdf4    jp      nz,0f4bdh
04c5 e1        pop     hl
04c6 3e83      ld      a,83h
04c8 d323      out     (23h),a
04ca 7d        ld      a,l
04cb d320      out     (20h),a
04cd 7c        ld      a,h
04ce d321      out     (21h),a
04d0 3e03      ld      a,03h
04d2 d323      out     (23h),a
04d4 af        xor     a
04d5 d321      out     (21h),a
04d7 d325      out     (25h),a
04d9 cdcef6    call    0f6ceh
04dc e67f      and     7fh
04de fe0d      cp      0dh
04e0 e1        pop     hl
04e1 c8        ret     z

04e2 5d        ld      e,l
04e3 54        ld      d,h
04e4 cdeef4    call    0f4eeh
04e7 cdeef4    call    0f4eeh
04ea 19        add     hl,de
04eb e5        push    hl
04ec 18d8      jr      04c6h
04ee b7        or      a
04ef 7c        ld      a,h
04f0 1f        rra     
04f1 67        ld      h,a
04f2 7d        ld      a,l
04f3 1f        rra     
04f4 6f        ld      l,a
04f5 c9        ret     

04f6 cda4f6    call    0f6a4h
04f9 d5        push    de
04fa cdc8f5    call    0f5c8h
04fd af        xor     a
04fe 57        ld      d,a
04ff cdf6f6    call    0f6f6h
0502 3e01      ld      a,01h
0504 cdfef6    call    0f6feh
0507 af        xor     a
0508 92        sub     d
0509 cdfef6    call    0f6feh
050c 1803      jr      0511h
050e cdd7f0    call    0f0d7h
0511 c1        pop     bc
0512 78        ld      a,b
0513 b1        or      c
0514 41        ld      b,c
0515 0e00      ld      c,00h
0517 2002      jr      nz,051bh
0519 063c      ld      b,3ch
051b cd0cf0    call    0f00ch
051e 10fb      djnz    051bh
0520 c9        ret     

0521 3a0300    ld      a,(0003h)
0524 0604      ld      b,04h
0526 217df1    ld      hl,0f17dh
0529 11fbff    ld      de,0fffbh
052c f5        push    af
052d cdfef5    call    0f5feh
0530 4e        ld      c,(hl)
0531 cd09f0    call    0f009h
0534 cdf7f5    call    0f5f7h
0537 f1        pop     af
0538 f5        push    af
0539 e5        push    hl
053a 23        inc     hl
053b 3c        inc     a
053c e603      and     03h
053e 20fa      jr      nz,053ah
0540 4e        ld      c,(hl)
0541 cd09f0    call    0f009h
0544 e1        pop     hl
0545 f1        pop     af
0546 1f        rra     
0547 1f        rra     
0548 19        add     hl,de
0549 10e1      djnz    052ch
054b c9        ret     

054c cdd7f0    call    0f0d7h
054f e1        pop     hl
0550 e5        push    hl
0551 cd86f4    call    0f486h
0554 de3a      sbc     a,3ah
0556 20f9      jr      nz,0551h
0558 57        ld      d,a
0559 cd73f4    call    0f473h
055c 2823      jr      z,0581h
055e 5f        ld      e,a
055f cd73f4    call    0f473h
0562 f5        push    af
0563 cd73f4    call    0f473h
0566 c1        pop     bc
0567 4f        ld      c,a
0568 09        add     hl,bc
0569 cd73f4    call    0f473h
056c cd73f4    call    0f473h
056f 77        ld      (hl),a
0570 2f        cpl     
0571 ae        xor     (hl)
0572 c4a1f2    call    nz,0f2a1h
0575 23        inc     hl
0576 1d        dec     e
0577 20f3      jr      nz,056ch
0579 cd73f4    call    0f473h
057c c209f1    jp      nz,0f109h
057f 18ce      jr      054fh
0581 cd73f4    call    0f473h
0584 67        ld      h,a
0585 cd73f4    call    0f473h
0588 6f        ld      l,a
0589 b4        or      h
058a d1        pop     de
058b c8        ret     z

058c e9        jp      (hl)
058d cd86f3    call    0f386h
0590 af        xor     a
0591 47        ld      b,a
0592 b1        or      c
0593 2002      jr      nz,0597h
0595 0e10      ld      c,10h
0597 e5        push    hl
0598 09        add     hl,bc
0599 b7        or      a
059a ed52      sbc     hl,de
059c e1        pop     hl
059d 380a      jr      c,05a9h
059f d5        push    de
05a0 eb        ex      de,hl
05a1 b7        or      a
05a2 ed52      sbc     hl,de
05a4 23        inc     hl
05a5 e3        ex      (sp),hl
05a6 eb        ex      de,hl
05a7 c1        pop     bc
05a8 d8        ret     c

05a9 c5        push    bc
05aa d5        push    de
05ab 50        ld      d,b
05ac 41        ld      b,c
05ad cdc8f5    call    0f5c8h
05b0 78        ld      a,b
05b1 cdf6f6    call    0f6f6h
05b4 af        xor     a
05b5 cdfef6    call    0f6feh
05b8 7e        ld      a,(hl)
05b9 23        inc     hl
05ba cdfef6    call    0f6feh
05bd 10f9      djnz    05b8h
05bf af        xor     a
05c0 92        sub     d
05c1 cdfef6    call    0f6feh
05c4 d1        pop     de
05c5 c1        pop     bc
05c6 18cf      jr      0597h
05c8 cd7cf4    call    0f47ch
05cb 0e3a      ld      c,3ah
05cd c37cf6    jp      0f67ch
05d0 cda4f6    call    0f6a4h
05d3 e5        push    hl
05d4 19        add     hl,de
05d5 cdfbf5    call    0f5fbh
05d8 e1        pop     hl
05d9 b7        or      a
05da ed52      sbc     hl,de
05dc 1803      jr      05e1h
05de cda9f6    call    0f6a9h
05e1 7c        ld      a,h
05e2 cde6f5    call    0f5e6h
05e5 7d        ld      a,l
05e6 f5        push    af
05e7 0f        rrca    
05e8 0f        rrca    
05e9 0f        rrca    
05ea 0f        rrca    
05eb cdeff5    call    0f5efh
05ee f1        pop     af
05ef cd6ef3    call    0f36eh
05f2 180c      jr      0600h
05f4 cde6f5    call    0f5e6h
05f7 0e2d      ld      c,2dh
05f9 1805      jr      0600h
05fb cddef5    call    0f5deh
05fe 0e20      ld      c,20h
0600 3a0300    ld      a,(0003h)
0603 e603      and     03h
0605 cadef6    jp      z,0f6deh
0608 fe02      cp      02h
060a fa62f4    jp      m,0f462h
060d c262f4    jp      nz,0f462h
0610 3a0300    ld      a,(0003h)
0613 e6c0      and     0c0h
0615 cadef6    jp      z,0f6deh
0618 fe80      cp      80h
061a fa62f4    jp      m,0f462h
061d ca62f4    jp      z,0f462h
0620 c362f4    jp      0f462h
0623 3a0300    ld      a,(0003h)
0626 e603      and     03h
0628 cac6f6    jp      z,0f6c6h
062b fe02      cp      02h
062d fa62f4    jp      m,0f462h
0630 c262f4    jp      nz,0f462h
0633 3a0300    ld      a,(0003h)
0636 e60c      and     0ch
0638 cac6f6    jp      z,0f6c6h
063b fe08      cp      08h
063d fa62f4    jp      m,0f462h
0640 ca62f4    jp      z,0f462h
0643 c362f4    jp      0f462h
0646 3a0300    ld      a,(0003h)
0649 e603      and     03h
064b cacef6    jp      z,0f6ceh
064e fe02      cp      02h
0650 fa62f4    jp      m,0f462h
0653 c262f4    jp      nz,0f462h
0656 3a0300    ld      a,(0003h)
0659 e60c      and     0ch
065b cacef6    jp      z,0f6ceh
065e fe08      cp      08h
0660 fa62f4    jp      m,0f462h
0663 ca62f4    jp      z,0f462h
0666 c362f4    jp      0f462h
0669 3a0300    ld      a,(0003h)
066c e6c0      and     0c0h
066e cad6f6    jp      z,0f6d6h
0671 fe80      cp      80h
0673 fa62f4    jp      m,0f462h
0676 ca62f4    jp      z,0f462h
0679 c362f4    jp      0f462h
067c 3a0300    ld      a,(0003h)
067f e630      and     30h
0681 cadef6    jp      z,0f6deh
0684 fe20      cp      20h
0686 fa62f4    jp      m,0f462h
0689 ca62f4    jp      z,0f462h
068c c362f4    jp      0f462h
068f cd46f6    call    0f646h
0692 e67f      and     7fh
0694 c9        ret     

0695 cda9f6    call    0f6a9h
0698 c5        push    bc
0699 4e        ld      c,(hl)
069a cd00f6    call    0f600h
069d 23        inc     hl
069e 79        ld      a,c
069f 07        rlca    
06a0 30f7      jr      nc,0699h
06a2 c1        pop     bc
06a3 c9        ret     

06a4 cdd9f0    call    0f0d9h
06a7 d1        pop     de
06a8 e1        pop     hl
06a9 e5        push    hl
06aa 21c2f6    ld      hl,0f6c2h
06ad cd98f6    call    0f698h
06b0 e1        pop     hl
06b1 c9        ret     

06b2 21bbf6    ld      hl,0f6bbh
06b5 cd95f6    call    0f695h
06b8 c30000    jp      0000h
06bb 52        ld      d,d
06bc 53        ld      d,e
06bd 54        ld      d,h
06be 2045      jr      nz,0705h
06c0 52        ld      d,d
06c1 d20d0a    jp      nc,0a0dh
06c4 00        nop     
06c5 80        add     a,b
06c6 db25      in      a,(25h)
06c8 e601      and     01h
06ca c8        ret     z

06cb c6fe      add     a,0feh
06cd c9        ret     

06ce db25      in      a,(25h)
06d0 1f        rra     
06d1 30fb      jr      nc,06ceh
06d3 db20      in      a,(20h)
06d5 c9        ret     

06d6 db25      in      a,(25h)
06d8 e620      and     20h
06da c8        ret     z

06db c6bf      add     a,0bfh
06dd c9        ret     

06de db25      in      a,(25h)
06e0 e620      and     20h
06e2 28fa      jr      z,06deh
06e4 79        ld      a,c
06e5 d320      out     (20h),a
06e7 c9        ret     

06e8 cdf0f6    call    0f6f0h
06eb 07        rlca    
06ec 07        rlca    
06ed 07        rlca    
06ee 07        rlca    
06ef 47        ld      b,a
06f0 cd86f4    call    0f486h
06f3 c3b0f3    jp      0f3b0h
06f6 cdfef6    call    0f6feh
06f9 7c        ld      a,h
06fa cdfef6    call    0f6feh
06fd 7d        ld      a,l
06fe f5        push    af
06ff 0f        rrca    
0700 0f        rrca    
0701 0f        rrca    
0702 0f        rrca    
0703 cd6ef3    call    0f36eh
0706 cd0cf0    call    0f00ch
0709 f1        pop     af
070a f5        push    af
070b cd6ef3    call    0f36eh
070e cd0cf0    call    0f00ch
0711 f1        pop     af
0712 82        add     a,d
0713 57        ld      d,a
0714 c9        ret     

0715 ff        rst     38h
0716 ff        rst     38h
0717 ff        rst     38h
0718 ff        rst     38h
0719 ff        rst     38h
071a ff        rst     38h
071b ff        rst     38h
071c ff        rst     38h
071d ff        rst     38h
071e ff        rst     38h
071f ff        rst     38h
0720 ff        rst     38h
0721 ff        rst     38h
0722 ff        rst     38h
0723 ff        rst     38h
0724 ff        rst     38h
0725 ff        rst     38h
0726 ff        rst     38h
0727 ff        rst     38h
0728 ff        rst     38h
0729 ff        rst     38h
072a ff        rst     38h
072b ff        rst     38h
072c ff        rst     38h
072d ff        rst     38h
072e ff        rst     38h
072f ff        rst     38h
0730 ff        rst     38h
0731 ff        rst     38h
0732 ff        rst     38h
0733 ff        rst     38h
0734 ff        rst     38h
0735 ff        rst     38h
0736 ff        rst     38h
0737 ff        rst     38h
0738 ff        rst     38h
0739 ff        rst     38h
073a ff        rst     38h
073b ff        rst     38h
073c ff        rst     38h
073d ff        rst     38h
073e ff        rst     38h
073f ff        rst     38h
0740 ff        rst     38h
0741 ff        rst     38h
0742 ff        rst     38h
0743 ff        rst     38h
0744 ff        rst     38h
0745 ff        rst     38h
0746 ff        rst     38h
0747 ff        rst     38h
0748 ff        rst     38h
0749 ff        rst     38h
074a ff        rst     38h
074b ff        rst     38h
074c ff        rst     38h
074d ff        rst     38h
074e ff        rst     38h
074f ff        rst     38h
0750 ff        rst     38h
0751 ff        rst     38h
0752 ff        rst     38h
0753 ff        rst     38h
0754 ff        rst     38h
0755 ff        rst     38h
0756 ff        rst     38h
0757 ff        rst     38h
0758 ff        rst     38h
0759 ff        rst     38h
075a ff        rst     38h
075b ff        rst     38h
075c ff        rst     38h
075d ff        rst     38h
075e ff        rst     38h
075f ff        rst     38h
0760 ff        rst     38h
0761 ff        rst     38h
0762 ff        rst     38h
0763 ff        rst     38h
0764 ff        rst     38h
0765 ff        rst     38h
0766 ff        rst     38h
0767 ff        rst     38h
0768 ff        rst     38h
0769 ff        rst     38h
076a ff        rst     38h
076b ff        rst     38h
076c ff        rst     38h
076d ff        rst     38h
076e ff        rst     38h
076f ff        rst     38h
0770 ff        rst     38h
0771 ff        rst     38h
0772 ff        rst     38h
0773 ff        rst     38h
0774 ff        rst     38h
0775 ff        rst     38h
0776 ff        rst     38h
0777 ff        rst     38h
0778 ff        rst     38h
0779 ff        rst     38h
077a ff        rst     38h
077b ff        rst     38h
077c ff        rst     38h
077d ff        rst     38h
077e ff        rst     38h
077f ff        rst     38h
0780 ff        rst     38h
0781 ff        rst     38h
0782 ff        rst     38h
0783 ff        rst     38h
0784 ff        rst     38h
0785 ff        rst     38h
0786 ff        rst     38h
0787 ff        rst     38h
0788 ff        rst     38h
0789 ff        rst     38h
078a ff        rst     38h
078b ff        rst     38h
078c ff        rst     38h
078d ff        rst     38h
078e ff        rst     38h
078f ff        rst     38h
0790 ff        rst     38h
0791 ff        rst     38h
0792 ff        rst     38h
0793 ff        rst     38h
0794 ff        rst     38h
0795 ff        rst     38h
0796 ff        rst     38h
0797 ff        rst     38h
0798 ff        rst     38h
0799 ff        rst     38h
079a ff        rst     38h
079b ff        rst     38h
079c ff        rst     38h
079d ff        rst     38h
079e ff        rst     38h
079f ff        rst     38h
07a0 ff        rst     38h
07a1 ff        rst     38h
07a2 ff        rst     38h
07a3 ff        rst     38h
07a4 ff        rst     38h
07a5 ff        rst     38h
07a6 ff        rst     38h
07a7 ff        rst     38h
07a8 ff        rst     38h
07a9 ff        rst     38h
07aa ff        rst     38h
07ab ff        rst     38h
07ac ff        rst     38h
07ad ff        rst     38h
07ae ff        rst     38h
07af ff        rst     38h
07b0 ff        rst     38h
07b1 ff        rst     38h
07b2 ff        rst     38h
07b3 ff        rst     38h
07b4 ff        rst     38h
07b5 ff        rst     38h
07b6 ff        rst     38h
07b7 ff        rst     38h
07b8 ff        rst     38h
07b9 ff        rst     38h
07ba ff        rst     38h
07bb ff        rst     38h
07bc ff        rst     38h
07bd ff        rst     38h
07be ff        rst     38h
07bf ff        rst     38h
07c0 ff        rst     38h
07c1 ff        rst     38h
07c2 ff        rst     38h
07c3 ff        rst     38h
07c4 ff        rst     38h
07c5 ff        rst     38h
07c6 ff        rst     38h
07c7 ff        rst     38h
07c8 ff        rst     38h
07c9 ff        rst     38h
07ca ff        rst     38h
07cb ff        rst     38h
07cc ff        rst     38h
07cd ff        rst     38h
07ce ff        rst     38h
07cf ff        rst     38h
07d0 ff        rst     38h
07d1 ff        rst     38h
07d2 ff        rst     38h
07d3 ff        rst     38h
07d4 ff        rst     38h
07d5 ff        rst     38h
07d6 ff        rst     38h
07d7 ff        rst     38h
07d8 ff        rst     38h
07d9 ff        rst     38h
07da ff        rst     38h
07db ff        rst     38h
07dc ff        rst     38h
07dd ff        rst     38h
07de ff        rst     38h
07df ff        rst     38h
07e0 ff        rst     38h
07e1 ff        rst     38h
07e2 ff        rst     38h
07e3 ff        rst     38h
07e4 ff        rst     38h
07e5 ff        rst     38h
07e6 ff        rst     38h
07e7 ff        rst     38h
07e8 ff        rst     38h
07e9 ff        rst     38h
07ea ff        rst     38h
07eb ff        rst     38h
07ec ff        rst     38h
07ed ff        rst     38h
07ee ff        rst     38h
07ef ff        rst     38h
07f0 ff        rst     38h
07f1 ff        rst     38h
07f2 ff        rst     38h
07f3 ff        rst     38h
07f4 ff        rst     38h
07f5 ff        rst     38h
07f6 ff        rst     38h
07f7 ff        rst     38h
07f8 ff        rst     38h
07f9 ff        rst     38h
07fa ff        rst     38h
07fb ff        rst     38h
07fc ff        rst     38h
07fd ff        rst     38h
07fe ff        rst     38h
07ff ff        rst     38h
