1
0
mirror of https://github.com/aap/pdp6.git synced 2026-05-04 07:08:36 +00:00

emu: rewrote 551, still rough

This commit is contained in:
aap
2019-02-24 20:41:25 +01:00
parent 7935d618f0
commit 4909e1bfd9
13 changed files with 869 additions and 263 deletions

View File

@@ -260,6 +260,27 @@ c_attach(int argc, char *argv[])
dev->attach(dev, argv[2]);
}
static void
c_detach(int argc, char *argv[])
{
Device *dev;
if(argc < 2){
printf("Not enough arguments\n");
return;
}
dev = getdevice(argv[1]);
if(dev == nil){
printf("No device: %s\n", argv[1]);
return;
}
if(dev->detach == nil){
printf("No detach for device type %s\n", dev->type);
return;
}
dev->detach(dev);
}
/* ioconnect dev busdev */
static void
c_ioconnect(int argc, char *argv[])
@@ -615,6 +636,8 @@ struct {
"make a device: mkdev name type [args]" },
{ "attach", c_attach,
"attach a file to a devie: attach name filename" },
{ "detach", c_detach,
"detach a file from a devie: attach name" },
{ "connectio", c_ioconnect,
"connect device to IO bus: connectio devname procname" },
{ "connectmem", c_memconnect,