123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- or a
- jp z,ReadRAM
- out (6),a
- adc hl,bc
- jp p,read_from_ARC_noboundary
- read_from_Arc_blocks = $-ReadArcData+TSA
- xor a
- sbc hl,bc
- sub l \ ld l,a
- ld a,$80 \ sbc a,h \ ld h,a
-
- ld a,c \ sub l \ ld c,a
- ld a,b \ sbc a,h \ ld b,a
- push bc
- ld b,h
- ld c,l
- xor a \ sub l \ ld l,a
- ld a,$80 \ sbc a,h \ ld h,a
-
- block_loop = $-ReadArcData+TSA
- ldir
-
- in a,(6)
- inc a
- out (6),a
- ld h,40h
- pop bc
-
- ld a,b
- sub h
- jr c,read_from_RAM
- ld b,a
- push bc
- ld b,h
- ld c,l
- jp block_loop
- read_from_ARC_noboundary = $-ReadArcData+TSA
- sbc hl,bc
- read_from_RAM:
- ldir
- in a,(6)
- ld b,a
- page_restore = $-ReadArcData+TSA+1
- ld a,0
- out (6),a
- ld a,b
- ld b,c
- ret
|