m_a_i_n --> _m_a_i_n
This commit is contained in:
@@ -99,7 +99,7 @@ UNSIGN : .space 1 ! is it signed or unsigned arithmetic
|
||||
TRAPVAL: .space 1 ! intermediate storage of the error number
|
||||
|
||||
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
|
||||
|
||||
@@ -174,7 +174,7 @@ start:
|
||||
lda #0
|
||||
ldx #1
|
||||
jsr Push ! push argc
|
||||
jsr _m_a_i_n ! start the real program
|
||||
jsr __m_a_i_n ! start the real program
|
||||
|
||||
lda #0x0FF
|
||||
jsr WRCH ! send end of program to R423
|
||||
|
||||
@@ -140,7 +140,7 @@ next3:
|
||||
ADR R11, argc
|
||||
LDR R11,[R11]
|
||||
STMFD R12<,{R11}
|
||||
BAL.L _m_a_i_n
|
||||
BAL.L __m_a_i_n
|
||||
MOV R11,#0
|
||||
STMFD R12<,{R11}
|
||||
MOV R11,#1
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
.sect .text; .sect .rom; .sect .data; .sect .bss
|
||||
|
||||
.define begtext,begdata,begbss,syscal
|
||||
.define begtext,begdata,begbss
|
||||
.define hol0,.reghp,.limhp,.trppc,.ignmask
|
||||
.define ERANGE,ESET,EHEAP,ECASE,EILLINS,EIDIVZ,EODDZ
|
||||
.extern _end
|
||||
|
||||
ERANGE = 1
|
||||
ESET = 2
|
||||
@@ -35,7 +34,7 @@ begtext:
|
||||
push ax
|
||||
push bx
|
||||
push cx
|
||||
call _m_a_i_n
|
||||
call __m_a_i_n
|
||||
push ax
|
||||
call __exit
|
||||
.sect .data
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
push h
|
||||
lxi h,0
|
||||
push h
|
||||
call _m_a_i_n
|
||||
call __m_a_i_n
|
||||
.stop: jmp 0xfb52
|
||||
|
||||
.sect .bss
|
||||
|
||||
@@ -26,7 +26,7 @@ begtext:
|
||||
push bx
|
||||
push cx
|
||||
xor bp,bp
|
||||
call _m_a_i_n
|
||||
call __m_a_i_n
|
||||
int 0x81
|
||||
.sect .data
|
||||
begdata:
|
||||
|
||||
@@ -43,7 +43,7 @@ begtext:
|
||||
move.l a0,(8,sp) ! 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 (_m_a_i_n)
|
||||
jsr (__m_a_i_n)
|
||||
move.l d0,(sp) ! no stack cleanup needed
|
||||
EXIT:
|
||||
jsr (__exit)
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
The m68k2 back end is an EM code generator for the
|
||||
Motorola MC68000. It defines an integer to be 16 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 mnemonics recognized by this assembler can be found in
|
||||
"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
|
||||
"/usr/include/a.out.h"). The program "cv/cv.c" does
|
||||
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
|
||||
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
|
||||
from an a.out file.
|
||||
- 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
|
||||
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.
|
||||
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ begtext:
|
||||
! envp pointer.
|
||||
|
||||
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
|
||||
EXIT:
|
||||
move.w d0,-(sp)
|
||||
|
||||
@@ -50,7 +50,7 @@ begtext:
|
||||
! Now the stack contains an argc (4 bytes), argv-pointer and
|
||||
! envp pointer.
|
||||
|
||||
jsr _m_a_i_n
|
||||
jsr __m_a_i_n
|
||||
add #012,sp
|
||||
EXIT:
|
||||
move.l d0,-(sp)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.define filb
|
||||
.define _m_a_i_n
|
||||
.define __m_a_i_n
|
||||
.define curproc
|
||||
.define pd
|
||||
.define nproc
|
||||
@@ -25,7 +25,7 @@
|
||||
! START OF THE PROGRAM
|
||||
!---------------------------------------------------------------------------
|
||||
|
||||
_m_a_i_n:
|
||||
__m_a_i_n:
|
||||
#ifdef __BSD4_2
|
||||
jsr getmask
|
||||
#endif
|
||||
|
||||
@@ -50,7 +50,7 @@ begtext:
|
||||
! Now the stack contains an argc (4 bytes), argv-pointer and
|
||||
! envp pointer.
|
||||
|
||||
jsr _m_a_i_n
|
||||
jsr __m_a_i_n
|
||||
add #012,sp
|
||||
EXIT:
|
||||
move.l d0,-(sp)
|
||||
|
||||
@@ -25,7 +25,7 @@ begtext:
|
||||
push bx
|
||||
push cx
|
||||
xor bp,bp
|
||||
call _m_a_i_n
|
||||
call __m_a_i_n
|
||||
add sp,6
|
||||
call __exit
|
||||
.sect .data
|
||||
|
||||
@@ -37,11 +37,11 @@ begtext:
|
||||
move.l a1,-(sp) ! push environ
|
||||
move.l a0,-(sp) ! push argv
|
||||
move.w d0,-(sp) ! push argc
|
||||
jsr _m_a_i_n
|
||||
jsr __m_a_i_n
|
||||
add #010,sp
|
||||
EXIT:
|
||||
move.w d0,-(sp)
|
||||
jsr _exit
|
||||
jsr __exit
|
||||
L0: bra L0
|
||||
|
||||
.sect .data
|
||||
|
||||
@@ -27,7 +27,7 @@ ECASE = 20
|
||||
movd envp,tos
|
||||
movd argv,tos
|
||||
movd 1,tos
|
||||
jsr @_m_a_i_n
|
||||
jsr @__m_a_i_n
|
||||
.stop:
|
||||
movb 0x7f,tos
|
||||
jsr @.putchar
|
||||
|
||||
@@ -44,7 +44,7 @@ ECASE = 024
|
||||
tst -(r0)
|
||||
1:
|
||||
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
|
||||
! mov r0,-(sp)
|
||||
! jsr pc,*$_exit
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
.define CERASE,CKILL,CSTOP,CSTART
|
||||
.define .lino,.filn
|
||||
.define F_DUM,EXIT
|
||||
.define EXIT
|
||||
.define begtext,begdata,begbss
|
||||
.define EARRAY,ERANGE,ESET,EIDIVZ,EHEAP,EILLINS,ECASE
|
||||
.define hol0,.reghp,.limhp,.trpim,.trppc
|
||||
@@ -14,13 +13,6 @@
|
||||
|
||||
|
||||
|
||||
CERASE = 010
|
||||
CKILL = 030
|
||||
CSTART = 021
|
||||
CSTOP = 023
|
||||
F_DUM = 0
|
||||
|
||||
|
||||
LINO_AD = 0
|
||||
FILN_AD = 4
|
||||
|
||||
@@ -35,7 +27,7 @@ ECASE = 20
|
||||
.sect .text
|
||||
begtext:
|
||||
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
|
||||
EXIT:
|
||||
move.w d0,-(sp)
|
||||
|
||||
@@ -34,7 +34,7 @@ ECASE = 20
|
||||
|
||||
.sect .text
|
||||
begtext:
|
||||
jsr _m_a_i_n
|
||||
jsr __m_a_i_n
|
||||
add #012,sp
|
||||
EXIT:
|
||||
|
||||
|
||||
@@ -38,10 +38,10 @@ begtext:
|
||||
pea (a0)
|
||||
move.l d2,-(sp)
|
||||
move.l #0,a6
|
||||
jsr _m_a_i_n
|
||||
jsr __m_a_i_n
|
||||
move.l d0,(sp) ! no stack cleanup needed
|
||||
EXIT:
|
||||
jsr _exit
|
||||
jsr __exit
|
||||
|
||||
.sect .data
|
||||
begdata:
|
||||
|
||||
@@ -40,10 +40,10 @@ begtext:
|
||||
move.l d2,-(sp)
|
||||
move.l #0,a6
|
||||
jsr (fsoft_used)
|
||||
jsr (_m_a_i_n)
|
||||
jsr (__m_a_i_n)
|
||||
move.l d0,(sp) ! no stack cleanup needed
|
||||
EXIT:
|
||||
jsr (_exit)
|
||||
jsr (__exit)
|
||||
|
||||
fsoft_used:
|
||||
start_float:
|
||||
|
||||
@@ -38,10 +38,10 @@ begtext:
|
||||
pea (a0)
|
||||
move.l d2,-(sp)
|
||||
move.l #0,a6
|
||||
jsr (_m_a_i_n)
|
||||
jsr (__m_a_i_n)
|
||||
move.l d0,(sp) ! no stack cleanup needed
|
||||
EXIT:
|
||||
jsr (_exit)
|
||||
jsr (__exit)
|
||||
|
||||
.sect .data
|
||||
begdata:
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
pushl r0
|
||||
pushl r2
|
||||
pushl r1
|
||||
calls $3,_m_a_i_n
|
||||
calls $3,__m_a_i_n
|
||||
movl $Im2,ap
|
||||
movl r0,6(ap)
|
||||
chmk (ap)+
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
pushl r0
|
||||
pushl r2
|
||||
pushl r1
|
||||
calls $3,_m_a_i_n
|
||||
calls $3,__m_a_i_n
|
||||
movl $Im2,ap
|
||||
movl r0,6(ap)
|
||||
chmk (ap)+
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
pushl r0
|
||||
pushl r2
|
||||
pushl r1
|
||||
calls $3,_m_a_i_n
|
||||
calls $3,__m_a_i_n
|
||||
movl $Im2,ap
|
||||
movl r0,6(ap)
|
||||
chmk (ap)+
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
.define begtext,begdata,begbss,syscal
|
||||
.define hol0,.reghp,.limhp,.trppc,.ignmask
|
||||
.define ERANGE,ESET,EHEAP,ECASE,EILLINS,EIDIVZ,EODDZ
|
||||
.extern _end
|
||||
.extern endbss
|
||||
|
||||
ERANGE = 1
|
||||
ESET = 2
|
||||
@@ -42,7 +42,7 @@ begtext:
|
||||
push bx
|
||||
push cx
|
||||
xor bp,bp
|
||||
mov bx,_end
|
||||
mov bx,endbss
|
||||
mov cx,9
|
||||
add bx,1024
|
||||
shr bx,cl
|
||||
@@ -50,11 +50,11 @@ begtext:
|
||||
call grow
|
||||
xor cx,cx
|
||||
push cx
|
||||
call _sbrk
|
||||
call __sbrk
|
||||
mov (.limhp),ax
|
||||
mov (.reghp),ax ! on Xenix, heap begins above stack!
|
||||
pop ax
|
||||
call _m_a_i_n
|
||||
call __m_a_i_n
|
||||
push ax
|
||||
call __exit
|
||||
.sect .data
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
push bc
|
||||
ld bc,1
|
||||
push bc
|
||||
call _m_a_i_n
|
||||
call __m_a_i_n
|
||||
|
||||
jp 0x20
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
push bc
|
||||
ld bc,1
|
||||
push bc
|
||||
call _m_a_i_n
|
||||
call __m_a_i_n
|
||||
|
||||
jp 0x20
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ EBADMON = 25
|
||||
push *RR14, envp
|
||||
push *RR14, argv
|
||||
push *RR14, $1
|
||||
calr _m_a_i_n
|
||||
calr __m_a_i_n
|
||||
ldl RR14, $0xC00017FC
|
||||
sc $0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user