.sect .text .sect .rom .sect .data .sect .bss .sect .text !-----------------------------------------------------------------------------. ! ARRAY GROUP !------------------------------------------------------------------------------- !subroutine calcarr: move.l (sp)+,d3 !save return address move.l (sp)+,a0 !address of array describtor mov (sp)+,d0 !index subt (a0)+,d0 !relative address blt 9f comp (a0)+,d0 !check upper bound bgt 9f move.l #0,d1 mov (a0),d1 mulu d1,d0 !objectsize in d1 move.l (sp)+,a0 ad d0,a0 !a0 address of array element move.l d3,-(sp) rts 9: bsr e_array ;tst.l (sp)+ ; jmp (a4) aar_1W: bsr calcarr ; move.l a0,-(sp) jmp (a4) aar_l: adroff ; cmp.w wrd,(a5) 0: bne e_illins ; bra aar_1W aar_z: comp wrd,(sp)+ ; bra 0b lar_1W: bsr calcarr ; add.l d1,a0 asr.w #1,d1 ; bcc 5f clr.l d1 ; move.b -(a0),d1 mov d1,-(sp); jmp (a4) 5: #ifdef lword asr.w #1,d1 ; bcc 6f move.w -(a0),d1; move.l d1,-(sp) jmp (a4) #endif 6: sub.l #1,d1 7: mov -(a0),-(sp); dbra d1,7b jmp (a4) lar_l: adroff ; cmp.w wrd,(a5) 8: bne e_illins; bra lar_1W lar_z: comp wrd,(sp)+ ; bra 8b sar_1W: bsr calcarr ; asr.w #1,d1 bcc 5f ; testen (sp)+ move.b -1(sp),(a0); jmp (a4) 5: #ifdef lword asr.w #1,d1 ; bcc 6f tst.w (sp)+ ; move.w (sp)+,(a0) jmp (a4) #endif 6: sub.l #1,d1 7: mov (sp)+,(a0)+ ; dbra d1,7b jmp (a4) sar_z: comp wrd,(sp)+ ; bra 1f sar_l: adroff ; cmp.w wrd,(a5) 1: bne e_illins ; bra sar_1W !------------------------------------------------------------------------- ! CONVERT GROUP !-------------------------------------------------------------------------w cii_z: mov (sp)+,d0 ; mov (sp)+,d1 ; !d0 destination size !d1 source size #if test cmp.w wrd,d1 ; bne 0f comp und,(sp) ; bne 0f bsr e_iund #endif 0: cmp.w d0,d1 ; bne 1f ; jmp (a4) 1: bge 6f ; mov (sp)+,d2 cmp.w #1,d1 ; bne 3f !d1