more work

This commit is contained in:
Oliver Lehmann 2009-08-26 19:35:56 +00:00
parent dc7ad831ec
commit 36bff75b15
9 changed files with 89 additions and 4 deletions

View File

@ -5,14 +5,12 @@ atof.o atof.s ASM
atoi.o atoi.c C
atol.o atol.c C
bsearch.o bsearch.c C
cerror.o cerror.s ASM
clrerr.o clrerr.c C
cnvt.o cnvt.c C
crypt.o crypt.c C
ctermid.o ctermid.c C
ctime.o ctime.c C
ctype_.o ctype_.c C
cuexit.o cuexit.s ASM
cuserid.o cuserid.c C
data.o data.c C
decimal.o decimal.s ASM
@ -22,7 +20,6 @@ ecvt.o ecvt.s ASM
endopen.o endopen.c C
errlst.o errlst.c C
execvp.o execvp.c C
fakcu.o fakcu.s ASM
fdopen.o fdopen.c C
ffltioc.o ffltioc.c C
fgetc.o fgetc.c C
@ -59,7 +56,6 @@ l64a.o l64a.c C
length.o length.c C
lsearch.o lsearch.c C
malloc.o malloc.c C
mcount.o mcount.s ASM
mktemp.o mktemp.c C
mon.o mon.c C
mpx.o mpx.c C

View File

@ -66,3 +66,7 @@ lock.o lock.s ASM
mdmctl.o mdmctl.s ASM
sptrace.o sptrace.s ASM
unlk.o unlk.s ASM
cerror.o cerror.s ASM
cuexit.o cuexit.s ASM
fakcu.o fakcu.s ASM
mcount.o mcount.s ASM

View File

@ -0,0 +1,8 @@
AS= as
ASFLAGS=
OBJ= cerror.o mcount.o
all: $(OBJ)
clean:
rm -f $(OBJ)

View File

@ -0,0 +1,15 @@
cerror module
global
_errno
WORD
_deverr
WORD
cerror procedure
entry
ld _errno,r2
ld _deverr,r5
ldl rr2,#%ffffffff
ret
end cerror
end cerror

View File

@ -0,0 +1,30 @@
mcount_s module
external
countbase
WORD
global
mcount procedure
entry
ld r1,%0002(r15)
ld r0,@r1
test r0
jr nz,havestruct
ld r1,countbase
test r1
ret z
inc countbase,#6
ld r0,@r15
ld @r1,r0
lda r0,%0002(r1)
ld r1,%0002(r15)
ld @r1,r0
havestruct:
ld r1,r0
inc %0002(r1),#1
ret nz
inc @r1,#1
ret
end mcount
end mcount_s

View File

@ -4,6 +4,8 @@
! @[$] crt0.s Rev : 3.2 09/12/83 00:05:03 !
! @[$] crt0.s Rev : 3.2 09/12/83 00:05:03 !
crt0 module
internal

View File

@ -0,0 +1,8 @@
AS= as
ASFLAGS=
OBJ= abort.s cuexit.s stty.c tell.c
all: $(OBJ)
clean:
rm -f $(OBJ)

View File

@ -0,0 +1,14 @@
exit_s module
external
__cleanup procedure
global
_exit procedure
entry
ld r8,r7
call __cleanup
ld r0,r8
sc #1
end _exit
end exit_s

View File

@ -0,0 +1,8 @@
cleanup__s module
global
__cleanup procedure
entry
ret
end __cleanup
end cleanup__s