1
0
mirror of https://github.com/DoctorWkt/pdp7-unix.git synced 2026-04-18 09:06:01 +00:00

Added getuid and setuid syscalls to a7out.

This commit is contained in:
Warren Toomey
2016-03-03 11:09:55 +10:00
parent 02a0253afc
commit 0314dff3c6

View File

@@ -526,19 +526,34 @@ sub cal {
# Syscalls that we can simulate
my %Syscallist = (
# 1: save
2 => \&sys_getuid,
3 => \&sys_open,
4 => \&sys_read,
5 => \&sys_write,
6 => \&sys_creat,
# 7 seek
# 8 tell
9 => \&sys_close,
# 10 link
11 => \&sys_unlink,
12 => \&sys_setuid,
# 13 rename
14 => \&sys_exit,
# 15 time
16 => \&sys_intrp,
17 => \&sys_chdir,
18 => \&sys_chmod,
19 => \&sys_chown,
28 => \&sys_rmes,
# 20 badcal
# 21 syslog
# 22 badcal
# 23 capt
# 24 rele
# 25 status
# 26 badcal
27 => \&sys_smes,
28 => \&sys_rmes,
29 => \&sys_fork,
);
@@ -557,6 +572,22 @@ sub sys_exit {
exit(0);
}
# Getuid system call
sub sys_getuid {
$AC= $< & MAXINT;
dprintf("getuid system call, uid %06o\n", $AC);
$PC += 1;
return;
}
# Setuid system call
sub sys_setuid {
# For now, do nothing
dprint("setuid system call\n");
$PC += 1;
return;
}
# Intrp system call
sub sys_intrp {
# For now, do nothing