1
0
mirror of https://github.com/DoctorWkt/pdp7-unix.git synced 2026-04-29 21:26:48 +00:00
Commit Graph

31 Commits

Author SHA1 Message Date
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
Warren Toomey
b463500f37 I've got a few system calls working: open, close, write, exit along with the
instructions dac, lac, iot and hlt. I can print Hello, world\n, yay!
2016-02-25 18:12:57 +10:00
Warren Toomey
f5554d1181 The beginnings of the user-mode simulator: three instructions so far 2016-02-25 10:25:43 +10:00