revert between 56095 -> 55830 in arch
[AROS.git] / workbench / network / smbfs / source_code / swap_stack_and_call.asm
blob4eed5885a942e6211eb59f6cd26c360ddbbe6282
2 * :ts=8
4 * SMB file system wrapper for AmigaOS, using the AmiTCP V3 API
6 * Copyright (C) 2016 by Olaf `Olsen' Barthel <obarthel -at- gmx -dot- net>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 include "exec/macros.i"
25 section text,code
27 _LVOStackSwap equ -732
29 xref _SysBase
31 xdef _swap_stack_and_call
33 _swap_stack_and_call:
35 movem.l d2/a2/a3/a6,-(sp)
37 move.l _SysBase,a6
39 move.l 20(sp),a2
40 move.l 24(sp),a3
42 move.l a2,a0
43 jsr _LVOStackSwap(a6)
45 jsr (a3)
46 move.l d0,d2
48 move.l a2,a0
49 jsr _LVOStackSwap(a6)
51 move.l d2,d0
53 movem.l (sp)+,d2/a2/a3/a6
54 rts
56 end