diff --git a/modules/src/read_em/EM_vars.c b/modules/src/read_em/EM_vars.c index 12e379dd7..678ce619e 100644 --- a/modules/src/read_em/EM_vars.c +++ b/modules/src/read_em/EM_vars.c @@ -12,5 +12,5 @@ char *EM_error; char *EM_filename; unsigned int EM_lineno; int EM_wordsize, EM_pointersize; -arith em_holorbsssize; -int em_holorbssinit; +arith EM_holsize, EM_bsssize; +int EM_holinit, EM_bssinit; diff --git a/modules/src/read_em/em_comp.h b/modules/src/read_em/em_comp.h index e1da31b3c..2a6269dfb 100644 --- a/modules/src/read_em/em_comp.h +++ b/modules/src/read_em/em_comp.h @@ -42,9 +42,9 @@ struct e_instr { }; extern arith - em_holorbsssize; + EM_holsize, EM_bsssize; extern int - em_holorbssinit; + EM_holinit, EM_bssinit; #define em_ilb em_arg.ema_ilb #define em_dlb em_arg.ema_dlb @@ -55,14 +55,11 @@ extern int #define em_string em_arg.ema_string #define em_off em_arg.ems_szoroff #define em_size em_arg.ems_szoroff + +/* Arguments for EXC pseudo: */ #define em_exc1 em_arg.ema_cst #define em_exc2 em_arg.ems_szoroff -#define em_holsize em_holorbsssize -#define em_bsssize em_holorbsssize -#define em_holinit em_holorbssinit -#define em_bssinit em_holorbssinit - extern char *EM_error, *EM_filename; extern unsigned int diff --git a/modules/src/read_em/mkcalls.c b/modules/src/read_em/mkcalls.c index 17622efd4..bd41cb4b9 100644 --- a/modules/src/read_em/mkcalls.c +++ b/modules/src/read_em/mkcalls.c @@ -106,49 +106,49 @@ EM_dopseudo(p) checkarg(&(p->em_arg), par_ptyp); switch(p->em_argtype) { case cst_ptyp: - C_hol_cst(em_holsize, + C_hol_cst(EM_holsize, p->em_cst, - em_holinit); + EM_holinit); break; case ico_ptyp: - C_hol_icon(em_holsize, + C_hol_icon(EM_holsize, p->em_string, p->em_size, - em_holinit); + EM_holinit); break; case uco_ptyp: - C_hol_ucon(em_holsize, + C_hol_ucon(EM_holsize, p->em_string, p->em_size, - em_holinit); + EM_holinit); break; case fco_ptyp: - C_hol_fcon(em_holsize, + C_hol_fcon(EM_holsize, p->em_string, p->em_size, - em_holinit); + EM_holinit); break; case sof_ptyp: - C_hol_dnam(em_holsize, + C_hol_dnam(EM_holsize, p->em_dnam, p->em_off, - em_holinit); + EM_holinit); break; case nof_ptyp: - C_hol_dlb(em_holsize, + C_hol_dlb(EM_holsize, p->em_dlb, p->em_off, - em_holinit); + EM_holinit); break; case ilb_ptyp: - C_hol_ilb(em_holsize, + C_hol_ilb(EM_holsize, p->em_ilb, - em_holinit); + EM_holinit); break; case pro_ptyp: - C_hol_pnam(em_holsize, + C_hol_pnam(EM_holsize, p->em_pnam, - em_holinit); + EM_holinit); break; default: EM_error = "Illegal parameter type"; @@ -160,49 +160,49 @@ EM_dopseudo(p) checkarg(&(p->em_arg), par_ptyp); switch(p->em_argtype) { case cst_ptyp: - C_bss_cst(em_bsssize, + C_bss_cst(EM_bsssize, p->em_cst, - em_bssinit); + EM_bssinit); break; case ico_ptyp: - C_bss_icon(em_bsssize, + C_bss_icon(EM_bsssize, p->em_string, p->em_size, - em_bssinit); + EM_bssinit); break; case uco_ptyp: - C_bss_ucon(em_bsssize, + C_bss_ucon(EM_bsssize, p->em_string, p->em_size, - em_bssinit); + EM_bssinit); break; case fco_ptyp: - C_bss_fcon(em_bsssize, + C_bss_fcon(EM_bsssize, p->em_string, p->em_size, - em_bssinit); + EM_bssinit); break; case sof_ptyp: - C_bss_dnam(em_bsssize, + C_bss_dnam(EM_bsssize, p->em_dnam, p->em_off, - em_bssinit); + EM_bssinit); break; case nof_ptyp: - C_bss_dlb(em_bsssize, + C_bss_dlb(EM_bsssize, p->em_dlb, p->em_off, - em_bssinit); + EM_bssinit); break; case ilb_ptyp: - C_bss_ilb(em_bsssize, + C_bss_ilb(EM_bsssize, p->em_ilb, - em_bssinit); + EM_bssinit); break; case pro_ptyp: - C_bss_pnam(em_bsssize, + C_bss_pnam(EM_bsssize, p->em_pnam, - em_bssinit); + EM_bssinit); break; default: EM_error = "Illegal parameter type"; diff --git a/modules/src/read_em/read_em.3 b/modules/src/read_em/read_em.3 index c4477fc5e..02fa6a2ae 100644 --- a/modules/src/read_em/read_em.3 +++ b/modules/src/read_em/read_em.3 @@ -102,9 +102,9 @@ struct e_instr { }; extern arith - em_holorbsssize; + EM_holsize, EM_bsssize; extern int - em_holorbssinit; + EM_holinit, EM_bssinit; #define em_ilb em_arg.ema_ilb #define em_dlb em_arg.ema_dlb @@ -115,14 +115,11 @@ extern int #define em_string em_arg.ema_string #define em_off em_arg.ems_szoroff #define em_size em_arg.ems_szoroff + +/* arguments for EXC pseudo: */ #define em_exc1 em_arg.ema_cst #define em_exc2 em_arg.ems_szoroff -#define em_holsize em_holorbsssize -#define em_bsssize em_holorbsssize -#define em_holinit em_holorbssinit -#define em_bssinit em_holorbssinit - extern char *EM_error, *EM_filename; extern unsigned int @@ -173,7 +170,9 @@ The same holds for ROM-pseudos. Also, if the length of a string constant exceeds 256 characters, it will be delivered as several CON's or ROM's. There are two "special" pseudo's, that use other variables, HOL and BSS. -They use them as indicated in the #defines. +They use EM_holsize, EM_holinit, EM_bsssize, and EM_bssinit, because those +arguments do not fit in the \fIe_arg\fR structure, and we want to keep the +\fIe_arg\fR structure as small as possible. The EXC pseudo has its arguments encoded as indicated in the #defines. .IP "EM_STARTMES em_arg" \nau the start of a MES pseudo. diff --git a/modules/src/read_em/read_em.c b/modules/src/read_em/read_em.c index 29e372cbc..c66c98356 100644 --- a/modules/src/read_em/read_em.c +++ b/modules/src/read_em/read_em.c @@ -318,14 +318,14 @@ EM_getinstr(p) case ps_bss: case ps_hol: getarg(cst_ptyp, &dummy); - em_holsize = dummy.ema_cst; + EM_holsize = dummy.ema_cst; getarg(par_ptyp, &(p->em_arg)); getarg(cst_ptyp, &dummy); - em_holinit = dummy.ema_cst; + EM_holinit = dummy.ema_cst; #ifdef CHECKING /* Check that the last value is 0 or 1 */ - if (em_holinit != 1 && em_holinit != 0) { + if (EM_holinit != 1 && EM_holinit != 0) { if (! EM_error) EM_error="Third argument of hol/bss not 0/1"; }