unit Icon; INTERFACE uses Exec, Workbench; var IconBase: pLibrary; const ICONNAME = 'icon.library'; procedure FreeFreeList (freelist: pFreeList); function AddFreeList (freelist: pFreeList; mem: pointer; size: long): boolean; function GetDiskObject (name: STRPTR): pDiskObject; function PutDiskObject (name: STRPTR; diskobj: pDiskObject): boolean; procedure FreeDiskObject (diskobj: pDiskObject); function FindToolType (toolTypeArray: ppbyte; typeName: STRPTR): STRPTR; function MatchToolValue (typeString: STRPTR; value: STRPTR): boolean; function BumpRevision (newname: STRPTR; oldname: STRPTR): STRPTR; IMPLEMENTATION procedure FreeFreeList; xassembler; asm move.l a6,-(sp) move.l 8(sp),a0 move.l IconBase,a6 jsr -$36(a6) move.l (sp)+,a6 end; function AddFreeList; xassembler; asm movem.l a2/a6,-(sp) lea $C(sp),a6 move.l (a6)+,a2 move.l (a6)+,a1 move.l (a6)+,a0 move.l IconBase,a6 jsr -$48(a6) tst.l d0 sne d0 neg.b d0 move.b d0,$18(sp) movem.l (sp)+,a2/a6 end; function GetDiskObject; xassembler; asm move.l a6,-(sp) move.l 8(sp),a0 move.l IconBase,a6 jsr -$4E(a6) move.l d0,$C(sp) move.l (sp)+,a6 end; function PutDiskObject; xassembler; asm move.l a6,-(sp) lea 8(sp),a6 move.l (a6)+,a1 move.l (a6)+,a0 move.l IconBase,a6 jsr -$54(a6) tst.l d0 sne d0 neg.b d0 move.b d0,$10(sp) move.l (sp)+,a6 end; procedure FreeDiskObject; xassembler; asm move.l a6,-(sp) move.l 8(sp),a0 move.l IconBase,a6 jsr -$5A(a6) move.l (sp)+,a6 end; function FindToolType; xassembler; asm move.l a6,-(sp) lea 8(sp),a6 move.l (a6)+,a1 move.l (a6)+,a0 move.l IconBase,a6 jsr -$60(a6) move.l d0,$10(sp) move.l (sp)+,a6 end; function MatchToolValue; xassembler; asm move.l a6,-(sp) lea 8(sp),a6 move.l (a6)+,a1 move.l (a6)+,a0 move.l IconBase,a6 jsr -$66(a6) tst.l d0 sne d0 neg.b d0 move.b d0,$10(sp) move.l (sp)+,a6 end; function BumpRevision; xassembler; asm move.l a6,-(sp) lea 8(sp),a6 move.l (a6)+,a1 move.l (a6)+,a0 move.l IconBase,a6 jsr -$6C(a6) move.l d0,$10(sp) move.l (sp)+,a6 end; end.