dis.h File Reference

#include <sys/types.h>
#include <a.out.h>
#include <fcntl.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>

Include dependency graph for dis.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  opcode

Defines

#define MAXSYM   1500
#define AL   REGS[0]
#define CL   REGS[1]
#define DL   REGS[2]
#define BL   REGS[3]
#define AH   REGS[4]
#define CH   REGS[5]
#define DH   REGS[6]
#define BH   REGS[7]
#define AX   REGS[8]
#define CX   REGS[9]
#define DX   REGS[10]
#define BX   REGS[11]
#define SP   REGS[12]
#define BP   REGS[13]
#define SI   REGS[14]
#define DI   REGS[15]
#define ES   REGS[16]
#define CS   REGS[17]
#define SS   REGS[18]
#define DS   REGS[19]
#define BX_SI   REGS0[0]
#define BX_DI   REGS0[1]
#define BP_SI   REGS0[2]
#define BP_DI   REGS0[3]
#define OBJMAX   8
#define LOOK_ABS   0
#define LOOK_REL   1
#define LOOK_LNG   2
#define TR_STD   0
#define TR_SEG   8
#define FETCH(p)   ++PC; p = getchar() & 0xff; objbuf[objptr++] = p

Functions

 _PROTOTYPE (void eshand,(int j))
 _PROTOTYPE (void objout,(void))
 _PROTOTYPE (void badseq,(int j, int k))
 _PROTOTYPE (void main,(int argc, char **argv))
 _PROTOTYPE (char *getnam,(int k))
 _PROTOTYPE (int lookext,(long off, long loc, char *buf))
 _PROTOTYPE (char *lookup,(long addr, int type, int kind, long ext))
 _PROTOTYPE (char *mtrans,(int c, int m, int type))
 _PROTOTYPE (void mtrunc,(char *a))

Variables

nlist symtab [MAXSYM]
reloc relo [MAXSYM]
int symptr
int relptr
opcode optab [256]
char * REGS []
char * REGS0 []
char * REGS1 []
int symrank [6][6]
unsigned long PC
int segflg
int objflg
unsigned char objbuf [OBJMAX]
int objptr
char ADD []
char OR []
char ADC []
char SBB []
char AND []
char SUB []
char XOR []
char CMP []
char NOT []
char NEG []
char MUL []
char DIV []
char MOV []
char ESC []
char TEST []
char AMBIG []
char * OPFAM []
exec HDR


Define Documentation

#define AH   REGS[4]
 

Definition at line 65 of file dis.h.

#define AL   REGS[0]
 

Definition at line 61 of file dis.h.

Referenced by ini_terminal(), ins_line(), reverse_scroll(), scrollb(), and starttcap().

#define AX   REGS[8]
 

Definition at line 69 of file dis.h.

#define BH   REGS[7]
 

Definition at line 68 of file dis.h.

#define BL   REGS[3]
 

Definition at line 64 of file dis.h.

#define BP   REGS[13]
 

Definition at line 74 of file dis.h.

#define BP_DI   REGS0[3]
 

Definition at line 84 of file dis.h.

#define BP_SI   REGS0[2]
 

Definition at line 83 of file dis.h.

#define BX   REGS[11]
 

Definition at line 72 of file dis.h.

#define BX_DI   REGS0[1]
 

Definition at line 82 of file dis.h.

#define BX_SI   REGS0[0]
 

Definition at line 81 of file dis.h.

#define CH   REGS[5]
 

Definition at line 66 of file dis.h.

#define CL   REGS[1]
 

Definition at line 62 of file dis.h.

Referenced by ini_terminal(), pagef(), panic(), RD(), shift(), and VI().

#define CS   REGS[17]
 

Definition at line 78 of file dis.h.

#define CX   REGS[9]
 

Definition at line 70 of file dis.h.

Referenced by starttcap().

#define DH   REGS[6]
 

Definition at line 67 of file dis.h.

#define DI   REGS[15]
 

Definition at line 76 of file dis.h.

#define DL   REGS[2]
 

Definition at line 63 of file dis.h.

Referenced by starttcap().

#define DS   REGS[19]
 

Definition at line 80 of file dis.h.

#define DX   REGS[10]
 

Definition at line 71 of file dis.h.

#define ES   REGS[16]
 

Definition at line 77 of file dis.h.

#define FETCH p   )     ++PC; p = getchar() & 0xff; objbuf[objptr++] = p
 

Definition at line 126 of file dis.h.

