Browse Source

Updated for the 6.0pre2 release.

dtrg 17 years ago
parent
commit
e02179a9fe

+ 6 - 24
.distr

@@ -1,4 +1,5 @@
 README
 README
+CHANGES
 Copyright
 Copyright
 pm
 pm
 pmfile
 pmfile
@@ -29,7 +30,7 @@ util/cmisc
 util/ack
 util/ack
 lib/descr/fe
 lib/descr/fe
 util/arch
 util/arch
-util/cpp
+#util/cpp
 util/cgg
 util/cgg
 util/ncgg
 util/ncgg
 util/misc
 util/misc
@@ -41,33 +42,14 @@ util/led
 lang/cem
 lang/cem
 lang/pc
 lang/pc
 lang/m2
 lang/m2
-lang/occam
-lang/basic
+#lang/occam
+#lang/basic
 
 
 mach/proto
 mach/proto
 mach/i86
 mach/i86
+mach/i386
 
 
 plat/pc86
 plat/pc86
+plat/linux386
 
 
 examples
 examples
-
-#Action
-#NEW
-#README
-#TODO
-#TakeAction
-#bin
-#doc
-#emtest
-#etc
-#fast
-#fcc
-#first
-#h
-#include
-#modules
-#lang
-#lib
-#mach
-#man
-#util

+ 21 - 0
CHANGES

@@ -0,0 +1,21 @@
+# $Source$
+# $State$
+# $Revision$
+
+6.0pre2
+
+  Much simplified the syscall interface by disabling libmon and instead
+  calling the syscalls directly. Disabled the K&R C compiler and libc because
+  it doesn't actually gain us anything and has a high maintenance load --- the
+  ANSI C compiler works fine with K&R C. Adapted the rest of the system to
+  build with the ANSI C compiler. Rewrote the pc86 syscall interface and added
+  linux386 support, using the i386 code generator. Lots and lots of bugfixes
+  and tweaks everywhere.
+  
+6.0pre1
+
+  First working version of the 6.0 release stream. Working frontends: both C
+  compilers, Pascal, Modula-2, Basic and Occam. Working backends: i86. Working
+  platforms: pc86, the very noddy testbed setup that produces floppy disk
+  images.
+  

+ 12 - 13
README

@@ -2,11 +2,11 @@
 # $State$
 # $State$
 # $Revision$
 # $Revision$
 
 
-                     THE AMSTERDAM COMPILER KIT V6.0pre1
+                     THE AMSTERDAM COMPILER KIT V6.0pre2
                      ===================================
                      ===================================
 
 
                   © 1987-2005 Vrije Universiteit, Amsterdam
                   © 1987-2005 Vrije Universiteit, Amsterdam
-                                2007-02-25
+                                2007-04-24
 
 
 
 
 INTRODUCTION
 INTRODUCTION
@@ -28,11 +28,12 @@ SUPPORT
 
 
 Languages:
 Languages:
 
 
-ANSI C, K&R C, Pascal, Modula 2, Occam 1, and a Basic variant.
+ANSI C, Pascal, Modula 2. K&R is supported via the ANSI C compiler.
 
 
 Platforms:
 Platforms:
 
 
 pc86          produces bootable floppy disk images for 8086 PCs
 pc86          produces bootable floppy disk images for 8086 PCs
+linux386      produces ELF executables for PC Linux systems
 
 
 
 
 INSTALLATION
 INSTALLATION
@@ -114,6 +115,9 @@ For further information, see the man page (which actually does get
 installed, but is rather out of date).
 installed, but is rather out of date).
 
 
 There are some (known working) example programs in the 'examples' directory.
 There are some (known working) example programs in the 'examples' directory.
+A sample command line is:
+
+ack -mlinux386 -O examples/paranoia.c
 
 
 
 
 GOTCHAS
 GOTCHAS
@@ -121,16 +125,11 @@ GOTCHAS
 
 
 There are some things you should be aware of.
 There are some things you should be aware of.
 
 
