minor changes

This commit is contained in:
ceriel 1987-03-11 14:54:29 +00:00
parent 778948b661
commit b99a714497
6 changed files with 192 additions and 269 deletions

View file

@ -1,5 +1,6 @@
.\" $Header$ .\" $Header$
.TH 6500_AS 6ACK .TH 6500_AS 6ACK
.ad
.SH NAME .SH NAME
6500_as \- assembler for Mostek 6500 6500_as \- assembler for Mostek 6500
.SH SYNOPSIS .SH SYNOPSIS

View file

@ -2,18 +2,19 @@
NROFF=nroff NROFF=nroff
MANDIR=/usr/man MANDIR=/usr/man
SUF=opr
all: all:
for i in *.[1-8] ; do \ for i in *.[1-8] ; do \
$(NROFF) -man head $$i > $$i.opr ; \ $(NROFF) -man head $$i > $$i.$(SUF) ; \
done done
install: install:
for i in *.[1-8] ; do \ for i in *.[1-8] ; do \
num=expr $$i : '.*\.\([1-8]\)' ; \ num=expr $$i : '.*\.\([1-8]\)' ; \
if test -f $(MANDIR)/man$$num/$$i ; \ if test -f $(MANDIR)/man$$num/$$i ; \
then cp $$i $(MANDIR)/man$$num/em_$$i ; \ then cat head $$i > $(MANDIR)/man$$num/em_$$i ; \
else cp $$i $(MANDIR)/man$$num/$$i ; \ else cat head $$i $(MANDIR)/man$$num/$$i ; \
fi ; \ fi ; \
done done
@ -26,3 +27,4 @@ pr:
clean: clean:
-rm -f *.opr *.out -rm -f *.opr *.out
-rm -f *.$(SUF)

View file

@ -214,20 +214,20 @@ Return the number of ticks of user and system time consumed by the program.
The following program presents an example of how these routines can be used. The following program presents an example of how these routines can be used.
This program is equivalent to the UNIX command cat(1). This program is equivalent to the UNIX command cat(1).
.nf .nf
{$c+} {$c+}
program cat(input,inp,output); program cat(input,inp,output);
var inp:text; var inp:text;
s:string; s:string;
function argc:integer; extern; function argc:integer; extern;
function argv(i:integer):string; extern; function argv(i:integer):string; extern;
procedure argshift; extern; procedure argshift; extern;
function strlen(s:string):integer; extern; function strlen(s:string):integer; extern;
function strfetch(s:string; i:integer):char; extern; function strfetch(s:string; i:integer):char; extern;
procedure copy(var fi:text); procedure copy(var fi:text);
var c:char; var c:char;
begin reset(fi); begin reset(fi);
while not eof(fi) do while not eof(fi) do
begin begin
while not eoln(fi) do while not eoln(fi) do
@ -238,9 +238,9 @@ This program is equivalent to the UNIX command cat(1).
readln(fi); readln(fi);
writeln writeln
end end
end; end;
begin {main} begin {main}
if argc = 1 then if argc = 1 then
copy(input) copy(input)
else else
@ -251,34 +251,33 @@ This program is equivalent to the UNIX command cat(1).
else copy(inp); else copy(inp);
argshift; argshift;
until argc <= 1; until argc <= 1;
end. end.
.fi .fi
.PP .PP
Another example gives some idea of the way to manage trap handling: Another example gives some idea of the way to manage trap handling:
.nf .nf
program bigreal(output); program bigreal(output);
const EFOVFL=4; const EFOVFL=4;
var trapped:boolean; var trapped:boolean;
procedure encaps(procedure p; procedure encaps(procedure p; procedure q(n:integer)); extern;
procedure q(n:integer)); extern; procedure trap(n:integer); extern;
procedure trap(n:integer); extern;
procedure traphandler(n:integer); procedure traphandler(n:integer);
begin if n=EFOVFL then trapped:=true else trap(n) end; begin if n=EFOVFL then trapped:=true else trap(n) end;
procedure work; procedure work;
var i,j:real; var i,j:real;
begin trapped:=false; i:=1; begin trapped:=false; i:=1;
while not trapped do while not trapped do
begin j:=i; i:=i*2 end; begin j:=i; i:=i*2 end;
writeln('bigreal = ',j); writeln('bigreal = ',j);
end; end;
begin begin
encaps(work,traphandler); encaps(work,traphandler);
end. end.
.fi .fi
.SH FILES .SH FILES
.IP ~em/lib/*/tail_pc 20 .IP ~em/lib/*/tail_pc 20