Referenced by aahand(), aohand(), cihand(), eshand(), fphand(), imhand(), inhand(), iohand(), ljhand(), mahand(), mihand(), mjhand(), mmhand(), mqhand(), mshand(), mtrans(), mvhand(), pohand(), rehand(), sjhand(), srhand(), and tqhand().

#define LOOK_ABS   0
 

Definition at line 118 of file dis.h.

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

#define LOOK_LNG   2
 

Definition at line 120 of file dis.h.

Referenced by ljhand().

#define LOOK_REL   1
 

Definition at line 119 of file dis.h.

Referenced by sjhand().

#define MAXSYM   1500
 

Definition at line 35 of file dis.h.

Referenced by main(), and parse_line().

#define OBJMAX   8
 

Definition at line 91 of file dis.h.

Referenced by objdump().

#define SI   REGS[14]
 

Definition at line 75 of file dis.h.

#define SP   REGS[12]
 

Definition at line 73 of file dis.h.

#define SS   REGS[18]
 

Definition at line 79 of file dis.h.

#define TR_SEG   8
 

Definition at line 123 of file dis.h.

Referenced by mshand().

#define TR_STD   0
 

Definition at line 122 of file dis.h.

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


Function Documentation

_PROTOTYPE void  mtrunc,
(char *a
 

_PROTOTYPE char *  mtrans,
(int c, int m, int type
 

_PROTOTYPE char *  lookup,
(long addr, int type, int kind, long ext) 
 

_PROTOTYPE int  lookext,
(long off, long loc, char *buf
 

_PROTOTYPE char *  getnam,
(int k
 

_PROTOTYPE void  main,
(int argc, char **argv) 
 

_PROTOTYPE void  badseq,
(int j, int k
 

_PROTOTYPE void  objout,
(void) 
 

_PROTOTYPE void  eshand,
(int j
 


Variable Documentation

char ADC[]
 

Definition at line 63 of file distabs.c.

char ADD[]
 

Definition at line 61 of file distabs.c.

char AMBIG[]
 

Definition at line 76 of file distabs.c.

char AND[]
 

Definition at line 65 of file distabs.c.

char CMP[]
 

Definition at line 68 of file distabs.c.

Referenced by mergesort(), and sort().

char DIV[]
 

Definition at line 72 of file distabs.c.

char ESC[]
 

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[]
 

Definition at line 73 of file distabs.c.

char MUL[]
 

Definition at line 71 of file distabs.c.

char NEG[]
 

Definition at line 70 of file distabs.c.

char NOT[]
 

Definition at line 69 of file distabs.c.

unsigned char objbuf[OBJMAX]
 

Definition at line 35 of file dishand.c.

Referenced by eshand(), fphand(), mahand(), mjhand(), objdump(), objini(), and objout().

int objflg
 

Definition at line 39 of file dismain.c.

Referenced by getlab(), main(), and objout().

int objptr
 

Definition at line 37 of file dishand.c.

Referenced by eshand(), fphand(), objdump(), objini(), and objout().

char* OPFAM[]
 

Definition at line 86 of file distabs.c.

Referenced by imhand(), and srhand().

struct opcode optab[256]
 

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[]
 

Definition at line 62 of file distabs.c.

unsigned long PC
 

Definition at line 39 of file dishand.c.

char* REGS[]
 

Definition at line 31 of file distabs.c.

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

char* REGS0[]
 

Definition at line 38 of file distabs.c.

Referenced by imhand(), and mtrans().

char* REGS1[]
 

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
 

Definition at line 29 of file distabs.c.

Referenced by lookext(), and main().

char SBB[]
 

Definition at line 64 of file distabs.c.

int segflg
 

Definition at line 33 of file dishand.c.

Referenced by dfhand(), disbss(), disdata(), distext(), fphand(), lookup(), objini(), and sbhand().

char SUB[]
 

Definition at line 66 of file distabs.c.

int symptr
 

Definition at line 28 of file distabs.c.

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

int symrank[6][6]
 

Definition at line 48 of file distabs.c.

Referenced by lookup().

struct nlist symtab[MAXSYM]
 

Definition at line 24 of file distabs.c.

Referenced by dump_sym_tab(), findsname(), findsval(), getlab(), getnam(), gnu_init(), gnu_listsym(), gnu_sname(), gnu_sval(), listsym(), lookup(), main(), parse_line(), prolog(), stack_trace(), and syminit().

char TEST[]
 

Definition at line 75 of file distabs.c.

char XOR[]
 

Definition at line 67 of file distabs.c.


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