mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-12-24 23:56:49 +03:00
6bd5a354f5
git-svn-id: svn://kolibrios.org@6446 a494cfbc-eb01-0410-851d-a64ba20cac60
33 lines
807 B
C
33 lines
807 B
C
/* some defines for extracting instruction bit fields from bytes */
|
|
|
|
#define MOD(a) (((a)>>6)&3)
|
|
|
|
#define REG(a) (((a)>>3)&7)
|
|
|
|
#define RM(a) ((a)&7)
|
|
|
|
#define SCALE(a) (((a)>>6)&3)
|
|
|
|
#define INDEX(a) (((a)>>3)&7)
|
|
|
|
#define BASE(a) ((a)&7)
|
|
|
|
|
|
|
|
typedef union{
|
|
|
|
struct{
|
|
|
|
unsigned short ofs;
|
|
|
|
unsigned short seg;
|
|
|
|
}w;
|
|
|
|
unsigned long dword;
|
|
|
|
}WORD32;
|
|
|
|
|
|
|
|
/* prototypes */
|
|
|
|
void ua_str(char *);
|
|
|
|
unsigned char getbyte(void);
|
|
|
|
int modrm();
|
|
|
|
int sib();
|
|
|
|
void uprintf(char *, ...);
|
|
|
|
void uputchar(char );
|
|
|
|
int bytes(char );
|
|
|
|
void outhex(char , int , int , int , int );
|
|
|
|
void reg_name(int , char );
|
|
|
|
void do_sib(int );
|
|
|
|
void do_modrm(char );
|
|
|
|
void floating_point(int );
|
|
|
|
void percent(char , char );
|
|
|
|
void undata(unsigned ofs,unsigned long len,unsigned int type);
|
|
|
|
|
|
|