summaryrefslogtreecommitdiff
path: root/dviware/catdvi/regsta.h
blob: 70d9089f7d41139132e1212803281ea29a176cce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/* catdvi - get text from DVI files
   Copyright (C) 1999 Antti-Juhani Kaijanaho <gaia@iki.fi>

   This program 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.

   This program 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 this program; if not, write to the Free Software
   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/

#ifndef REGSTA_H
#define REGSTA_H

#include "bytesex.h"

/* Handle the registers and the stack. */

#define REGISTER_H 0
#define REGISTER_V 1
#define REGISTER_W 2
#define REGISTER_X 3
#define REGISTER_Y 4
#define REGISTER_Z 5

/* Set registers to zero and initialize an empty stack with the given
   maximum depth. */
void init_regs_stack(int depth);

/* Get the value of one of the registers (h, v, w, x, y, z). */

sint32 get_reg(int reg);

/* Set the value of one of the registers (h, v, w, x, y, z). */
void set_reg(int reg, sint32);

/* Add to the value of one of the registers. */
void add_reg(int reg, sint32 a);

/* Push the registers on the stack. */
void push_regs(void);

/* Pop the registers off the stack. */
void pop_regs(void);

/* For debug purposes, dump registers to the standard error stream, if
   level is right. */
void dump_regs(int level);

#endif /* REGSTA_H */