68k asm madness
Posted: Thu Oct 07, 2010 11:09 am
Hi,
I'm actually disasm a game and I'm stuck on some instructions:
I'm pretty sure this one clean RAM from FFD000 to FFD03E but, so, why
it's movea.w and not movea.l #$FFB000, a0 ? could someone explain it to me ?
is it because of the movea.w #$FFFE,sp ?
I know I already asked about it but I'm unable to find it...
what does it exactly do ?!
The best one for the last
actually this one seems to call drawTiles, which uses the data following the call, then comes back to code after the data (clr.w d0)
why is it done this way ?!
i found some others func call using this method, how could I know where it exactly jump back ?
perhaps, like for my first question, it's because I'm misunderstanding sp use ?
thanks for any hints, as usual
I'm actually disasm a game and I'm stuck on some instructions:
Code: Select all
move #$2700,sr
movea.w #$FFFE,sp
movea.w #$B000,a0
loc_1730A:
clr.l (a0)+
cmpa.w #$D03E,a0
blt.s loc_1730A
it's movea.w and not movea.l #$FFB000, a0 ? could someone explain it to me ?
is it because of the movea.w #$FFFE,sp ?
Code: Select all
bra *+4
what does it exactly do ?!
The best one for the last
Code: Select all
bsr.w drawTiles
dc.w 6
dc.b $FF
dc.b 0
dc.b 2
dc.b 0
clr.w d0
...
rts
...
...
drawTiles:
move.l a1,-(sp)
movea.l 4(sp),a1
bsr.w writeText ; A1 = text info
move.l a1,4(sp)
movea.l (sp)+,a1
rts
why is it done this way ?!
i found some others func call using this method, how could I know where it exactly jump back ?
perhaps, like for my first question, it's because I'm misunderstanding sp use ?
thanks for any hints, as usual