-- The only platform supported so far is pc86, which generates 8086 tiny mode
-  executables that will work as floppy disk boot images. So, to run, simply dd
-  the output file (pc86.img by default) onto a floppy disk and boot from it.
-  Be aware that very little functionality is supported and that the entire
-  program, heap and stack and code and all, must fit within 64kB. See
-  plat/pc86/README for more information.
+- Look at plat/linux386/README and plat/pc86/README for information about the
+  two supported platforms.
   
   
-- By default, the ack tool will compile K&R C. Practically all C source these
-  days is ANSI C --- use the -ansi switch to enable ANSI mode. No, the ACK is
-  not C99 compatible.
+- The library support is fairly limited; for C, it's at roughly the ANSI C
+  level, and for the other languages it's similar.
   
   
 - When compiling languages other than C, the ACK will usually look at the
 - When compiling languages other than C, the ACK will usually look at the
   first character of the file. If it's a #, then the file will be run through
   first character of the file. If it's a #, then the file will be run through
@@ -167,4 +166,4 @@ Please enjoy.
 
 
 David Given (dtrg on Sourceforge)
 David Given (dtrg on Sourceforge)
 dg@cowlark.com
 dg@cowlark.com
-2007-02-25
+2007-04-24

+ 2 - 0
examples/.distr

@@ -4,4 +4,6 @@ hilo.mod
 hilo.ocm
 hilo.ocm
 hilo.p
 hilo.p
 paranoia.c
 paranoia.c
+startrek.c
+startrek.doc
 README
 README

+ 2 - 2
lang/cem/.distr

@@ -2,5 +2,5 @@ pmfile
 cemcom.ansi
 cemcom.ansi
 cpp.ansi
 cpp.ansi
 libcc.ansi
 libcc.ansi
-cemcom
-libcc
+#cemcom
+#libcc

+ 8 - 7
lang/cem/libcc.ansi/headers/.distr

@@ -1,13 +1,11 @@
+sys/time.h
+sys/ioctl.h
 assert.h
 assert.h
 ctype.h
 ctype.h
-dirent.h
 errno.h
 errno.h
 float.h
 float.h
-grp.h
 limits.h
 limits.h
-locale.h
 math.h
 math.h
-mathconst.h
 setjmp.h
 setjmp.h
 signal.h
 signal.h
 stdarg.h
 stdarg.h
@@ -16,6 +14,9 @@ stdio.h
 stdlib.h
 stdlib.h
 string.h
 string.h
 time.h
 time.h
-varargs.h
-sys/dirent.h
-sys/errno.h
+iso646.h
+stdbool.h
+fcntl.h
+tgmath.h
+locale.h
+stdint.h

+ 0 - 21
lang/cem/libcc.ansi/misc/.distr

@@ -1,22 +1 @@
-closedir.c
-fdopen.c
-getdents.c
-getgrent.c
-getopt.c
-getpass.c
-getpw.c
-getw.c
-isatty.c
-opendir.c
-popen.c
-putenv.c
 environ.c
 environ.c
-putw.c
-readdir.c
-rewinddir.c
-seekdir.c
-sleep.c
-telldir.c
-termcap.c
-mktemp.c
-hypot.c

+ 19 - 19
lang/cem/libcc.ansi/pmfile

