distabs.c File Reference

#include "dis.h"

Include dependency graph for distabs.c:

Go to the source code of this file.

Functions

char * getnam (int k)
int lookext (long off, long loc, char *buf)
char * lookup (long addr, int type, int kind, long ext)
char * mtrans (int c, int m, int type)
void mtrunc (char *a)

Variables

static char * sccsid
exec HDR
nlist symtab [MAXSYM]
reloc relo [MAXSYM]
int symptr = -1
int relptr = -1
char * REGS []
char * REGS0 []
char * REGS1 []
int symrank [6][6]
char ADD [] = "\tadd"
char OR [] = "\tor"
char ADC [] = "\tadc"
char SBB [] = "\tsbb"
char AND [] = "\tand"
char SUB [] = "\tsub"
char XOR [] = "\txor"
char CMP [] = "\tcmp"
char NOT [] = "\tnot"
char NEG [] = "\tneg"
char MUL [] = "\tmul"
char DIV [] = "\tdiv"
char MOV [] = "\tmov"
char ESC [] = "\tesc"
char TEST [] = "\ttest"
char AMBIG [] = ""
char ROL [] = "\trol"
char ROR [] = "\tror"
char RCL [] = "\trcl"
char RCR [] = "\trcr"
char SAL [] = "\tsal"
char SHR [] = "\tshr"
char SHL [] = "\tshl"
char SAR [] = "\tsar"
char * OPFAM []
opcode optab []


Function Documentation

char* getnam int  k  ) 
 

Definition at line 361 of file distabs.c.

References a, j, nlist::n_name, and symtab.

Referenced by getlab(), lookext(), lookup(), and prolog().

int lookext long  off,
long  loc,
char *  buf
 

Definition at line 406 of file distabs.c.

References c, getnam(), k, L, relo, relptr, S_BSS, sprintf(), strcat(), and strcpy().

Referenced by aohand(), lookup(), mahand(), mihand(), mmhand(), and tqhand().

char* lookup long  addr,
int  type,
int  kind,
long  ext
 

Definition at line 468 of file distabs.c.

References exec::a_flags, A_SEP, b, getnam(), HDR, i, j, k, LOOK_ABS, lookext(), N_DATA, N_SECT, N_TEXT, PC, segflg, sprintf(), symptr, symrank, symtab, t, and x.

char* mtrans int  c,
int  m,
int  type
 

Definition at line 552 of file distabs.c.

References a, b, FETCH, j, k, LOOK_ABS, lookup(), mod, N_DATA, offset, oflag, PC, pc, reg, REGS, REGS0, REGS1, rm, sprintf(), strcat(), and strcpy().

Referenced by aohand(), eshand(), mahand(), mjhand(), mmhand(), mshand(), mvhand(), pohand(), and srhand().

void mtrunc char *  a  ) 
 

Definition at line 691 of file distabs.c.

References k, and strlen().

Referenced by eshand(), mahand(), mjhand(), mmhand(), pohand(), and srhand().


Variable Documentation

char ADC[] = "\tadc"
 

Definition at line 63 of file distabs.c.

char ADD[] = "\tadd"
 

Definition at line 61 of file distabs.c.

char AMBIG[] = ""
 

Definition at line 76 of file distabs.c.

char AND[] = "\tand"
 

Definition at line 65 of file distabs.c.

char CMP[] = "\tcmp"
 

Definition at line 68 of file distabs.c.

Referenced by mergesort(), and sort().

char DIV[] = "\tdiv"
 

Definition at line 72 of file distabs.c.

char ESC[] = "\tesc"
 

Definition at line 74 of file distabs.c.

struct exec HDR
 

Definition at line 22 of file distabs.c.

Referenced by disbss(), disdata(), distext(), lookup(), and main().

char MOV[] = "\tmov"
 

Definition at line 73 of file distabs.c.

char MUL[] = "\tmul"
 

Definition at line 71 of file distabs.c.

char NEG[] = "\tneg"
 

