OpenCores
URL https://opencores.org/ocsvn/zipcpu/zipcpu/trunk

Subversion Repositories zipcpu

[/] [zipcpu/] [trunk/] [sw/] [zasm/] [zopcodes.h] - Diff between revs 70 and 89

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 70 Rev 89
Line 35... Line 35...
//
//
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
#ifndef ZOPCODES_H
#ifndef ZOPCODES_H
#define ZOPCODES_H
#define ZOPCODES_H
 
 
#define OPUNUSED        -1
#define ZIP_OPUNUSED    -1
#define ISUSEROP(A)     ((a&(~0x0f))==0x000)
#define ISUSEROP(A)     ((a&(~0x0f))==0x000)
#define ISSUPROP(A)     ((a&(~0x0f))==0x010)
#define ISSUPROP(A)     ((a&(~0x0f))==0x010)
#define ISLCLROP(A)     ((a&(~0x0f))==0x020)
#define ISLCLROP(A)     ((a&(~0x0f))==0x020)
#define BITFIELD(LN,MN) (((LN&0x0ff)<<8)+(MN&0x0ff))
#define ZIP_BITFIELD(LN,MN)     (((LN&0x0ff)<<8)+(MN&0x0ff))
#define REGFIELD(MN)    (0x00000400 +(MN&0x0ff))
#define ZIP_REGFIELD(MN)        (0x00000400 +(MN&0x0ff))
#define URGFIELD(MN)    (0x0100400 +(MN&0x0ff))
#define ZIP_URGFIELD(MN)        (0x0100400 +(MN&0x0ff))
#define SRGFIELD(MN)    (0x0200400 +(MN&0x0ff))
#define ZIP_SRGFIELD(MN)        (0x0200400 +(MN&0x0ff))
#define IMMFIELD(LN,MN) (0x40000000 + (((LN&0x0ff)<<8)+(MN&0x0ff))) // Sgn extnd
#define ZIP_IMMFIELD(LN,MN)     (0x40000000 + (((LN&0x0ff)<<8)+(MN&0x0ff))) // Sgn extnd
// #define      REGVAL(V)       ((V & 0x0f)+0x020)
// #define      REGVAL(V)       ((V & 0x0f)+0x020)
 
 
typedef unsigned int    ZIPI;   // A Zip CPU instruction
typedef unsigned int    ZIPI;   // A Zip CPU instruction
 
 
typedef struct {
typedef struct {

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.