View file

@ -1,5 +1,5 @@
.\" $Header$ .\" $Header$
.TH NS_ASS 6ACK .TH NS_AS 6ACK
.ad .ad
.SH NAME .SH NAME
ns_as \- National Semiconductor 16032 assembler/linker ns_as \- National Semiconductor 16032 assembler/linker

View file

@ -4,196 +4,117 @@
.SH NAME .SH NAME
pc_prlib \- library of Pascal runtime routines pc_prlib \- library of Pascal runtime routines
.SH SYNOPSIS .SH SYNOPSIS
.ta 11n .ta 11n 22n 33n 44n 55n
.nf
type alpha=packed array[1..8] of char; type alpha=packed array[1..8] of char;
.br
pstring= ^packed array[] of char; pstring= ^packed array[] of char;
function _abi(i:integer):integer; function _abi(i:integer):integer;
.br
function _abl(i:long):long; function _abl(i:long):long;
.br
function _mdi(j,i:integer):integer; function _mdi(j,i:integer):integer;
.br
function _mdl(j,i:long):long; function _mdl(j,i:long):long;
.br
function _abr(r:real):real; function _abr(r:real):real;
.br
function _sin(r:real):real; function _sin(r:real):real;
.br
function _cos(r:real):real; function _cos(r:real):real;
.br
function _atn(r:real):real; function _atn(r:real):real;
.br
function _exp(r:real):real; function _exp(r:real):real;
.br
function _log(r:real):real; function _log(r:real):real;
.br
function _sqt(r:real):real; function _sqt(r:real):real;
.br
function _rnd(r:real):real; function _rnd(r:real):real;
type compared=-1..1; type compared=-1..1;
.br
gotoinfo=record gotoinfo=record
.br
pcoffset:^procedure; { procedure id. without static link } pcoffset:^procedure; { procedure id. without static link }
.br
nlocals: integer; nlocals: integer;
.br
end; end;
function _bcp(sz:integer; s2,s1:pstring):compared; function _bcp(sz:integer; s2,s1:pstring):compared;
.br
function _bts(size,high,low:integer; base:^set 0..(8*size-1)) function _bts(size,high,low:integer; base:^set 0..(8*size-1))
:set of 0..(8*size-1); :set of 0..(8*size-1);
.br
procedure _gto(lb:^integer; p:^gotoinfo); procedure _gto(lb:^integer; p:^gotoinfo);
procedure _new(size:integer; var p:^integer); procedure _new(size:integer; var p:^integer);
.br
procedure _dis(size:integer; var p:^integer); procedure _dis(size:integer; var p:^integer);
.br
procedure _sav(var p:^integer); procedure _sav(var p:^integer);
.br
procedure _rst(var p:^integer); procedure _rst(var p:^integer);
type arrdescr=record type arrdescr=record
.br
lowbnd: integer; lowbnd: integer;
.br
diffbnds:integer; diffbnds:integer;
.br
elsize: integer; elsize: integer;
.br
end; end;
.br
arr1=array[] of ?; arr1=array[] of ?;
.br
arr2=packed array[] of ?; arr2=packed array[] of ?;
procedure _pac(var ad,zd:arrdescr; var zp:arr2; i:integer; procedure _pac(var ad,zd:arrdescr; var zp:arr2; i:integer;
.br
var ap:arr1); var ap:arr1);
.br
procedure _unp(var ad,zd:arrdescr; i:integer; var ap:arr1; procedure _unp(var ad,zd:arrdescr; i:integer; var ap:arr1;
.br
var zp:arr2;); var zp:arr2;);
.br
function _asz(var dp:arrdescr):integer; function _asz(var dp:arrdescr):integer;
procedure _ass(line:integer; b:boolean); procedure _ass(line:integer; b:boolean);
.br
procedure procentry(var name:alpha); procedure procentry(var name:alpha);
.br
procedure procexit(var name:alpha); procedure procexit(var name:alpha);
const lowbyte=[0..7]; const lowbyte=[0..7];
.br
MAGIC =[1,3,5,7]; MAGIC =[1,3,5,7];
.br
WINDOW =[11]; WINDOW =[11];
.br
ELNBIT =[12]; ELNBIT =[12];
.br
EOFBIT =[13]; EOFBIT =[13];
.br
TXTBIT =[14]; TXTBIT =[14];
.br
WRBIT =[15]; WRBIT =[15];
.br
type file=record type file=record
.br
ptr: ^char; ptr: ^char;
.br
flags: set of [0..15]; flags: set of [0..15];
.br
fname: string; fname: string;
.br
ufd: 0..15; ufd: 0..15;
.br
size: integer; size: integer;
.br
count: 0..buflen; count: 0..buflen;
.br
buflen: max(512,size) div size * size; buflen: max(512,size) div size * size;
.br
bufadr: packed array[1..max(512,size)] bufadr: packed array[1..max(512,size)]
.br
of char; of char;
.br
end; end;
.br
filep=^file; filep=^file;
.br
const NFILES=15; const NFILES=15;
.br
_extfl:^array[] of filep; _extfl:^array[] of filep;
procedure _ini(var args:integer; var hb:integer; procedure _ini(var args:integer; var hb:integer;
var p:array[] of filep; var mainlb:integer); var p:array[] of filep; var mainlb:integer);
.br
procedure _hlt(status:0..255); procedure _hlt(status:0..255);
procedure _opn(size:integer; f:filep); procedure _opn(size:integer; f:filep);
.br
procedure _cre(size:integer; f:filep); procedure _cre(size:integer; f:filep);
.br
procedure _cls(f:filep); procedure _cls(f:filep);
procedure _get(f:filep); procedure _get(f:filep);
.br
procedure _put(f:filep); procedure _put(f:filep);
.br
function _wdw(f:filep):^char; function _wdw(f:filep):^char;
.br
function _efl(f:filep):boolean; function _efl(f:filep):boolean;
function _eln(f:filep):boolean; function _eln(f:filep):boolean;
.br
function _rdc(f:filep):char; function _rdc(f:filep):char;
.br
function _rdi(f:filep):integer; function _rdi(f:filep):integer;
.br
function _rdl(f:filep):long; function _rdl(f:filep):long;
.br
function _rdr(f:filep):real; function _rdr(f:filep):real;
.br
procedure _rln(f:filep); procedure _rln(f:filep);
.br
procedure _wrc(c:char; f:filep); procedure _wrc(c:char; f:filep);
.br
procedure _wsc(w:integer; c:char; f:filep); procedure _wsc(w:integer; c:char; f:filep);
.br
procedure _wri(i:integer; f:filep); procedure _wri(i:integer; f:filep);
.br
procedure _wsi(w:integer; i:integer; f:filep); procedure _wsi(w:integer; i:integer; f:filep);
.br
procedure _wrl(l:long; f:filep); procedure _wrl(l:long; f:filep);
.br
procedure _wsl(w:integer; l:long; f:filep); procedure _wsl(w:integer; l:long; f:filep);
.br
procedure _wrr(r:real; f:filep); procedure _wrr(r:real; f:filep);
.br
procedure _wsr(w:integer; r:real; f:filep); procedure _wsr(w:integer; r:real; f:filep);
.br
procedure _wrf(ndigit:integer; w:integer; r:real; f:filep); procedure _wrf(ndigit:integer; w:integer; r:real; f:filep);
.br
procedure _wrs(l:integer; s:pstring; f:filep); procedure _wrs(l:integer; s:pstring; f:filep);
.br
procedure _wss(w:integer; l:integer; s:pstring; f:filep); procedure _wss(w:integer; l:integer; s:pstring; f:filep);
.br
procedure _wrb(b:boolean; f:filep); procedure _wrb(b:boolean; f:filep);
.br
procedure _wsb(w:integer; b:boolean; f:filep); procedure _wsb(w:integer; b:boolean; f:filep);
.br
procedure _wrz(s:string; f:filep); procedure _wrz(s:string; f:filep);
.br
procedure _wsz(w:integer; s:string; f:filep); procedure _wsz(w:integer; s:string; f:filep);
.br
procedure _wln(f:filep); procedure _wln(f:filep);
.br
procedure _pag(f:filep); procedure _pag(f:filep);
.fi
.SH DESCRIPTION .SH DESCRIPTION
This library is used by the Pascal to EM compiler and This library is used by the Pascal to EM compiler and
contains all the runtime routines for standard Pascal programs. contains all the runtime routines for standard Pascal programs.

View file

@ -1,5 +1,5 @@
.\" $Header$ .\" $Header$
.TH z80_AS 6ACK .TH Z80_AS 6ACK
.ad .ad
.SH NAME .SH NAME
z80_as \- assembler for Zilog z80 z80_as \- assembler for Zilog z80