Definition at line 70 of file distabs.c.

char NOT[] = "\tnot"
 

Definition at line 69 of file distabs.c.

char* OPFAM[]
 

Initial value:

                     
   {
   ADD, OR, ADC, SBB, AND, SUB, XOR, CMP,
   NOT, NEG, MUL, DIV, MOV, ESC, TEST, AMBIG,
   ROL, ROR, RCL, RCR, SAL, SHR, SHL, SAR
   }

Definition at line 86 of file distabs.c.

Referenced by imhand(), and srhand().

struct opcode optab[]
 

Definition at line 93 of file distabs.c.

Referenced by aahand(), aohand(), cihand(), dfhand(), inhand(), iohand(), ljhand(), mihand(), mmhand(), mqhand(), mshand(), mvhand(), pohand(), rehand(), sbhand(), sjhand(), and tqhand().

char OR[] = "\tor"
 

Definition at line 62 of file distabs.c.

char RCL[] = "\trcl"
 

Definition at line 79 of file distabs.c.

char RCR[] = "\trcr"
 

Definition at line 80 of file distabs.c.

char* REGS[]
 

Initial value:

                
   {
   "al", "cl", "dl", "bl", "ah", "ch", "dh", "bh",
   "ax", "cx", "dx", "bx", "sp", "bp", "si", "di",
   "es", "cs", "ss", "ds"
   }

Definition at line 31 of file distabs.c.

Referenced by imhand(), mqhand(), mtrans(), and tqhand().

char* REGS0[]
 

Initial value:

               
   {
   "bx_si", "bx_di", "bp_si", "bp_di", "si", "di", "", "bx"
   }

Definition at line 38 of file distabs.c.

Referenced by imhand(), and mtrans().

char* REGS1[]
 

Initial value:

               
   {
   "bx_si", "bx_di", "bp_si", "bp_di", "si", "di", "bp", "bx"
   }

Definition at line 43 of file distabs.c.

Referenced by imhand(), and mtrans().

struct reloc relo[MAXSYM]
 

Definition at line 26 of file distabs.c.

Referenced by lookext(), and main().

int relptr = -1
 

Definition at line 29 of file distabs.c.

Referenced by lookext(), and main().

char ROL[] = "\trol"
 

Definition at line 77 of file distabs.c.

char ROR[] = "\tror"
 

Definition at line 78 of file distabs.c.

char SAL[] = "\tsal"
 

Definition at line 81 of file distabs.c.

char SAR[] = "\tsar"
 

Definition at line 84 of file distabs.c.

char SBB[] = "\tsbb"
 

Definition at line 64 of file distabs.c.

char* sccsid [static]
 

Initial value:

   "@(#) distabs.c, Ver. 2.1 created 00:00:00 87/09/01"

Definition at line 1 of file distabs.c.

char SHL[] = "\tshl"
 

Definition at line 83 of file distabs.c.

char SHR[] = "\tshr"
 

Definition at line 82 of file distabs.c.

char SUB[] = "\tsub"
 

Definition at line 66 of file distabs.c.

int symptr = -1
 

Definition at line 28 of file distabs.c.

Referenced by distext(), getlab(), lookup(), main(), objout(), and prolog().

int symrank[6][6]
 

Initial value:

           
   {
              
         5,   4,   1,   2,   3,   0,
         1,   5,   4,   3,   2,   0,
         4,   1,   5,   3,   2,   0,
         3,   1,   2,   5,   4,   0,
         3,   1,   2,   4,   5,   0,
         2,   0,   1,   3,   4,   5
   }

Definition at line 48 of file distabs.c.

Referenced by lookup().

struct nlist symtab[MAXSYM]
 

Definition at line 24 of file distabs.c.

char TEST[] = "\ttest"
 

Definition at line 75 of file distabs.c.

char XOR[] = "\txor"
 

Definition at line 67 of file distabs.c.


Generated on Fri Apr 14 23:02:20 2006 for minix by  doxygen 1.4.6