@@ -269,26 +269,26 @@ local libc = acklibrary {
 
 
 local headers = group {
 local headers = group {
 	install = {
 	install = {
-		pm.install(d.."headers/sys/time.h", "%BINDIR%include/ansi/sys/time.h"),
+		pm.install(d.."headers/sys/time.h",  "%BINDIR%include/ansi/sys/time.h"),
 		pm.install(d.."headers/sys/ioctl.h", "%BINDIR%include/ansi/sys/ioctl.h"),
 		pm.install(d.."headers/sys/ioctl.h", "%BINDIR%include/ansi/sys/ioctl.h"),
-		pm.install(d.."headers/assert.h", "%BINDIR%include/ansi/assert.h"),
-		pm.install(d.."headers/ctype.h", "%BINDIR%include/ansi/ctype.h"),
---		pm.install(d.."headers/dirent.h", "%BINDIR%include/ansi/dirent.h"),
-		pm.install(d.."headers/errno.h", "%BINDIR%include/ansi/errno.h"),
-		pm.install(d.."headers/float.h", "%BINDIR%include/ansi/float.h"),
---		pm.install(d.."headers/grp.h", "%BINDIR%include/ansi/grp.h"),
-		pm.install(d.."headers/limits.h", "%BINDIR%include/ansi/limits.h"),
---		pm.install(d.."headers/locale.h", "%BINDIR%include/ansi/locale.h"),
-		pm.install(d.."headers/math.h", "%BINDIR%include/ansi/math.h"),
---		pm.install(d.."headers/mathconst.h", "%BINDIR%include/ansi/mathconst.h"),
-		pm.install(d.."headers/setjmp.h", "%BINDIR%include/ansi/setjmp.h"),
-		pm.install(d.."headers/signal.h", "%BINDIR%include/ansi/signal.h"),
-		pm.install(d.."headers/stdarg.h", "%BINDIR%include/ansi/stdarg.h"),
-		pm.install(d.."headers/stddef.h", "%BINDIR%include/ansi/stddef.h"),
-		pm.install(d.."headers/stdio.h", "%BINDIR%include/ansi/stdio.h"),
-		pm.install(d.."headers/stdlib.h", "%BINDIR%include/ansi/stdlib.h"),
-		pm.install(d.."headers/string.h", "%BINDIR%include/ansi/string.h"),
-		pm.install(d.."headers/time.h", "%BINDIR%include/ansi/time.h"),
+		pm.install(d.."headers/assert.h",    "%BINDIR%include/ansi/assert.h"),
+		pm.install(d.."headers/ctype.h",     "%BINDIR%include/ansi/ctype.h"),
+		pm.install(d.."headers/errno.h",     "%BINDIR%include/ansi/errno.h"),
+		pm.install(d.."headers/float.h",     "%BINDIR%include/ansi/float.h"),
+		pm.install(d.."headers/limits.h",    "%BINDIR%include/ansi/limits.h"),
+		pm.install(d.."headers/math.h",      "%BINDIR%include/ansi/math.h"),
+		pm.install(d.."headers/setjmp.h",    "%BINDIR%include/ansi/setjmp.h"),
+		pm.install(d.."headers/signal.h",    "%BINDIR%include/ansi/signal.h"),
+		pm.install(d.."headers/stdarg.h",    "%BINDIR%include/ansi/stdarg.h"),
+		pm.install(d.."headers/stddef.h",    "%BINDIR%include/ansi/stddef.h"),
+		pm.install(d.."headers/stdio.h",     "%BINDIR%include/ansi/stdio.h"),
+		pm.install(d.."headers/stdlib.h",    "%BINDIR%include/ansi/stdlib.h"),
+		pm.install(d.."headers/string.h",    "%BINDIR%include/ansi/string.h"),
+		pm.install(d.."headers/time.h",      "%BINDIR%include/ansi/time.h"),
+		pm.install(d.."headers/iso646.h",    "%BINDIR%include/ansi/iso646.h"),
+		pm.install(d.."headers/stdbool.h",   "%BINDIR%include/ansi/stdbool.h"),
+		pm.install(d.."headers/locale.h",    "%BINDIR%include/ansi/locale.h"),
+		pm.install(d.."headers/tgmath.h",    "%BINDIR%include/ansi/tgmath.h"),
 	}
 	}
 }
 }
 
 

+ 0 - 1
lang/cem/libcc.ansi/setjmp/.distr

@@ -1,2 +1 @@
 setjmp.e
 setjmp.e
-sigmisc.c

+ 0 - 3
lang/cem/libcc.ansi/stdio/.distr

@@ -29,15 +29,12 @@ getc.c
 getchar.c
 getchar.c
 gets.c
 gets.c
 icompute.c
 icompute.c
-isatty.c
 loc_incl.h
 loc_incl.h
 perror.c
 perror.c
 printf.c
 printf.c
 putc.c
 putc.c
 putchar.c
 putchar.c
 puts.c
 puts.c
-remove.c
-rename.c
 rewind.c
 rewind.c
 scanf.c
 scanf.c
 setbuf.c
 setbuf.c

+ 2 - 2
lang/cem/pmfile

@@ -3,7 +3,7 @@
 
 
 local d = ROOTDIR.."lang/cem/"
 local d = ROOTDIR.."lang/cem/"
 
 
-include (d.."cemcom/pmfile")
+-- include (d.."cemcom/pmfile")
 include (d.."cemcom.ansi/pmfile")
 include (d.."cemcom.ansi/pmfile")
-include (d.."libcc/pmfile")
+-- include (d.."libcc/pmfile")
 include (d.."libcc.ansi/pmfile")
 include (d.."libcc.ansi/pmfile")

+ 3 - 9
mach/i386/.distr

@@ -1,11 +1,5 @@
-Action
+pmfile
 as
 as
-ce
-cv
-libend
-libem
-libfp
-libsys
-libdb
 ncg
 ncg
-mach_params
+libem
+libend

+ 45 - 2
mach/i386/libem/.distr

@@ -1,2 +1,45 @@
-LIST
-libem_s.a
+pmfile
+adi.s
+and.s
+blm.s
+cii.s
+cms.s
+com.s
+csa4.s
+csb4.s
+cuu.s
+dup.s
+dvi.s
+dvu.s
+error.s
+exg.s
+fat.s
+fp8087.s
+gto.s
+iaar.s
+ilar.s
+inn.s
+ior.s
+isar.s
+lar4.s
+loi.s
+mli.s
+mon.s
+ngi.s
+nop.s
+print.s
+rck.s
+rmi.s
+rmu.s
+rol.s
+ror.s
+sar4.s
+sbi.s
+set.s
+sli.s
+sri.s
+sti.s
+strhp.s
+trp.s
+unknown.s
+xor.s

+ 5 - 2
mach/i386/libend/.distr

@@ -1,2 +1,5 @@
-LIST
-end_s.a
+pmfile
+edata.s
+em_end.s
+end.s
+etext.s

+ 20 - 8
plat/linux386/.distr

@@ -2,13 +2,25 @@ descr
 boot.s
 boot.s
 pmfile
 pmfile
 README
 README
+include/ack/config.h
+include/unistd.h
 libsys/pmfile
 libsys/pmfile
-libsys/libsys.h
-libsys/_sys_rawwrite.s
-libsys/_mon.s
-libsys/_sys_write.c
-libsys/_sys_read.c
-libsys/_sys_rawread.s
-libsys/_brk.s
+libsys/_exit.c
+libsys/_hol0.s
+libsys/_syscall.s
+libsys/brk.c
+libsys/close.c
+libsys/creat.c
 libsys/errno.s
 libsys/errno.s
-libsys/_sys_ioctl.c
+libsys/getpid.c
+libsys/gettimeofday.c
+libsys/isatty.c
+libsys/kill.c
+libsys/libsys.h
+libsys/lseek.c
+libsys/open.c
+libsys/read.c
+libsys/sbrk.c
+libsys/signal.c
+libsys/syscalls.h
+libsys/write.c

+ 17 - 7
plat/pc86/.distr

@@ -2,13 +2,23 @@ descr
 boot.s
 boot.s
 pmfile
 pmfile
 README
 README
+include/ack/config.h
+include/unistd.h
 libsys/pmfile
 libsys/pmfile
+libsys/_hol0.s
+libsys/brk.c
+libsys/close.c
+libsys/creat.c
+libsys/errno.s
+libsys/getpid.c
+libsys/isatty.c
+libsys/kill.c
 libsys/libsys.h
 libsys/libsys.h
-libsys/_sys_rawwrite.s
-libsys/_mon.s
-libsys/_sys_write.c
-libsys/_sys_read.c
+libsys/lseek.c
+libsys/open.c
+libsys/read.c
+libsys/signal.c
+libsys/time.c
+libsys/write.c
 libsys/_sys_rawread.s
 libsys/_sys_rawread.s
-libsys/_brk.s
-libsys/errno.s
-libsys/_sys_ioctl.c
+libsys/_sys_rawwrite.s

+ 0 - 56
plat/pc86/libsys/_sys_ioctl.c

@@ -1,56 +0,0 @@
-/* $Source$
- * $State$
- */
-
-#include <stdlib.h>
-#include <errno.h>
-#include <sgtty.h>
-#include "libsys.h"
-
-int _sys_ttyflags = ECHO;
-
-extern struct
-{
-	int fd;
-	int request;
-	void* argp;
-} _sys_params_in;
-
-extern struct
-{
-	int result;
-} _sys_params_out;
-
-#define P _sys_params_in
-
-static int tiocgetp(void)
-{
-	struct sgttyb* s = P.argp;
-	s->sg_flags = _sys_ttyflags;
-	return 0;
-}
-
-static int tiocsetp(void)
-{
-	struct sgttyb* s = P.argp;
-	_sys_ttyflags = s->sg_flags;
-	return 0;
-}
-
-int _sys_ioctl(void)
-{
-	switch (P.request)
-	{
-		case TIOCGETP:
-			_sys_params_out.result = tiocgetp();
-			return 0;
-
-		case TIOCSETP:
-			_sys_params_out.result = tiocsetp();
-			return 0;
-	}
-	
-	_sys_params_out.result = -1;
-	errno = EINVAL;
-	return 0;
-}

+ 0 - 1
plat/pc86/libsys/pmfile

@@ -17,7 +17,6 @@ libsys_pc86 = acklibrary {
 	ackfile (d.."close.c"),
 	ackfile (d.."close.c"),
 	ackfile (d.."read.c"),
 	ackfile (d.."read.c"),
 	ackfile (d.."write.c"),
 	ackfile (d.."write.c"),
---	ackfile (d.."_sys_ioctl.c"),
 	ackfile (d.."brk.c"),
 	ackfile (d.."brk.c"),
 	ackfile (d.."getpid.c"),
 	ackfile (d.."getpid.c"),
 	ackfile (d.."kill.c"),
 	ackfile (d.."kill.c"),

+ 3 - 3
pmfile

@@ -38,7 +38,7 @@ include "util/amisc/pmfile"
 include "util/cmisc/pmfile"
 include "util/cmisc/pmfile"
 include "util/ack/pmfile"
 include "util/ack/pmfile"
 include "util/arch/pmfile"
 include "util/arch/pmfile"
-include "util/cpp/pmfile"
+-- include "util/cpp/pmfile"
 include "lang/cem/cpp.ansi/pmfile"
 include "lang/cem/cpp.ansi/pmfile"
 include "util/cgg/pmfile"
 include "util/cgg/pmfile"
 include "util/ncgg/pmfile"
 include "util/ncgg/pmfile"
@@ -52,8 +52,8 @@ include "util/led/pmfile"
 include "lang/cem/pmfile"
 include "lang/cem/pmfile"
 include "lang/pc/pmfile"
 include "lang/pc/pmfile"
 include "lang/m2/pmfile"
 include "lang/m2/pmfile"
-include "lang/occam/pmfile"
-include "lang/basic/pmfile"
+-- include "lang/occam/pmfile"
+-- include "lang/basic/pmfile"
 
 
 include "mach/proto/pmfile"
 include "mach/proto/pmfile"
 
 

+ 6 - 3
util/amisc/.distr

@@ -1,10 +1,13 @@
 pmfile
 pmfile
-anm.c
-asize.c
-astrip.c
 ashow.c
 ashow.c
+ashow.1
+anm.c
 anm.1
 anm.1
+asize.c
 asize.1
 asize.1
+astrip.c
 astrip.1
 astrip.1
 aslod.c
 aslod.c
 aslod.1
 aslod.1
+aelflod.c
+aelflod.1