!************************************************************************** !* !* Boot-ROM-Code to load an operating system across a TCP/IP network. !* !* Module: bcc_imul.S !* Purpose: Routines required by bcc !* Entries: imul_, imul_u, lmulul, lmull, isr, isru, isl, islu !* !************************************************************************** !* !* Copyright (C) 1995-2003 Gero Kuhlmann !* !* This program is free software; you can redistribute it and/or modify !* it under the terms of the GNU General Public License as published by !* the Free Software Foundation; either version 2 of the License, or !* any later version. !* !* This program 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 General Public License for more details. !* !* You should have received a copy of the GNU General Public License !* along with this program; if not, write to the Free Software !* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. !* !* $Id: bcc_imul.S,v 1.4 2003/01/25 23:29:41 gkminix Exp $ !* ! !************************************************************************** ! ! Include assembler macros: ! #include ! !************************************************************************** ! ! Start code segment. ! .text public imul_ ! define entry points public imul_u #ifndef OPT386 public lmull public lmulul #endif public isl public islu public isr public isru ! !************************************************************************** ! ! Define BCC support functions ! ! MUL imul_: imul_u: imul bx ret ! MUL lmull: lmulul: mov cx,ax mul word ptr [di + 2] xchg ax,bx mul word ptr [di] add bx,ax mov ax,[di] mul cx add bx,dx ret ! Shift left isl: islu: mov cl,bl shl ax,cl ret ! Shift arithmetic right isr: mov cl,bl sar ax,cl ret ! Shift right isru: mov cl,bl shr ax,cl ret ! !************************************************************************** ! end