1994-06-24 11:31:16 +00:00
|
|
|
/* $Id$ */
|
1987-03-09 19:15:41 +00:00
|
|
|
/*
|
|
|
|
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
|
|
|
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
|
|
|
*/
|
1984-11-26 13:43:22 +00:00
|
|
|
/* I N T E R M E D I A T E C O D E
|
|
|
|
*
|
|
|
|
* L O W L E V E L I / O R O U T I N E S
|
|
|
|
*/
|
|
|
|
|
2019-10-31 22:05:22 +00:00
|
|
|
#include <stdio.h> /* FILE */
|
1984-11-26 13:43:22 +00:00
|
|
|
|
2019-10-31 22:05:22 +00:00
|
|
|
int table1(void); /*
|
1984-11-26 13:43:22 +00:00
|
|
|
* Read an instruction from the
|
|
|
|
* Compact Assembly Language input
|
|
|
|
* file (in 'neutral state').
|
|
|
|
*/
|
2019-10-31 22:05:22 +00:00
|
|
|
int table2(void); /*
|
1984-11-26 13:43:22 +00:00
|
|
|
* Read an instruction argument.
|
|
|
|
*/
|
2019-10-31 22:05:22 +00:00
|
|
|
int table3(int); /*
|
1984-11-26 13:43:22 +00:00
|
|
|
* Read 'Common Table' item.
|
|
|
|
*/
|
2019-10-31 22:05:22 +00:00
|
|
|
short get_int(void);
|
|
|
|
offset get_off(void);
|
|
|
|
char readchar(void);
|
|
|
|
void file_init(FILE *f, short state, long length);
|
|
|
|
/*
|
1984-11-26 13:43:22 +00:00
|
|
|
* Input file initialization. All
|
|
|
|
* following read operations will read
|
|
|
|
* from the given file f. Also checks
|
|
|
|
* the magic number and sets global
|
|
|
|
* variable 'linecount' to 0.
|
|
|
|
* If the state is ARCHIVE, length
|
|
|
|
* specifies the length of the module.
|
|
|
|
*/
|
2019-10-31 22:05:22 +00:00
|
|
|
void arch_init(FILE *arch); /*
|
1984-11-26 13:43:22 +00:00
|
|
|
* Same as file_init,but opens an
|
|
|
|
* archive file. So it checks the
|
|
|
|
* magic number for archives.
|
|
|
|
*/
|