Browse Source

Updated for the 6.0pre2 release.

dtrg 17 years ago
parent
commit
e02179a9fe

+ 6 - 24
.distr

@@ -1,4 +1,5 @@
 README
+CHANGES
 Copyright
 pm
 pmfile
@@ -29,7 +30,7 @@ util/cmisc
 util/ack
 lib/descr/fe
 util/arch
-util/cpp
+#util/cpp
 util/cgg
 util/ncgg
 util/misc
@@ -41,33 +42,14 @@ util/led
 lang/cem
 lang/pc
 lang/m2
-lang/occam
-lang/basic
+#lang/occam
+#lang/basic
 
 mach/proto
 mach/i86
+mach/i386
 
 plat/pc86
+plat/linux386
 
 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$
 # $Revision$
 
-                     THE AMSTERDAM COMPILER KIT V6.0pre1
+                     THE AMSTERDAM COMPILER KIT V6.0pre2
                      ===================================
 
                   © 1987-2005 Vrije Universiteit, Amsterdam
-                                2007-02-25
+                                2007-04-24
 
 
 INTRODUCTION
@@ -28,11 +28,12 @@ SUPPORT
 
 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:
 
 pc86          produces bootable floppy disk images for 8086 PCs
+linux386      produces ELF executables for PC Linux systems
 
 
 INSTALLATION
@@ -114,6 +115,9 @@ For further information, see the man page (which actually does get
 installed, but is rather out of date).
 
 There are some (known working) example programs in the 'examples' directory.
+A sample command line is:
+
+ack -mlinux386 -O examples/paranoia.c
 
 
 GOTCHAS
@@ -121,16 +125,11 @@ GOTCHAS
 
 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
   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)
 dg@cowlark.com
-2007-02-25
+2007-04-24

+ 2 - 0
examples/.distr

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

+ 2 - 2
lang/cem/.distr

@@ -2,5 +2,5 @@ pmfile
 cemcom.ansi
 cpp.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
 ctype.h
-dirent.h
 errno.h
 float.h
-grp.h
 limits.h
-locale.h
 math.h
-mathconst.h
 setjmp.h
 signal.h
 stdarg.h
@@ -16,6 +14,9 @@ stdio.h
 stdlib.h
 string.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
-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 {
 	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/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
-sigmisc.c

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

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

+ 2 - 2
lang/cem/pmfile

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

+ 3 - 9
mach/i386/.distr

@@ -1,11 +1,5 @@
-Action
+pmfile
 as
-ce
-cv
-libend
-libem
-libfp
-libsys
-libdb
 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
 pmfile
 README
+include/ack/config.h
+include/unistd.h
 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/_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
 pmfile
 README
+include/ack/config.h
+include/unistd.h
 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/_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/_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.."read.c"),
 	ackfile (d.."write.c"),
---	ackfile (d.."_sys_ioctl.c"),
 	ackfile (d.."brk.c"),
 	ackfile (d.."getpid.c"),
 	ackfile (d.."kill.c"),

+ 3 - 3
pmfile

@@ -38,7 +38,7 @@ include "util/amisc/pmfile"
 include "util/cmisc/pmfile"
 include "util/ack/pmfile"
 include "util/arch/pmfile"
-include "util/cpp/pmfile"
+-- include "util/cpp/pmfile"
 include "lang/cem/cpp.ansi/pmfile"
 include "util/cgg/pmfile"
 include "util/ncgg/pmfile"
@@ -52,8 +52,8 @@ include "util/led/pmfile"
 include "lang/cem/pmfile"
 include "lang/pc/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"
 

+ 6 - 3
util/amisc/.distr

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