/*
    This file is part of SUPPL - the supplemental library for DOS
    Copyright (C) 1996-2000 Steffen Kaiser

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Library General Public
    License as published by the Free Software Foundation; either
    version 2 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Library General Public License for more details.

    You should have received a copy of the GNU Library General Public
    License along with this library; if not, write to the Free
    Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
	Help file as other compilers choke on the "#asm"
	precompiler statements.

	Will always be #included into ADDU.C.

*/

int addu(unsigned * const u1, const unsigned u2)
{	
#ifdef SMALL_CODE
#define DISPL 2
#else	/* !SMALL_CODE */
#define DISPL 4
#endif	/* SMALL_CODE */
#asm
	mov ax, DISPL+2[bp]
#endasm

#ifdef FAR_DATA
#asm
	les bx, DISPL+6[bp]
	add es:[bx], ax
#endasm
#else	/* FAR_DATA */
#asm
	mov bx, DISPL+6[bp]
	add [bx], ax
#endasm
#endif	/* FAR_DATA */
#asm
	sbb ax, ax
#endasm
}
