/* asm.h */

/****************************************************************************
 *
 *  Copyright (C) 2000-2001 Eli-Jean R. Leyssens, aka Pervect of Topix
 *
 *  This file is part of the CodePressor package.
 *
 *  CodePressor 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
 *  (at your option) any later version.
 *
 *  CodePressor 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 CodePressor; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
 *
 *  Eli-Jean R. Leyssens can be reached via email at eli@dnd.utwente.nl
 *  snail: E-J.R. Leyssens, Schivelbeinerstr. 5, 10439 Berlin, Germany
 *
 ***************************************************************************/

#ifndef _ASM_
#define _ASM_

#include <oslib/types.h>

typedef struct {
        bits   Number;
        int    Count; // Number of instructions required
        bits   ASMValues[ 4]; // Encoded 12 bit immediate constant values
} TASMNumber;

void NumberToTASMNumber( bits Number, TASMNumber * ptNumber);
void SetBranch( byte * pbInstruction, bits From, bits To);
void SetASMValue( byte * pbInstruction, bits ASMValue);
void SetDWORD( byte * pbMemory, bits DWORD);
bool SetADR( byte * pbInstruction, bits From, bits Address);

#endif // _ASM_
