Forráskód Böngészése

m_a_i_n --> _m_a_i_n

ceriel 33 éve
szülő
commit
b893ec7013

+ 2 - 2
doc/em/env.nr

@@ -8,7 +8,7 @@ The remaining way to interact, interrupts, will be treated
 together with traps in chapter 9.
 together with traps in chapter 9.
 .S2 "Program starting and stopping"
 .S2 "Program starting and stopping"
 EM user programs start with a call to a procedure called
 EM user programs start with a call to a procedure called
-m_a_i_n.
+_m_a_i_n.
 The assembler and backends look for the definition of a procedure
 The assembler and backends look for the definition of a procedure
 with this name in their input.
 with this name in their input.
 The call passes three parameters to the procedure.
 The call passes three parameters to the procedure.
@@ -45,7 +45,7 @@ The
 is terminated by a zero pointer.
 is terminated by a zero pointer.
 .P
 .P
 An EM user program stops if the program returns from the first
 An EM user program stops if the program returns from the first
-invocation of m_a_i_n.
+invocation of _m_a_i_n.
 The contents of the function return area are used to procure a
 The contents of the function return area are used to procure a
 wordsized program return code.
 wordsized program return code.
 EM programs also stop when traps and interrupts occur that are
 EM programs also stop when traps and interrupts occur that are

+ 1 - 1
doc/i80.doc

@@ -545,7 +545,7 @@ stackpointer are set to 0x1000 and 0x8000 respectively.
 .br
 .br
 Other systems require other values.
 Other systems require other values.
 .IP 2)
 .IP 2)
-In 'head_em': before calling "_m_a_i_n", the environment
+In 'head_em': before calling "__m_a_i_n", the environment
 pointer, argument vector and argument count will have to be pushed
 pointer, argument vector and argument count will have to be pushed
 onto the stack.
 onto the stack.
 Since this back-end is tested on a system without any knowledge
 Since this back-end is tested on a system without any knowledge

+ 1 - 1
doc/z80.doc

@@ -36,7 +36,7 @@ stackpointer are set to 0x1000 and 0x7ffe respectivally.
 The latter because it could run on a 32K machine as well.
 The latter because it could run on a 32K machine as well.
 Other systems require other values.
 Other systems require other values.
 .IP 2)
 .IP 2)
-In \fIhead_em\fP: before calling "_m_a_i_n", the environment
+In \fIhead_em\fP: before calling "__m_a_i_n", the environment
 pointer, argument vector and argument count will have to be pushed
 pointer, argument vector and argument count will have to be pushed
 onto the stack.
 onto the stack.
 Since this back-end is tested on a system without any knowledge
 Since this back-end is tested on a system without any knowledge

+ 2 - 2
emtest/select.c

