Warren Toomey
b232a4b1a6
Added simple code coverage output to a7out. Added a few ed comments.
2016-03-19 07:25:07 +10:00
rswier
b3b868ed50
Ported B compiler b.c to b.b.
...
Ported B compiler b.c to b.b. It is able to compile itself. Hints are
in the comment block.
2016-03-16 01:46:35 -04:00
Warren Toomey
089c8b806f
I made a change to the word2ascii routine and replicated it out to other programs.
2016-03-10 14:14:57 +10:00
Warren Toomey
b03cc44290
Fixed up the llss instruction in a7out.
2016-03-10 07:44:31 +10:00
Phil Budne
9c8cc278a4
fix smes comment block (copied from pbsh.s)
2016-03-07 17:58:09 -05:00
Phil Budne
38ff8aec09
a7out: changes for shell
...
handle "ptr" format executable files
tty read always returns only one character
add shell-compatible "smes" behavior
2016-03-07 17:27:31 -05:00
Warren Toomey
2d9157f4e6
Merge branch 'master' of https://github.com/DoctorWkt/pdp7-unix
2016-03-08 06:48:27 +10:00
Warren Toomey
77ba9809e7
Fixed a small tty handling bug.
2016-03-08 06:48:06 +10:00
rswier
28a98360a4
Successful first run of B interpreter!
...
I hand compiled hello.b into hello.s and assembled with the interpreter
and runtime library:
perl as7 --out a.out bl.s hello.s bi.s
2016-03-07 05:57:30 -05:00
Warren Toomey
a7f040b8f5
Added a div instruction and changed some of the debug outputs in a7out.
2016-03-07 20:12:40 +10:00
Warren Toomey
cfafcad963
a7 is updated with Phil's stdin reading patch. I've written a few more
...
utilities and modified the v1 man pages for them. Fixed a typo (missing
line) in src/cmd/as.s.
2016-03-07 16:17:57 +10:00
Warren Toomey
10befe6cc4
Warren's ls now has -l argument which prints out lines in long format!
2016-03-04 21:56:46 +10:00
Warren Toomey
c8ac75f371
Added a dprintf which I forgot.
2016-03-04 15:37:04 +10:00
Warren Toomey
6f3008e8bd
I've gobe for my own mul algorithm for now, and it seems to work for small
...
positive integers, but it probably needs fixing.
2016-03-04 15:29:37 +10:00
Warren Toomey
807fb56d35
I've added the idiv and mul instructions which are needed by the original PDP-7.
...
However, these are completely untested at the present!
2016-03-04 15:15:57 +10:00
Warren Toomey
218e060a55
I've added the seek() system call to a7out. I've also added some heuristic code
...
to detect if file output is "binary" or ASCII and to write the file correctly.
Mind you, the heuristic can fail :-( The original cp can now copy ASCII and
binary files.
2016-03-04 13:39:38 +10:00
Warren Toomey
451a58fc58
I've added code to detect binary PDP-7 files to a7out. This is needed
...
for doing the seek() and tell() syscalls which are next to do.
2016-03-04 13:03:42 +10:00
Warren Toomey
2261144ea2
Fixed up the llss code in a7out, so now the octal printing code in ds.s works.
2016-03-04 08:31:15 +10:00
Warren Toomey
d3f6924a9c
I fixed a few typos in ds.s and I made a pretend llss instruction in a7out.
2016-03-03 19:46:34 +10:00
Warren Toomey
d33ce4c69f
Based on the details of the directory structure that Phil found, I've
...
modified the a7out and the wktls.s program to reflect this.
2016-03-03 16:35:05 +10:00
Warren Toomey
72473c411b
I've written some code for the sys status syscall in a7out but I've not tested it yet.
2016-03-03 14:15:35 +10:00
Warren Toomey
9cc938bfe6
I've written a simple ls program that actually works :-)
2016-03-03 13:36:35 +10:00
Warren Toomey
553aa31967
Even thought we don't really know the directory structure yet, I've written
...
code to allow a directory to be read. We can change it as required.
2016-03-03 13:13:52 +10:00
Warren Toomey
747d1f4466
Added the time system call as per the draft of the CACM paper.
2016-03-03 12:12:18 +10:00
Warren Toomey
0314dff3c6
Added getuid and setuid syscalls to a7out.
2016-03-03 11:09:55 +10:00
Warren Toomey
7b9d907902
Fixed the a7out smes/rmes bug, they work now.
2016-03-03 10:47:07 +10:00
Warren Toomey
97407ef507
I added smes and rmes system calls to a7out and wrote some code
...
in src/other/fork_test.s to test it. It's not working quite right
yet, we keep getting wait() returning -1 in a7out even though there
is a child process.
2016-03-03 10:14:04 +10:00
Warren Toomey
6547aa98be
I've added fork() to a7out after adding some comments to src/cmd/init.s.
...
There is a test program to demonstrate fork working.
2016-03-03 09:23:48 +10:00
Warren Toomey
9c79bbb15d
Oops, didn't initialise $mode properly.
2016-03-02 20:42:45 +10:00
Warren Toomey
dc2d2dd63b
Phil's change to as7 to implement RELATIVE flag. He says:
...
seems to assemble cat.s and kernel reasonably...
(famous last words)
I've updated a7out to use the same starting location. It runs cat.s OK.
2016-03-02 20:38:00 +10:00
Warren Toomey
c073aee196
Added unlink and chdir syscalls to a7out
2016-03-02 18:31:25 +10:00
Warren Toomey
a3d6090fe7
tools/as7: added syscalls chmod and chown, added auto-increment
...
locations, fixed a bug in character input, added several EAE
instructions. We now have cp.s, chmod.s and chown.s working.
2016-03-02 17:55:33 +10:00
Warren Toomey
02eeb59977
tools/a7out: Added the creat() system call.
2016-03-02 06:14:12 +10:00
Warren Toomey
a2e8a187b2
tools/a7out: I took out the code to pretend to deal with binary files,
...
and I did a perltidy to reformat the code.
2016-03-01 18:28:37 +10:00
Warren Toomey
73c066ae9d
I've restructured the opr code and the add code using the SimH logic
...
and I fixed up some bugs with the new command interpreter. I'm getting
so close to cat.s working!
2016-03-01 16:55:03 +10:00
Warren Toomey
220f87efed
Rewording of the a7out help text.
2016-02-29 17:10:25 +10:00
Warren Toomey
714de5a7e1
I've added a single-step mode to tools/a7out and rationalised the debug output.
...
Some small changes to src/cmd/cat.s and wktcat.s to reflect the correct number
of arguments to open. Typos fixes to src/cmd/cat.s.
2016-02-29 16:47:13 +10:00
Warren Toomey
ed80a93a08
tools/a7out: I added another 7 instructions, but I haven't tested them yet.
2016-02-27 21:55:12 +10:00
Warren Toomey
ea7cd8da28
tools/a7out: Added the jms instruction.
2016-02-27 15:55:40 +10:00
Warren Toomey
ea11773db7
tools/a7out: Add the law instruction and change some numeric literals to
...
named constants.
2016-02-27 15:24:01 +10:00
Warren Toomey
fafeae7470
I've rewritten tools/a7out to have the correct PDP-7 Unix command
...
line memory storage convention, and I've rewritten tools/wktcat.s
to deal with this. I've imported some code from the real cat.s
and now wktcat.s actually works as per the real cat.s.
2016-02-27 10:49:43 +10:00
Warren Toomey
d2511c36c0
I'm trying to bring my wktcat.s file into line with the real one.
...
I've refactored tools/a7out to have a dprintf() function to printf
only on debugging. I still need to rewrite the command-line arg
storage structure.
2016-02-27 08:05:52 +10:00
Warren Toomey
d6d4c9b814
According to cat.s, fd 8 is standard error (not fd2!). I've updated
...
the a7out simulator to have STDERR on fd 8.
2016-02-26 22:37:03 +10:00
Warren Toomey
9c8dbdea37
tools/a7out: I refactored the indirect logic, much nicer now.
2016-02-26 21:57:10 +10:00
Warren Toomey
a132327a8b
a7out: I had the spa logic wrong. Now fixed.
2016-02-26 21:45:55 +10:00
Warren Toomey
536de9ea56
I worked out the bug with the command-line arguments, I was overwriting
...
017777, oops. I've added more comments to wktcat.s (renamed from
simplecat.s). Now we need to find out how the real PDP-7 Unix
does command line arguments.
2016-02-26 21:26:44 +10:00
Warren Toomey
8f8cc64d10
I've added tad and sza to the a7out simulator, and I also added some
...
code to place command-line arguments into the simulated memory. I'm
trying to write my own version of cat so I can compare mine to the
real one. Right now there's a bug when simplecat has two arguments.
Zero and one arguments are OK! Saving so I have a backup before proceeding.
2016-02-26 20:56:31 +10:00
Warren Toomey
b8550475b0
I've got a very simple cat program working, which reads from stdin and
...
sends it to stdout.
2016-02-26 18:43:20 +10:00
Warren Toomey
f9b8c8eeb2
Changed as7 to allow sys open statements, rewrite write_test.s to
...
use this syntax, and fixed up a bug in sys_open in a7out.
2016-02-26 06:19:27 +10:00
Warren Toomey
cc678483e1
I've added read() now, but I haven't tested it fully yet.
2016-02-25 18:43:44 +10:00