0 Members and 3 Guests are viewing this topic.
p_Inverse: .db __InverseEnd-1-$ xor a bit 7,h push af jr z,$+8 sub l ld l,a sbc a,a sub h ld h,a xor a ex de,hl ld bc,16<<8 ld hl,1 call $0000 ;sub_Div+10 pop af ret z sub l ld l,a sbc a,a sub h ld h,a ret__InverseEnd: .db rp_Ans,12
p_ReadArc: .db __ReadArcEnd-1-$ ld c,a in a,(6) ld b,a ld a,h set 6,h res 7,h rlca rlca dec a and %00000011 add a,c out (6),a ld c,(hl) inc hl bit 7,h jr z,__ReadArcNoBoundary set 6,h res 7,h inc a out (6),a__ReadArcNoBoundary: ld l,(hl) ld h,c ld a,b out (6),a ret__ReadArcEnd:
p_ReadArcApp: .db __ReadArcAppEnd-1-$ push hl ld hl,$0000 ld de,ramCode ld bc,__ReadArcAppRamCodeEnd-__ReadArcAppRamCode ldir pop hl ld e,a ld c,6 in b,(c) ld a,h set 6,h res 7,h rlca rlca dec a and %00000011 add a,e call ramCode ld e,d inc hl bit 7,h jr z,__ReadArcAppNoBoundary set 6,h res 7,h inc a__ReadArcAppNoBoundary: call ramCode ex de,hl ret__ReadArcAppEnd: .db rp_Ans,__ReadArcAppEnd-p_ReadArcApp-3__ReadArcAppRamCode: out (6),a ld d,(hl) out (c),b ret__ReadArcAppRamCodeEnd:
This is a really simple one. When an interrupt is called, interrupts are automatically disabled. So you don't need to start the interrupt routine with DI.
QuoteThis is a really simple one. When an interrupt is called, interrupts are automatically disabled. So you don't need to start the interrupt routine with DI.They are disabled automatically already... there is a di at the start of the interrupt routine. Is there some bug with that?Also, about those archive reading commands... archive reading isn't as useful as it should be due to those sector boundary issues. For instance, you can't reliably iterate a tilemap in archive because there is a small chance it could overlap between a sector boundary and iterating over it would add a "glitch byte" to the map since each sector adds an extra byte in front. Although I guess you could modify those routines to take that into account, that might work since you can't read more than 64 consecutive kilobytes anyway.
p_SDiv: .db __SDivEnd-1-$ ld a,h xor d push af bit 7,h jr z,$+8 xor a sub l ld l,a sbc a,a sub h ld h,a bit 7,d jr z,$+8 xor a sub e ld e,a sbc a,a sub d ld d,a call $3F00+sub_Div pop af add a,a ret nc xor a sub l ld l,a sbc a,a sub h ld h,a ret__SDivEnd:
p_SDiv: .db __SDivEnd-1-$ ld a,h xor d push af bit 7,h jr z,$+8 xor a sub l ld l,a sbc a,a sub h ld h,a bit 7,d jr z,$+8 xor a sub e ld e,a sbc a,a sub d ld d,a call $3F00+sub_Div pop af ret p xor a sub l ld l,a sbc a,a sub h ld h,a ret__SDivEnd:
p_88Div: ld a,h xor d push af bit 7,h jr z,$+8 xor a sub l ld l,a sbc a,a sub h ld h,a bit 7,d jr z,$+8 xor a sub e ld e,a sbc a,a sub d ld d,a ld bc,$1000 ld a,l ld l,h ld h,c call __DivLoop pop af ret p xor a sub l ld l,a sbc a,a sub h ld h,a ret