Get ass running --- it's very K&R and almost certainly won't build on clang,
but it works on gcc.
This commit is contained in:
parent
19cd42124f
commit
d10a594c04
|
@ -45,7 +45,9 @@ installable {
|
||||||
"util/ack+pkg",
|
"util/ack+pkg",
|
||||||
"util/amisc+pkg",
|
"util/amisc+pkg",
|
||||||
"util/arch+pkg",
|
"util/arch+pkg",
|
||||||
|
"util/ass+pkg",
|
||||||
"util/ego+pkg",
|
"util/ego+pkg",
|
||||||
|
"util/ass+pkg",
|
||||||
"util/led+pkg",
|
"util/led+pkg",
|
||||||
"util/misc+pkg",
|
"util/misc+pkg",
|
||||||
"util/opt+pkg",
|
"util/opt+pkg",
|
||||||
|
|
|
@ -2,7 +2,12 @@
|
||||||
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
||||||
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
||||||
*/
|
*/
|
||||||
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <fcntl.h>
|
||||||
#include <em_spec.h>
|
#include <em_spec.h>
|
||||||
#include <as_spec.h>
|
#include <as_spec.h>
|
||||||
#include <em_flag.h>
|
#include <em_flag.h>
|
||||||
|
|
|
@ -850,7 +850,7 @@ extxcon(header) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Added atol() that ignores overflow. --Ceriel */
|
/* Added atol() that ignores overflow. --Ceriel */
|
||||||
long atol(s)
|
long myatol(s)
|
||||||
register char *s;
|
register char *s;
|
||||||
{
|
{
|
||||||
register long total = 0;
|
register long total = 0;
|
||||||
|
@ -879,6 +879,6 @@ extvcon(header) {
|
||||||
if ( consiz>4 ) {
|
if ( consiz>4 ) {
|
||||||
error("Size of initializer exceeds loader capability") ;
|
error("Size of initializer exceeds loader capability") ;
|
||||||
}
|
}
|
||||||
extarb((int)consiz,atol(string)) ;
|
extarb((int)consiz,myatol(string)) ;
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,7 +47,6 @@ area_t getarea(size) unsigned size ; {
|
||||||
register struct freeblock *c_ptr,*l_ptr ;
|
register struct freeblock *c_ptr,*l_ptr ;
|
||||||
register char *ptr ;
|
register char *ptr ;
|
||||||
unsigned rqsize ;
|
unsigned rqsize ;
|
||||||
char *malloc() ;
|
|
||||||
|
|
||||||
size = ((size + (sizeof(int) - 1)) / sizeof(int)) * sizeof(int);
|
size = ((size + (sizeof(int) - 1)) / sizeof(int)) * sizeof(int);
|
||||||
#ifdef MEMUSE
|
#ifdef MEMUSE
|
||||||
|
|
|
@ -150,16 +150,3 @@ extern relc_t *text_reloc();
|
||||||
extern relc_t *data_reloc();
|
extern relc_t *data_reloc();
|
||||||
extern area_t getarea();
|
extern area_t getarea();
|
||||||
|
|
||||||
/*
|
|
||||||
* all used library routines
|
|
||||||
*/
|
|
||||||
extern char *malloc();
|
|
||||||
extern int open();
|
|
||||||
extern int creat();
|
|
||||||
extern int getpid();
|
|
||||||
extern int unlink();
|
|
||||||
extern int close();
|
|
||||||
extern int strcmp();
|
|
||||||
extern char *strcpy();
|
|
||||||
|
|
||||||
#define void int
|
|
||||||
|
|
51
util/ass/build.lua
Normal file
51
util/ass/build.lua
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
cprogram {
|
||||||
|
name = "maktab",
|
||||||
|
srcs = {
|
||||||
|
"./maktab.c"
|
||||||
|
},
|
||||||
|
deps = {
|
||||||
|
"h+emheaders",
|
||||||
|
"modules/src/em_data+lib",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
normalrule {
|
||||||
|
name = "asstb",
|
||||||
|
ins = {
|
||||||
|
"+maktab",
|
||||||
|
"etc/ip_spec.t"
|
||||||
|
},
|
||||||
|
outleaves = {
|
||||||
|
"asstb.c"
|
||||||
|
},
|
||||||
|
commands = {
|
||||||
|
"%{ins} %{outs}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
cprogram {
|
||||||
|
name = "em_ass",
|
||||||
|
srcs = {
|
||||||
|
"./ass*.c",
|
||||||
|
"+asstb",
|
||||||
|
},
|
||||||
|
deps = {
|
||||||
|
"h+emheaders",
|
||||||
|
"h+local",
|
||||||
|
--"modules/src/alloc+lib",
|
||||||
|
"modules/src/em_data+lib",
|
||||||
|
--"modules/src/data+lib",
|
||||||
|
--"modules/src/object+lib",
|
||||||
|
--"modules/src/system+lib",
|
||||||
|
"./ass*.h",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
installable {
|
||||||
|
name = "pkg",
|
||||||
|
map = {
|
||||||
|
["$(PLATDEP)/em_ass"] = "+em_ass",
|
||||||
|
["$(INSDIR)/share/man/man6/em_ass.6"] = "./em_ass.6",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
.SH NAME
|
.SH NAME
|
||||||
em_ass \- EM assembler/loader
|
em_ass \- EM assembler/loader
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.B ~em/lib.bin/em_ass
|
.B ~em/lib/ack/em_ass
|
||||||
[options] argument ...
|
[options] argument ...
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
Em_ass assembles and links EM modules.
|
Em_ass assembles and links EM modules.
|
||||||
|
|
Loading…
Reference in a new issue