@@ -182,8 +182,8 @@ combine() {
 	if (nhol)
 	if (nhol)
 		printf(" hol %d,0,0\n", nhol);
 		printf(" hol %d,0,0\n", nhol);
 	copy(name1);
 	copy(name1);
-	printf(" exp $m_a_i_n\n");
-	printf(" pro $m_a_i_n,%d\n", nlocals);
+	printf(" exp $_m_a_i_n\n");
+	printf(" pro $_m_a_i_n,%d\n", nlocals);
 	printf(" loc 123\n");
 	printf(" loc 123\n");
 	printf(" loc -98\n");
 	printf(" loc -98\n");
 	copy(name2);
 	copy(name2);

+ 2 - 4
lang/cem/libcc.ansi/head_ac.e

@@ -17,8 +17,6 @@
  *
  *
  */
  */
 
 
-/* Author: E.G. Keizer */
-
  mes 2,_EM_WSIZE,_EM_PSIZE
  mes 2,_EM_WSIZE,_EM_PSIZE
 
 
  exa environ
  exa environ
@@ -27,8 +25,8 @@
 _penvp
 _penvp
  bss _EM_PSIZE,0,0
  bss _EM_PSIZE,0,0
 
 
- exp $m_a_i_n
- pro $m_a_i_n,0
+ exp $_m_a_i_n
+ pro $_m_a_i_n,0
  loc 1336	; EIOVFL | EIUND | ECONV | EFOVFL | EFUNFL
  loc 1336	; EIOVFL | EIUND | ECONV | EFOVFL | EFUNFL
  sim            ; ignored
  sim            ; ignored
  lal _EM_WSIZE+_EM_PSIZE
  lal _EM_WSIZE+_EM_PSIZE

+ 2 - 2
lang/cem/libcc/gen/head_cc.e

@@ -28,8 +28,8 @@ environ
 _penvp
 _penvp
  bss EM_PSIZE,0,0
  bss EM_PSIZE,0,0
 
 
- exp $m_a_i_n
- pro $m_a_i_n,0
+ exp $_m_a_i_n
+ pro $_m_a_i_n,0
 #if EM_WSIZE==1
 #if EM_WSIZE==1
  ldc 1336	; EIOVFL | EIUND | ECONV | EFOVFL | EFUNFL
  ldc 1336	; EIOVFL | EIUND | ECONV | EFOVFL | EFUNFL
 #else
 #else

+ 2 - 2
lang/m2/libm2/head_m2.e

@@ -24,8 +24,8 @@
 bkillbss
 bkillbss
  bss EM_PSIZE,0,0
  bss EM_PSIZE,0,0
 
 
- exp $m_a_i_n
- pro $m_a_i_n, 0
+ exp $_m_a_i_n
+ pro $_m_a_i_n, 0
 
 
  lor 0
  lor 0
  lae MainLB
  lae MainLB

+ 2 - 2
lang/pc/comp/code.c

@@ -118,8 +118,8 @@ CodeBeginBlock(df)
 
 
 	if ( df->df_kind == D_MODULE) /* nothing */ ;
 	if ( df->df_kind == D_MODULE) /* nothing */ ;
 	else if (df->df_kind == D_PROGRAM ) {
 	else if (df->df_kind == D_PROGRAM ) {
-		C_exp("m_a_i_n");
-		C_pro_narg("m_a_i_n");
+		C_exp("_m_a_i_n");
+		C_pro_narg("_m_a_i_n");
 		C_ms_par((arith) 0);
 		C_ms_par((arith) 0);
 		offset = CodeGtoDescr(df->prc_vis->sc_scope);
 		offset = CodeGtoDescr(df->prc_vis->sc_scope);
 		CodeFil();
 		CodeFil();

+ 1 - 1
lang/pc/comp/stab.c

@@ -241,7 +241,7 @@ stb_string(df, kind)
 	addc_db_str(':');
 	addc_db_str(':');
 	if (kind == D_MODULE) {
 	if (kind == D_MODULE) {
 		adds_db_str(sprint(buf, "M%d;", df->prc_vis->sc_count));
 		adds_db_str(sprint(buf, "M%d;", df->prc_vis->sc_count));
-		C_ms_stb_pnam(db_str.base, N_FUN, proclevel, "m_a_i_n");
+		C_ms_stb_pnam(db_str.base, N_FUN, proclevel, "_m_a_i_n");
 		return;
 		return;
 	}
 	}
 	switch((int)kind) {
 	switch((int)kind) {

+ 1 - 1
lang/pc/libpc/ini.c

@@ -29,7 +29,7 @@ extern int      _gtty();
 
 
 struct file     **_extfl;
 struct file     **_extfl;
 int		_extflc;	/* number of external files */
 int		_extflc;	/* number of external files */
-char            *_m_lb;         /* LB of m_a_i_n */
+char            *_m_lb;         /* LB of _m_a_i_n */
 struct file     *_curfil;       /* points to file struct in case of errors */
 struct file     *_curfil;       /* points to file struct in case of errors */
 int             _pargc;
 int             _pargc;
 char            **_pargv;
 char            **_pargv;

+ 2 - 2
mach/6500/libem/head_em.s

@@ -99,7 +99,7 @@ UNSIGN : .space 1	! is it signed or unsigned arithmetic
 TRAPVAL: .space 1	! intermediate storage of the error number
 TRAPVAL: .space 1	! intermediate storage of the error number
 
 
 STACK: .space 1		! contains the hardware stackpointer on
 STACK: .space 1		! contains the hardware stackpointer on
-			! entering m_a_i_n for a neat return
+			! entering _m_a_i_n for a neat return
 
 
 RESERVED: .space 112    ! used by the operating system
 RESERVED: .space 112    ! used by the operating system
 
 
@@ -174,7 +174,7 @@ start:
 	lda #0
 	lda #0
 	ldx #1
 	ldx #1
 	jsr Push	! push argc 
 	jsr Push	! push argc 
-    	jsr _m_a_i_n	! start the real program
+    	jsr __m_a_i_n	! start the real program
 
 
 	lda #0x0FF
 	lda #0x0FF
 	jsr WRCH	! send end of program to R423
 	jsr WRCH	! send end of program to R423

+ 1 - 1
mach/arm/libem/head_em.s

@@ -140,7 +140,7 @@ next3:
  ADR R11, argc
  ADR R11, argc
  LDR R11,[R11]
  LDR R11,[R11]
  STMFD R12<,{R11}
  STMFD R12<,{R11}
- BAL.L _m_a_i_n
+ BAL.L __m_a_i_n
  MOV R11,#0
  MOV R11,#0
  STMFD R12<,{R11}
  STMFD R12<,{R11}
  MOV R11,#1
  MOV R11,#1

+ 2 - 3
mach/i386/libsys/head_em.s

@@ -1,9 +1,8 @@
 .sect .text; .sect .rom; .sect .data; .sect .bss
 .sect .text; .sect .rom; .sect .data; .sect .bss
 
 
-.define begtext,begdata,begbss,syscal
+.define begtext,begdata,begbss
 .define hol0,.reghp,.limhp,.trppc,.ignmask
 .define hol0,.reghp,.limhp,.trppc,.ignmask
 .define ERANGE,ESET,EHEAP,ECASE,EILLINS,EIDIVZ,EODDZ
 .define ERANGE,ESET,EHEAP,ECASE,EILLINS,EIDIVZ,EODDZ
-.extern _end
 
 
 ERANGE          = 1
 ERANGE          = 1
 ESET            = 2
 ESET            = 2
@@ -35,7 +34,7 @@ begtext:
 	push ax
 	push ax
 	push bx
 	push bx
 	push cx
 	push cx
-	call    _m_a_i_n
+	call    __m_a_i_n
 	push	ax
 	push	ax
 	call	__exit
 	call	__exit
 .sect	.data
 .sect	.data

+ 1 - 1
mach/i80/libmon/head_em.s

@@ -35,7 +35,7 @@
 	push h
 	push h
 	lxi h,0
 	lxi h,0
 	push h
 	push h
-	call _m_a_i_n
+	call __m_a_i_n
 .stop:	jmp 0xfb52
 .stop:	jmp 0xfb52
 	
 	
 .sect .bss
 .sect .bss

+ 1 - 1
mach/i86/libsys/head_em.s

@@ -26,7 +26,7 @@ begtext:
 	push bx
 	push bx
 	push cx
 	push cx
 	xor bp,bp
 	xor bp,bp
-	call    _m_a_i_n
+	call    __m_a_i_n
 	int 0x81     
 	int 0x81     
 .sect	.data
 .sect	.data
 begdata:
 begdata:

+ 1 - 1
mach/m68020/libsys/head_em.s

@@ -43,7 +43,7 @@ begtext:
 	move.l	a0,(8,sp)	! env
 	move.l	a0,(8,sp)	! env
 !	move.l	a0, environ	! indir is 0 if no env; not 0 if env
 !	move.l	a0, environ	! indir is 0 if no env; not 0 if env
 !	jsr	(initfpu)	! call to dummy floating point init routine
 !	jsr	(initfpu)	! call to dummy floating point init routine
-	jsr	(_m_a_i_n)
+	jsr	(__m_a_i_n)
 	move.l	d0,(sp)		! no stack cleanup needed
 	move.l	d0,(sp)		! no stack cleanup needed
 EXIT:
 EXIT:
 	jsr	(__exit)
 	jsr	(__exit)

+ 3 - 7
mach/m68k2/README

@@ -1,9 +1,6 @@
 The m68k2 back end is an EM code generator for the
 The m68k2 back end is an EM code generator for the
 Motorola MC68000. It defines an integer to be 16 bits
 Motorola MC68000. It defines an integer to be 16 bits
 and a pointer to be 32 bits.
 and a pointer to be 32 bits.
-At present it does not support floating point operations.
-(All EM floating point instructions are translated to the
-68000 "trap" instruction.)
 The m68k2 back end generates code for the ACK 68000 assembler.
 The m68k2 back end generates code for the ACK 68000 assembler.
 (The mnemonics recognized by this assembler can be found in
 (The mnemonics recognized by this assembler can be found in
 "as/mach3.c").
 "as/mach3.c").
@@ -32,17 +29,16 @@ on the kind of target 68000 system.
 	ACK a.out format to your a.out format (as defined in
 	ACK a.out format to your a.out format (as defined in
 	"/usr/include/a.out.h"). The program "cv/cv.c" does
 	"/usr/include/a.out.h"). The program "cv/cv.c" does
 	the job for UniSoft Unix. It probably need only be slightly
 	the job for UniSoft Unix. It probably need only be slightly
-	modified for your system. Note that the program
-	generates no text or bss segments, but only a data segment.
+	modified for your system.
 	If your target 68000 does not run Unix, but is e.g. a stand alone
 	If your target 68000 does not run Unix, but is e.g. a stand alone
 	68000, you will need a program to download the ACK a.out file.
 	68000, you will need a program to download the ACK a.out file.
 	The program "dl/dl.c" produces Intel Hex format on standard output
 	The program "dl/dl.c" produces Intel Hex format on standard output
 	from an a.out file.
 	from an a.out file.
    -	The EM runtime start-off ("libsys/head_em.s") may have to be modified.
    -	The EM runtime start-off ("libsys/head_em.s") may have to be modified.
-	It should call the procedure _m_a_i_n with parameters (argc,argv,envp).
+	It should call the procedure __m_a_i_n with parameters (argc,argv,envp).
 	Usually, Unix will put these on top of the stack before starting
 	Usually, Unix will put these on top of the stack before starting
 	the program. Note, however, that for 4-byte systems Unix will provide
 	the program. Note, however, that for 4-byte systems Unix will provide
-	a 4-byte argc, while _m_a_i_n expects a 2-byte argc; so the value
+	a 4-byte argc, while __m_a_i_n expects a 2-byte argc; so the value
 	must be shortened to 2 bytes.
 	must be shortened to 2 bytes.
 
 
 
 

+ 1 - 1
mach/m68k2/libsys/head_em.s

@@ -51,7 +51,7 @@ begtext:
 	! envp pointer.
 	! envp pointer.
 
 
 	add.l	#2,sp !convert argc from 4-byte to 2-byte
 	add.l	#2,sp !convert argc from 4-byte to 2-byte
-	jsr	_m_a_i_n
+	jsr	__m_a_i_n
 	add	#010,sp
 	add	#010,sp
 EXIT:
 EXIT:
 	move.w	d0,-(sp)
 	move.w	d0,-(sp)

+ 1 - 1
mach/m68k4/libsys/head_em.s

@@ -50,7 +50,7 @@ begtext:
 	! Now the stack contains an argc (4 bytes), argv-pointer and
 	! Now the stack contains an argc (4 bytes), argv-pointer and
 	! envp pointer.
 	! envp pointer.
 
 
-	jsr	_m_a_i_n
+	jsr	__m_a_i_n
 	add	#012,sp
 	add	#012,sp
 EXIT:
 EXIT:
 	move.l	d0,-(sp)
 	move.l	d0,-(sp)

+ 2 - 2
mach/mantra/int/mloop0

@@ -1,5 +1,5 @@
 	.define	filb
 	.define	filb
-	.define _m_a_i_n
+	.define __m_a_i_n
 	.define curproc
 	.define curproc
 	.define	pd
 	.define	pd
 	.define	nproc
 	.define	nproc
@@ -25,7 +25,7 @@
 !		START OF THE PROGRAM
 !		START OF THE PROGRAM
 !---------------------------------------------------------------------------
 !---------------------------------------------------------------------------
 
 
-_m_a_i_n:
+__m_a_i_n:
 #ifdef __BSD4_2
 #ifdef __BSD4_2
 		jsr	getmask
 		jsr	getmask
 #endif
 #endif

+ 1 - 1
mach/mantra/libsys/head_em.s

@@ -50,7 +50,7 @@ begtext:
 	! Now the stack contains an argc (4 bytes), argv-pointer and
 	! Now the stack contains an argc (4 bytes), argv-pointer and
 	! envp pointer.
 	! envp pointer.
 
 
-	jsr	_m_a_i_n
+	jsr	__m_a_i_n
 	add	#012,sp
 	add	#012,sp
 EXIT:
 EXIT:
 	move.l	d0,-(sp)
 	move.l	d0,-(sp)

+ 1 - 1
mach/minix/libsys/head_em.s

@@ -25,7 +25,7 @@ begtext:
 	push bx
 	push bx
 	push cx
 	push cx
 	xor bp,bp
 	xor bp,bp
-	call    _m_a_i_n
+	call    __m_a_i_n
 	add sp,6
 	add sp,6
 	call	__exit
 	call	__exit
 .sect	.data
 .sect	.data

+ 2 - 2
mach/minixST/libsys/head_em.s

@@ -37,11 +37,11 @@ begtext:
         move.l  a1,-(sp)        ! push environ
         move.l  a1,-(sp)        ! push environ
         move.l  a0,-(sp)        ! push argv
         move.l  a0,-(sp)        ! push argv
         move.w  d0,-(sp)        ! push argc
         move.w  d0,-(sp)        ! push argc
-	jsr	_m_a_i_n
+	jsr	__m_a_i_n
 	add	#010,sp
 	add	#010,sp
 EXIT:
 EXIT:
 	move.w	d0,-(sp)
 	move.w	d0,-(sp)
-	jsr	_exit
+	jsr	__exit
 L0:	bra	L0
 L0:	bra	L0
 
 
 	.sect .data
 	.sect .data

+ 1 - 1
mach/ns/libsys/head_em.s

@@ -27,7 +27,7 @@ ECASE	= 20
 	movd envp,tos
 	movd envp,tos
 	movd argv,tos
 	movd argv,tos
 	movd 1,tos
 	movd 1,tos
-	jsr @_m_a_i_n
+	jsr @__m_a_i_n
 .stop:
 .stop:
 	movb 0x7f,tos
 	movb 0x7f,tos
 	jsr @.putchar
 	jsr @.putchar

+ 1 - 1
mach/pdp/libem/head_em.s

@@ -44,7 +44,7 @@ ECASE   = 024
 	tst     -(r0)
 	tst     -(r0)
 1:
 1:
 	mov     r0,4(sp)
 	mov     r0,4(sp)
-	jsr     pc,_m_a_i_n
+	jsr     pc,__m_a_i_n
 ! next two lines for as long as tail needs printf
 ! next two lines for as long as tail needs printf
 !	mov     r0,-(sp)
 !	mov     r0,-(sp)
 !	jsr     pc,*$_exit
 !	jsr     pc,*$_exit

+ 2 - 10
mach/pmds/libsys/head_em.s

@@ -1,6 +1,5 @@
-.define	CERASE,CKILL,CSTOP,CSTART
 .define .lino,.filn
 .define .lino,.filn
-.define F_DUM,EXIT
+.define EXIT
 .define	begtext,begdata,begbss
 .define	begtext,begdata,begbss
 .define	EARRAY,ERANGE,ESET,EIDIVZ,EHEAP,EILLINS,ECASE
 .define	EARRAY,ERANGE,ESET,EIDIVZ,EHEAP,EILLINS,ECASE
 .define	hol0,.reghp,.limhp,.trpim,.trppc
 .define	hol0,.reghp,.limhp,.trpim,.trppc
@@ -14,13 +13,6 @@
 
 
 
 
 
 
-CERASE	= 010
-CKILL	= 030
-CSTART	= 021
-CSTOP	= 023
-F_DUM	= 0
-
-
 LINO_AD	= 0
 LINO_AD	= 0
 FILN_AD	= 4
 FILN_AD	= 4
 
 
@@ -35,7 +27,7 @@ ECASE	= 20
 	.sect .text
 	.sect .text
 begtext:
 begtext:
 	add.l	#2,sp !convert argc from 4-byte to 2-byte
 	add.l	#2,sp !convert argc from 4-byte to 2-byte
-	jsr	_m_a_i_n
+	jsr	__m_a_i_n
 	add	#010,sp
 	add	#010,sp
 EXIT:
 EXIT:
 	move.w	d0,-(sp)
 	move.w	d0,-(sp)

+ 1 - 1
mach/pmds4/libsys/head_em.s

@@ -34,7 +34,7 @@ ECASE	= 20
 
 
 	.sect .text
 	.sect .text
 begtext:
 begtext:
-	jsr	_m_a_i_n
+	jsr	__m_a_i_n
 	add	#012,sp
 	add	#012,sp
 EXIT:
 EXIT:
 
 

+ 2 - 2
mach/sun2/libsys/head_em.s

@@ -38,10 +38,10 @@ begtext:
 	pea	(a0)
 	pea	(a0)
 	move.l	d2,-(sp)
 	move.l	d2,-(sp)
 	move.l	#0,a6
 	move.l	#0,a6
-	jsr	_m_a_i_n
+	jsr	__m_a_i_n
 	move.l	d0,(sp)		! no stack cleanup needed
 	move.l	d0,(sp)		! no stack cleanup needed
 EXIT:
 EXIT:
-	jsr	_exit
+	jsr	__exit
 
 
 	.sect .data
 	.sect .data
 begdata:
 begdata:

+ 2 - 2
mach/sun3/libce/head_em.s

@@ -40,10 +40,10 @@ begtext:
 	move.l	d2,-(sp)
 	move.l	d2,-(sp)
 	move.l	#0,a6
 	move.l	#0,a6
 	jsr	(fsoft_used)
 	jsr	(fsoft_used)
-	jsr	(_m_a_i_n)
+	jsr	(__m_a_i_n)
 	move.l	d0,(sp)		! no stack cleanup needed
 	move.l	d0,(sp)		! no stack cleanup needed
 EXIT:
 EXIT:
-	jsr	(_exit)
+	jsr	(__exit)
 
 
 fsoft_used:
 fsoft_used:
 start_float:
 start_float:

+ 2 - 2
mach/sun3/libsys/head_em.s

@@ -38,10 +38,10 @@ begtext:
 	pea	(a0)
 	pea	(a0)
 	move.l	d2,-(sp)
 	move.l	d2,-(sp)
 	move.l	#0,a6
 	move.l	#0,a6
-	jsr	(_m_a_i_n)
+	jsr	(__m_a_i_n)
 	move.l	d0,(sp)		! no stack cleanup needed
 	move.l	d0,(sp)		! no stack cleanup needed
 EXIT:
 EXIT:
-	jsr	(_exit)
+	jsr	(__exit)
 
 
 	.sect .data
 	.sect .data
 begdata:
 begdata:

+ 1 - 1
mach/vax4/libbsd4_1a/head_em.s

@@ -28,7 +28,7 @@
 	pushl	r0
 	pushl	r0
 	pushl	r2
 	pushl	r2
 	pushl	r1
 	pushl	r1
-	calls	$3,_m_a_i_n
+	calls	$3,__m_a_i_n
 	movl	$Im2,ap
 	movl	$Im2,ap
 	movl	r0,6(ap)
 	movl	r0,6(ap)
 	chmk	(ap)+
 	chmk	(ap)+

+ 1 - 1
mach/vax4/libbsd4_2/head_em.s

@@ -28,7 +28,7 @@
 	pushl	r0
 	pushl	r0
 	pushl	r2
 	pushl	r2
 	pushl	r1
 	pushl	r1
-	calls	$3,_m_a_i_n
+	calls	$3,__m_a_i_n
 	movl	$Im2,ap
 	movl	$Im2,ap
 	movl	r0,6(ap)
 	movl	r0,6(ap)
 	chmk	(ap)+
 	chmk	(ap)+

+ 1 - 1
mach/vax4/libsysV_2/head_em.s

@@ -28,7 +28,7 @@
 	pushl	r0
 	pushl	r0
 	pushl	r2
 	pushl	r2
 	pushl	r1
 	pushl	r1
-	calls	$3,_m_a_i_n
+	calls	$3,__m_a_i_n
 	movl	$Im2,ap
 	movl	$Im2,ap
 	movl	r0,6(ap)
 	movl	r0,6(ap)
 	chmk	(ap)+
 	chmk	(ap)+

+ 4 - 4
mach/xenix3/libsys/head_em.s

@@ -3,7 +3,7 @@
 .define begtext,begdata,begbss,syscal
 .define begtext,begdata,begbss,syscal
 .define hol0,.reghp,.limhp,.trppc,.ignmask
 .define hol0,.reghp,.limhp,.trppc,.ignmask
 .define ERANGE,ESET,EHEAP,ECASE,EILLINS,EIDIVZ,EODDZ
 .define ERANGE,ESET,EHEAP,ECASE,EILLINS,EIDIVZ,EODDZ
-.extern _end
+.extern endbss
 
 
 ERANGE          = 1
 ERANGE          = 1
 ESET            = 2
 ESET            = 2
@@ -42,7 +42,7 @@ begtext:
 	push bx
 	push bx
 	push cx
 	push cx
 	xor bp,bp
 	xor bp,bp
-	mov bx,_end
+	mov bx,endbss
 	mov cx,9
 	mov cx,9
 	add bx,1024
 	add bx,1024
 	shr bx,cl
 	shr bx,cl
@@ -50,11 +50,11 @@ begtext:
 	call grow
 	call grow
 	xor	cx,cx
 	xor	cx,cx
 	push	cx
 	push	cx
-	call	_sbrk
+	call	__sbrk
 	mov	(.limhp),ax
 	mov	(.limhp),ax
 	mov	(.reghp),ax	! on Xenix, heap begins above stack!
 	mov	(.reghp),ax	! on Xenix, heap begins above stack!
 	pop	ax
 	pop	ax
-	call    _m_a_i_n
+	call    __m_a_i_n
 	push	ax
 	push	ax
 	call	__exit
 	call	__exit
 .sect	.data
 .sect	.data

+ 1 - 1
mach/z80/libmon/head_em.s

@@ -44,7 +44,7 @@
 	push bc
 	push bc
 	ld bc,1
 	ld bc,1
 	push bc
 	push bc
-	call _m_a_i_n
+	call __m_a_i_n
 
 
 	jp 0x20
 	jp 0x20
 
 

+ 1 - 1
mach/z80/libsys/head_em.s

@@ -44,7 +44,7 @@
 	push bc
 	push bc
 	ld bc,1
 	ld bc,1
 	push bc
 	push bc
-	call _m_a_i_n
+	call __m_a_i_n
 
 
 	jp 0x20
 	jp 0x20
 
 

+ 1 - 1
mach/z8000/libem/head_em.s

@@ -39,7 +39,7 @@ EBADMON = 25
 	push	*RR14, envp
 	push	*RR14, envp
 	push	*RR14, argv
 	push	*RR14, argv
 	push	*RR14, $1
 	push	*RR14, $1
-	calr	_m_a_i_n
+	calr	__m_a_i_n
 	ldl	RR14, $0xC00017FC
 	ldl	RR14, $0xC00017FC
 	sc	$0
 	sc	$0
 
 

+ 1 - 1
util/ass/ass00.h

@@ -219,7 +219,7 @@ struct  rel {                   /* for relocation tables */
 #define DATA_BYTES      9
 #define DATA_BYTES      9
 
 
 /* name of procedure to be called first */
 /* name of procedure to be called first */
-#define MAIN            "m_a_i_n"
+#define MAIN            "_m_a_i_n"
 
 
 /* headers of datablocks written */
 /* headers of datablocks written */
 #define HEADREP         0
 #define HEADREP         0