#include <stdio.h>
#include <string.h>
-#include <alloc.h>
+//#include <alloc.h>
#include "aslink.h"
/*)Module lkdata.c
char rb[NINPUT]; /* LST file text line being
* address relocated
*/
+
+char sdccopt[NINPUT]="";
+char sdccopt_module[NINPUT]="";
+char curr_module[NINPUT]="";
+
int oflag; /* Output file type flag
*/
int mflag; /* Map output flag
int rtcnt; /* count of elements in the
* rtval[] and rtflg[] arrays
*/
-addr_t rtval[NTXT]; /* data associated with relocation
+Addr_T rtval[NTXT]; /* data associated with relocation
*/
int rtflg[NTXT]; /* indicates if rtval[] value is
* to be sent to the output file.
struct lfile *filep; /* The pointers (lfile *) filep,
* (lfile *) cfp, and (FILE *) sfp
* are used in conjunction with
- * the routine getline() to read
+ * the routine lk_getline() to read
* asmlnk commands from
* (1) the standard input or
* (2) or a command file
* {
* struct area *a_ap; Area link
* struct areax *a_axp; Area extension link
- * addr_t a_addr; Beginning address of area
- * addr_t a_size; Total size of the area
+ * Addr_T a_addr; Beginning address of area
+ * Addr_T a_size; Total size of the area
* char a_type; Area subtype
* char a_flag; Flag byte
* char a_id[NCPS]; Name
* struct areax *a_axp; Area extension link
* struct area *a_bap; Base area link
* struct head *a_bhp; Base header link
- * addr_t a_addr; Beginning address of section
- * addr_t a_size; Size of the area in section
+ * Addr_T a_addr; Beginning address of section
+ * Addr_T a_size; Size of the area in section
* };
*/
struct areax *axp; /* Pointer to the current
* struct areax *s_axp; Symbol area link
* char s_type; Symbol subtype
* char s_flag; Flag byte
- * addr_t s_addr; Address
+ * Addr_T s_addr; Address
* char s_id[NCPS]; Name
* };
*/
* {
* struct area *s_area; Paged Area link
* struct areax *s_areax; Paged Area Extension Link
- * addr_t s_addr; Page address offset
+ * Addr_T s_addr; Page address offset
* };
*/
struct sdp sdp; /* Base Page Structure */
* {
* int aindex; Linking area
* int mode; Relocation mode
- * addr_t rtbase; Base address in section
+ * Addr_T rtbase; Base address in section
* int rindex; Area/Symbol reloaction index
- * addr_t rval; Area/Symbol offset value
+ * Addr_T rval; Area/Symbol offset value
* };
*/
struct rerr rerr; /* Structure containing the
* array of character types, one per
* ASCII character
*/
-char ctype[128] = {
+unsigned char ctype[128] = {
/*NUL*/ ILL, ILL, ILL, ILL, ILL, ILL, ILL, ILL,
/*BS*/ ILL, SPACE, ILL, ILL, SPACE, ILL, ILL, ILL,
/*DLE*/ ILL, ILL, ILL, ILL, ILL, ILL, ILL, ILL,