simh中运行unix v7
simh中运行unix v7
wangxuwei 发表于11个月前
simh中运行unix v7
  • 发表于 11个月前
  • 阅读 5
  • 收藏 0
  • 点赞 0
  • 评论 0

腾讯云 技术升级10大核心产品年终让利>>>   

安装simh:win下直接安装,linux下make后在BIN目录找到pdp11并cp到搜索路径目录下

去http://simh.trailing-edge.com/kits/uv7swre.zip载uv7swre.zip,解压后生成unix_v7_rl.dsk 

或到天翼云盘下载(访问码:0933)

启动文件

echo
echo at the prompt type in
echo @ boot
echo at the prompt type in
echo : rl(0,0)rl2unix
echo
set   cpu   u18 
set   rl0   RL02 
att   rl0   unix_v7_rl.dsk 
boot   rl0
q

启动并登录

$ pdp11 boot.int 

PDP-11 simulator V3.9-0

at the prompt type in
@ boot
at the prompt type in
: rl(0,0)rl2unix

Disabling XQ
@boot
New Boot, known devices are hp ht rk rl rp tm vt 
: rl(0,0)rl2unix
mem = 177856
# cat /etc/passwd
root:VwL97VCAx1Qhs:0:1::/:
daemon:x:1:1::/:
sys::2:2::/usr/sys:
bin::3:3::/bin:
uucp::4:4::/usr/lib/uucp:/usr/lib/uucico
dmr::7:3::/usr/dmr:
# Restricted rights: Use, duplication, or disclosure
is subject to restrictions stated in your contract with
Western Electric Company, Inc.
Mon Sep 26 07:24:19 EDT 1988

# mkdir /usr/dmr
# chown dmr /usr/dmr
# chgrp 3 /usr/dmr
# mkdir /tmp
# chmod 777 /tmp
# ^D




login: dmr
$ 

$ pdp11 boot.int 

 

 

编译运行一个c程序

$ ed hello.c
?hello.c
a
main()
{
   printf("Hello World!\n");
}
.
w
40
q
$ cc hello.c
$ a.out
Hello World!

运行一个fortran77程序

$ ed ex2.f
?ex2.f
a
C MAIN PROGRAM
        PROGRAM EX2
        PRINT *, 'radius=', 1.0, ' Circum=', Cf(1.0)
        PRINT *, 'radius=', 3.0, ' Circum=', Cf(3.0)
        PRINT *, 'radius=', 12.0, ' Circum=', Cf(12.0)
        PRINT *, 'radius=', 5.0, ' Circum=', Cf(5.0)
        END

C SUBPROGRAM
        FUNCTION Cf(R)
        PI=3.1415926
        Circum=2*PI*R
        RETURN
        END
.
w
368
q
$ f77 ex2.f
ex2.f:
   MAIN ex2:
   cf:
$ ./a.out
 radius=  1.00000000  Circum=  .000000000e+00
 radius=  3.00000000  Circum=  .000000000e+00
 radius=  .120000000e+02  Circum=  .000000000e+00
 radius=  5.00000000  Circum=  .000000000e+00

 

共有 人打赏支持
粉丝 13
博文 233
码字总数 87334
×
wangxuwei
如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!
* 金额(元)
¥1 ¥5 ¥10 ¥20 其他金额
打赏人
留言
* 支付类型
微信扫码支付
打赏金额:
已支付成功
打赏金额: