ia16-elf-gcc: eliminate DOSDATA, DOSTEXT and C use of TGROUP.
Now that it understands relocations those are no longer necessary.
This commit is contained in:
parent
204c2d5ba9
commit
761582ec0d
@ -160,14 +160,7 @@ extern struct dhdr FAR ASM clk_dev; /* Clock device driver */
|
|||||||
extern struct dhdr FAR ASM con_dev; /* Console device driver */
|
extern struct dhdr FAR ASM con_dev; /* Console device driver */
|
||||||
extern struct dhdr FAR ASM prn_dev; /* Generic printer device driver */
|
extern struct dhdr FAR ASM prn_dev; /* Generic printer device driver */
|
||||||
extern struct dhdr FAR ASM aux_dev; /* Generic aux device driver */
|
extern struct dhdr FAR ASM aux_dev; /* Generic aux device driver */
|
||||||
#ifndef __GNUC__
|
|
||||||
extern struct dhdr FAR ASM blk_dev; /* Block device (Disk) driver */
|
extern struct dhdr FAR ASM blk_dev; /* Block device (Disk) driver */
|
||||||
#else
|
|
||||||
extern struct dhdr ASM blk_dev;
|
|
||||||
#define DosTextSeg 0x70
|
|
||||||
#define DOSTEXT(x) (*(typeof(x) FAR *)MK_FP(DosTextSeg, (size_t)&(x)))
|
|
||||||
#define blk_dev DOSTEXT(blk_dev)
|
|
||||||
#endif
|
|
||||||
extern COUNT *error_tos, /* error stack */
|
extern COUNT *error_tos, /* error stack */
|
||||||
disk_api_tos, /* API handler stack - disk fns */
|
disk_api_tos, /* API handler stack - disk fns */
|
||||||
char_api_tos; /* API handler stack - char fns */
|
char_api_tos; /* API handler stack - char fns */
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
#undef DOSFAR
|
#undef DOSFAR
|
||||||
#undef DOSTEXTFAR
|
#undef DOSTEXTFAR
|
||||||
#define DOSDATA(x) (x)
|
|
||||||
#define DOSTEXT(x) (x)
|
|
||||||
|
|
||||||
/* Included by initialisation functions */
|
/* Included by initialisation functions */
|
||||||
|
|
||||||
@ -27,13 +25,8 @@ extern __segment DosTextSeg;
|
|||||||
|
|
||||||
#elif defined(__GNUC__)
|
#elif defined(__GNUC__)
|
||||||
|
|
||||||
#define DosTextSeg 0x70
|
|
||||||
#define DOSFAR FAR
|
#define DOSFAR FAR
|
||||||
#define DOSTEXTFAR FAR
|
#define DOSTEXTFAR FAR
|
||||||
#undef DOSDATA
|
|
||||||
#undef DOSTEXT
|
|
||||||
#define DOSDATA(x) (*(typeof(x) FAR *)MK_FP(DosDataSeg, (size_t)&(x)))
|
|
||||||
#define DOSTEXT(x) (*(typeof(x) FAR *)MK_FP(DosTextSeg, (size_t)&(x)))
|
|
||||||
|
|
||||||
#elif !defined(I86)
|
#elif !defined(I86)
|
||||||
|
|
||||||
|
@ -218,9 +218,6 @@ VOID ASMCFUNC FAR int2a_handler(void);
|
|||||||
VOID ASMCFUNC FAR int2f_handler(void);
|
VOID ASMCFUNC FAR int2f_handler(void);
|
||||||
VOID ASMCFUNC FAR cpm_entry(void);
|
VOID ASMCFUNC FAR cpm_entry(void);
|
||||||
|
|
||||||
#define cpm_entry DOSDATA(cpm_entry)
|
|
||||||
#define int29_handler DOSTEXT(int29_handler)
|
|
||||||
|
|
||||||
/* kernel.asm */
|
/* kernel.asm */
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
VOID ASMCFUNC init_call_p_0(struct config FAR *Config) FAR __attribute__((noreturn));
|
VOID ASMCFUNC init_call_p_0(struct config FAR *Config) FAR __attribute__((noreturn));
|
||||||
@ -240,7 +237,6 @@ int VA_CDECL init_sprintf(char * buff, CONST char * fmt, ...);
|
|||||||
|
|
||||||
/* procsupt.asm */
|
/* procsupt.asm */
|
||||||
VOID ASMCFUNC FAR got_cbreak(void);
|
VOID ASMCFUNC FAR got_cbreak(void);
|
||||||
#define got_cbreak DOSTEXT(got_cbreak)
|
|
||||||
|
|
||||||
/* initclk.c */
|
/* initclk.c */
|
||||||
extern void Init_clk_driver(void);
|
extern void Init_clk_driver(void);
|
||||||
@ -248,12 +244,7 @@ extern void Init_clk_driver(void);
|
|||||||
extern UWORD HMAFree; /* first byte in HMA not yet used */
|
extern UWORD HMAFree; /* first byte in HMA not yet used */
|
||||||
|
|
||||||
extern unsigned CurrentKernelSegment;
|
extern unsigned CurrentKernelSegment;
|
||||||
#ifdef __GNUC__
|
|
||||||
extern struct _KernelConfig ASM LowKernelConfig;
|
|
||||||
#define LowKernelConfig *(typeof(LowKernelConfig) FAR *)MK_FP(DOS_PSP, &LowKernelConfig)
|
|
||||||
#else
|
|
||||||
extern struct _KernelConfig FAR ASM LowKernelConfig;
|
extern struct _KernelConfig FAR ASM LowKernelConfig;
|
||||||
#endif
|
|
||||||
extern WORD days[2][13];
|
extern WORD days[2][13];
|
||||||
extern BYTE FAR *lpTop;
|
extern BYTE FAR *lpTop;
|
||||||
extern BYTE ASM _ib_start[], ASM _ib_end[], ASM _init_end[];
|
extern BYTE ASM _ib_start[], ASM _ib_end[], ASM _init_end[];
|
||||||
|
@ -312,14 +312,7 @@ void MoveKernel(unsigned NewKernelSegment)
|
|||||||
unsigned jmpseg = CurrentKernelSegment;
|
unsigned jmpseg = CurrentKernelSegment;
|
||||||
|
|
||||||
if (CurrentKernelSegment == 0)
|
if (CurrentKernelSegment == 0)
|
||||||
#ifdef __GNUC__
|
|
||||||
{
|
|
||||||
extern char TGROUP[] asm("TGROUP");
|
|
||||||
CurrentKernelSegment = (unsigned)TGROUP;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
CurrentKernelSegment = FP_SEG(_HMATextEnd);
|
CurrentKernelSegment = FP_SEG(_HMATextEnd);
|
||||||
#endif
|
|
||||||
|
|
||||||
if (CurrentKernelSegment == 0xffff)
|
if (CurrentKernelSegment == 0xffff)
|
||||||
return;
|
return;
|
||||||
|
@ -263,10 +263,10 @@ STATIC void setup_int_vectors(void)
|
|||||||
for (plvec = intvec_table; plvec < intvec_table + 5; plvec++)
|
for (plvec = intvec_table; plvec < intvec_table + 5; plvec++)
|
||||||
plvec->isv = getvec(plvec->intno);
|
plvec->isv = getvec(plvec->intno);
|
||||||
for (i = 0x23; i <= 0x3f; i++)
|
for (i = 0x23; i <= 0x3f; i++)
|
||||||
setvec(i, DOSDATA(empty_handler));
|
setvec(i, empty_handler);
|
||||||
HaltCpuWhileIdle = 0;
|
HaltCpuWhileIdle = 0;
|
||||||
for (pvec = vectors; pvec < vectors + (sizeof vectors/sizeof *pvec); pvec++)
|
for (pvec = vectors; pvec < vectors + (sizeof vectors/sizeof *pvec); pvec++)
|
||||||
setvec(pvec->intno, (intvec)MK_FP(FP_SEG(DOSDATA(empty_handler)), pvec->handleroff));
|
setvec(pvec->intno, (intvec)MK_FP(FP_SEG(empty_handler), pvec->handleroff));
|
||||||
pokeb(0, 0x30 * 4, 0xea);
|
pokeb(0, 0x30 * 4, 0xea);
|
||||||
pokel(0, 0x30 * 4 + 1, (ULONG)cpm_entry);
|
pokel(0, 0x30 * 4 + 1, (ULONG)cpm_entry);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user