add a compatible sync command
This commit is contained in:
parent
c36e308775
commit
41a18aef39
|
|
@ -1,5 +1,9 @@
|
||||||
|
CAS= cas
|
||||||
|
CC= cc
|
||||||
|
LD= ld
|
||||||
|
|
||||||
FILES= getud putud
|
FILES= getud putud
|
||||||
STRIPFILES= copydisk dump dumpdir format restor tar verify
|
STRIPFILES= copydisk dump dumpdir format restor sync tar verify
|
||||||
|
|
||||||
all: $(FILES) $(STRIPFILES) strip
|
all: $(FILES) $(STRIPFILES) strip
|
||||||
|
|
||||||
|
|
@ -8,3 +12,9 @@ strip:
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(FILES) $(STRIPFILES)
|
rm -f $(FILES) $(STRIPFILES)
|
||||||
|
|
||||||
|
compat1crt.o: compat1crt.s
|
||||||
|
$(CAS) -u -o $@ $*.s
|
||||||
|
|
||||||
|
sync: compat1crt.o sync.o
|
||||||
|
$(LD) -o $@ -e start compat1crt.o sync.o -lc
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
.comm 2, _environ;
|
||||||
|
|
||||||
|
.code
|
||||||
|
start::
|
||||||
|
{
|
||||||
|
jr foo
|
||||||
|
.byte "......1981 87wega3.2."
|
||||||
|
.byte %00
|
||||||
|
foo:
|
||||||
|
ld r7,@r15
|
||||||
|
lda r6,%0000+2(r15)
|
||||||
|
ld r2,@r6
|
||||||
|
clr %0000-2(r2)
|
||||||
|
ld r5,r6
|
||||||
|
subl rr0,rr0
|
||||||
|
cpir r0,@r5,r1,eq
|
||||||
|
cp r5,r2
|
||||||
|
jr ult,_foo
|
||||||
|
dec r5,#2
|
||||||
|
_foo:
|
||||||
|
ld _environ,r5
|
||||||
|
call _main
|
||||||
|
ld r7,r2
|
||||||
|
call __callex
|
||||||
|
sc #1
|
||||||
|
}
|
||||||
|
.data
|
||||||
|
. = .+2
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
char whatstr[] = "@[$]sync.c 1.2 07/24/82 03:16:45 - 87wega3.2";
|
||||||
|
|
||||||
|
main()
|
||||||
|
{
|
||||||
|
sync();
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue