1987-11-25 14:03:48 +00:00
|
|
|
/* This file must be included in all the files which use the backlibrary.
|
|
|
|
*/
|
|
|
|
|
1987-11-20 10:41:03 +00:00
|
|
|
extern char *extnd_name(), *extnd_dnam(), *extnd_dlb(), *extnd_ilb(),
|
1988-09-08 10:24:16 +00:00
|
|
|
*extnd_hol(), *extnd_ext(), *extnd_pro(), *extnd_start(),
|
|
|
|
*extnd_part(), *extnd_cont();
|
1989-01-26 13:32:57 +00:00
|
|
|
#include <em.h>
|
1987-11-20 10:41:03 +00:00
|
|
|
#include "data.h"
|
|
|
|
|
1987-11-25 14:03:48 +00:00
|
|
|
/* These routines are called very often, thus we turned them into macros. */
|
|
|
|
|
1988-11-18 17:52:39 +00:00
|
|
|
#define text1(b) {if (--text_cnt < 0) mem_text(); *text++ = b;}
|
|
|
|
#define con1(b) {if (--data_cnt < 0) mem_data(); *data++ = b;}
|
|
|
|
#define rom1(b) {if (--data_cnt < 0) mem_data(); *data++ = b;}
|
1987-11-20 10:41:03 +00:00
|
|
|
#define bss( n) ( nbss += n)
|
|
|
|
|
1989-01-26 13:32:57 +00:00
|
|
|
/* Macros to change interface names */
|
|
|
|
|
|
|
|
#define common B_common
|
|
|
|
#define con2 B_con2
|
|
|
|
#define con4 B_con4
|
|
|
|
#define rom2 B_rom2
|
|
|
|
#define rom4 B_rom4
|
|
|
|
#define text2 B_txt2
|
|
|
|
#define text4 B_txt4
|
|
|
|
#define close_back B_close_back
|
|
|
|
#define open_back B_open_back
|
|
|
|
#define end_back B_end_back
|
|
|
|
#define init_back B_init_back
|
|
|
|
#define extnd_pro B_ex_pro
|
|
|
|
#define extnd_start B_ex_start
|
|
|
|
#define extnd_name B_ex_name
|
|
|
|
#define extnd_dnam B_ex_dnam
|
|
|
|
#define extnd_dlb B_ex_dlb
|
|
|
|
#define extnd_ilb B_ex_ilb
|
|
|
|
#define extnd_hol B_ex_hol
|
|
|
|
#define extnd_part B_ex_part
|
|
|
|
#define extnd_cont B_ex_cont
|
|
|
|
#define gen1 B_gen1
|
|
|
|
#define gen2 B_gen2
|
|
|
|
#define gen4 B_gen4
|
|
|
|
#define save_label B_save_label
|
|
|
|
#define dump_label B_dump_label
|
|
|
|
#define align_word B_align_word
|
|
|
|
#define reloc1 B_rlc1
|
|
|
|
#define reloc2 B_rlc2
|
|
|
|
#define reloc4 B_rlc4
|
|
|
|
#define set_global_visible B_stglobvis
|
|
|
|
#define set_local_visible B_stlocvis
|
|
|
|
#define symbol_definition B_symdef
|
|
|
|
|
1987-11-25 14:03:48 +00:00
|
|
|
|
|
|
|
/* Numbering of the segments and some global constants */
|
|
|
|
|
1987-11-20 10:41:03 +00:00
|
|
|
#define SEGTXT 0
|
|
|
|
#define SEGROM 1
|
|
|
|
#define SEGCON 2
|
|
|
|
#define SEGBSS 3
|
1988-09-08 10:26:18 +00:00
|
|
|
#define SEGHOL -1 /* does not exist */
|
1987-11-20 10:41:03 +00:00
|
|
|
|
1988-05-27 14:08:29 +00:00
|
|
|
#define swtxt() switchseg( SEGTXT)
|
1987-11-25 14:03:48 +00:00
|
|
|
|
1989-01-26 13:32:57 +00:00
|
|
|
#define switchseg(seg) if ((seg) != cur_seg) B_swtchsg(seg); else
|
1988-10-31 15:42:15 +00:00
|
|
|
|
1987-11-25 14:03:48 +00:00
|
|
|
#define PC_REL 1
|
|
|
|
#define ABSOLUTE !PC_REL
|
|
|
|
|
|
|
|
|
|
|
|
/* Initialize values. */
|
1987-11-20 10:41:03 +00:00
|
|
|
|
1988-10-20 13:06:10 +00:00
|
|
|
#define MAXTEXT 4096
|
|
|
|
#define MAXDATA 2048
|
1988-10-31 15:42:15 +00:00
|
|
|
#define MAXRELO 512
|
|
|
|
#define MAXNAME 512
|
|
|
|
#define MAXSTRING 4096
|
1987-11-20 10:41:03 +00:00
|
|
|
|