/***************************************************************************/ /* */ /* PROXIM RANGELAN2 LOW LEVEL DRIVER */ /* */ /* PROXIM, INC. CONFIDENTIAL AND PROPRIETARY. This source is the */ /* sole property of PROXIM, INC. Reproduction or utilization of */ /* this source in whole or in part is forbidden without the written*/ /* consent of PROXIM, INC. */ /* */ /* */ /* (c) Copyright PROXIM, INC. 1994 */ /* All Rights Reserved */ /* */ /***************************************************************************/ /***************************************************************************/ /* */ /* $Header: J:\pvcs\archive\clld\asm.c_v 1.20 27 Sep 1996 09:03:38 */ /* */ /* */ /* */ /***************************************************************************/ #include #include #include /* #include #include "constant.h" */ #include "lld.h" #include "asm.h" #ifdef MULTI #include "bstruct.h" #include "pstruct.h" #ifdef SERIAL #include "slld.h" #include "slldbuf.h" #endif #include "multi.h" extern struct LLDVarsStruct *LLDVars; #else extern unsigned_8 LLDDebugFlag; #endif #define COLOR 1 #define MinCursor 80 * 27 * 2 #define MaxCursor 80 * 48 * 2 unsigned_16 Cursor = MinCursor; unsigned_16 ScreenColumn; /***************************************************************************/ /* _outp, _outw, _inp, _inpw */ /* */ /* in/out byte/word assembly commands used by the library. */ /* Mapped into the equivalent linux subroutines. */ /* */ /***************************************************************************/ _outp(a,b) { outb(b,a); } _outpw(a,b) { outw(b,a); } _inp(a) { inb(a); } _inpw(a) { inw(a); } /***************************************************************************/ /* */ /* Delay (millitime) */ /* */ /* INPUT: millitime - Number of milliseconds to delay. */ /* */ /* OUTPUT: */ /* */ /* DESCRIPTION: This routine calls a BIOS function to delay the required */ /* number of milliseconds. */ /* */ /***************************************************************************/ void Delay (unsigned_16 millitime) { int i; for(i=0; i> 24), ColorCode); OutHex ((unsigned_8)(HexLong >> 16), ColorCode); OutHex ((unsigned_8)(HexLong >> 8), ColorCode); OutHex ((unsigned_8)(HexLong >> 0), ColorCode); } /***************************************************************************/ /* */ /* OutHexW (HexWord, ColorCode) */ /* */ /* INPUT: The 16-bit hexadecimal number we want displayed. */ /* The number's color. */ /* */ /* OUTPUT: */ /* */ /* DESCRIPTION: This routine will print the Hex number to the screen */ /* */ /***************************************************************************/ void OutHexW (unsigned_16 HexWord, unsigned_8 ColorCode) { OutHex ((unsigned_8)(HexWord >> 8), ColorCode); OutHex ((unsigned_8)(HexWord >> 0), ColorCode); } /***************************************************************************/ /* */ /* OutHex (HexByte, ColorCode) */ /* */ /* INPUT: The 8-bit hexadecimal number we want displayed. */ /* The number's color. */ /* */ /* OUTPUT: */ /* */ /* DESCRIPTION: This routine will print the Hex number to the screen */ /* */ /***************************************************************************/ void OutHex (unsigned_8 HexByte, unsigned_8 ColorCode) { /* printk("%h",HexByte); */ /* unsigned_8 Abyte; if (LLDDebugFlag == COLOR) { __asm push ax __asm mov al, HexByte __asm push ax __asm and al, 011110000b __asm shr al, 1 __asm shr al, 1 __asm shr al, 1 __asm shr al, 1 __asm cmp al, 9 __asm jbe LLDISR_NP1 __asm add al, 'A'-10 __asm jmp LLDISR_NP1a LLDISR_NP1: __asm add al, 030h LLDISR_NP1a: __asm mov Abyte, al OutChar (Abyte, ColorCode); __asm pop ax __asm and al, 00001111b __asm cmp al, 9 __asm jbe LLDISR_NP2 __asm add al, 'A'-10 __asm jmp LLDISR_NP2a LLDISR_NP2: __asm add al, 030h LLDISR_NP2a: __asm mov Abyte, al OutChar (Abyte, ColorCode); __asm pop ax } */}