Registered User
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 55
Posts: 2,002
|
Quote:
Originally Posted by Cosmos
@coders
1st bug : move.l a6,-(sp)
move.l 4.w,a6
jsr R_FreeVec(a6)
move.l (sp)+,a6 ; d0 is trashed here : R_FreeVec return nothing
moveq #$69,d1
rol.l #1,d1
bra.b JL_0_241FE
JL_0_241F8
move.l #$000000D9,d1
JL_0_241FE
bsr.w AJL_0_204E6
...
...
AJL_0_204E6
move.l d2,-(sp)
move.l d0,d2
moveq #-1,d1
bsr.b JL_0_204F8
move.l (sp)+,d2
rts
JL_0_204F8
bsr.b JL_0_20484
lea $38(a0),a0
tst.l d1
bne.b JL_0_20516
move.l (a0),d1
move.l d1,d0
rts
JL_0_20516
move.l (a0),d1
move.l d2,(a0)
move.l d1,d0
rts
JL_0_20484
move.l 4.w,a0
move.l $114(a0),a0
add.w #$005C,a0
rts
The issues are ' moveq #$69,d1/rol.l #1,d1' and ' move.l #$000000D9,d1' : must be d0, of course !
It's a big bug, because this subroutine is called by a lot of functions into the dos.library...
2nd bug : R_ExNext
moveq #$18,d0
tst.l d1
bne.b JL_0_243A4
move.l #$000000D3,d1
bsr.w AJL_0_204E6
moveq #0,d0
rts
JL_0_243A4
move.l d2,a0
clr.l $E0(a0)
move.l d2,-(sp)
lsr.l #2,d2
move.l d2,-(sp)
move.l sp,a0
bsr.w JL_0_22440
addq.w #4,sp
move.l (sp)+,d2
rts
JL_0_22440
link a5,#-$18
movem.l d2-d7/a2-a3,-(sp)
move.l d1,d7
move.l d0,d6
move.l a0,-$14(a5)
move.l -$14(a5),a0
move.l (a0),d0
...
...
AJL_0_204E6
move.l d2,-(sp)
move.l d0,d2
moveq #-1,d1
bsr.b JL_0_204F8
move.l (sp)+,d2
rts ' moveq #$18,d0' is for JL_0_243A4. ' move.l #$000000D3,d1' must be ' move.l #$000000D3,d0'
So, coders, are you agree with me ?
|
I resourced ROM 3.0/3.1 some months ago, I don't think that DOS library has a lot of unused code.
This code has no sense, but it can be C compiler problems, better check/compare a few other/older version of DOS library. F.e ROM 3.0 has less C compiler bugs than ROM 3.1.
Last edited by TCD; 11 July 2011 at 14:24.
|