{"id":17088357,"url":"https://github.com/atotto/my_unix_v6","last_synced_at":"2025-04-12T22:05:49.854Z","repository":{"id":16660084,"uuid":"19415639","full_name":"atotto/my_unix_v6","owner":"atotto","description":"unix v6 contents for learning","archived":false,"fork":false,"pushed_at":"2014-07-12T05:23:10.000Z","size":6760,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-12T22:05:46.110Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/atotto.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-04T00:52:51.000Z","updated_at":"2024-06-26T13:00:06.000Z","dependencies_parsed_at":"2022-09-06T10:42:12.344Z","dependency_job_id":null,"html_url":"https://github.com/atotto/my_unix_v6","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atotto%2Fmy_unix_v6","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atotto%2Fmy_unix_v6/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atotto%2Fmy_unix_v6/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atotto%2Fmy_unix_v6/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/atotto","download_url":"https://codeload.github.com/atotto/my_unix_v6/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248637769,"owners_count":21137538,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T13:37:14.354Z","updated_at":"2025-04-12T22:05:49.826Z","avatar_url":"https://github.com/atotto.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# unix v6 勉強用\n\n## unix v6 をシミュレータで動かす\n\n手元の環境：\n\n* OSX 10.9.2\n\nまず、実行環境となるPDP11をシミュレートするためのsimhをインストールする：\n\n    $ brew install simh\n    \nubuntuなら `$ sudo apt-get install simh` で。\n\nこれで pdp11 コマンドが利用できるようになる。\n\n\n[Software Kits](http://simh.trailing-edge.com/software.html) から [UNIX V6](http://simh.trailing-edge.com/kits/uv6swre.zip) をダウンロードしておく。\n\n```\n$ curl -Os http://simh.trailing-edge.com/kits/uv6swre.zip\n$ unzip uv6swre.zip\n```\n\n起動用にbootstrapを書いておく。pdp11コマンドにこのファイルを渡す。\n\nbootstrap:\n\n```\n$ cat bootstrap\nset cpu 11/40\nset cpu u18\natt rk0 unix0_v6_rk.dsk\natt rk1 unix1_v6_rk.dsk\natt rk2 unix2_v6_rk.dsk\natt rk3 unix3_v6_rk.dsk\nboot rk0\n```\n\n起動:\n\n```\n$ pdp11 boot.conf\n@unix\n\nlogin: root\n# \n```\n\nunixといれて起動。rootでログイン。\n\n### 操作:\n\n* `cd` コマンドはないので `chdir` を使う\n* `halt`, `shutdown` コマンドはないので `ctrl-e` で電源断 （※ `sync` コマンドを忘れずに！）\n\n### カスタマイズ:\n\nhttp://aap.papnet.eu/docs/unix6.txt を参考に。\n\n#### cd コマンドを導入:\n\nテキスト通り、つらつらと：\n\n```\n# chdir /usr/source/s2\n# ed sh.c\n11594\n561\n                if(equal(cp1, \"chdir\")) {\ns/equal(cp1, \"chdir\")/equal(cp1, \"chdir\") || equal(cp1, \"cd\")/p\n                if(equal(cp1, \"chdir\") || equal(cp1, \"cd\")) {\nw mysh.c\n11614\nq\n# cc mysh.c\n# mv /bin/sh /bin/sh_org\n# mv a.out /bin/sh\n# sh\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatotto%2Fmy_unix_v6","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatotto%2Fmy_unix_v6","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatotto%2Fmy_unix_v6/lists"}