LoginSignup
1
0

More than 1 year has passed since last update.

Simh/i1401 with FortranIV on docker

Last updated at Posted at 2019-07-01
1 / 2

gcc on Dockerで、gccをビルドする手順を書きました。
その中で、実行環境を作成して動かすのは「Hello World」でした。
もう少し、実用的な?ものということでSimhのうち、IBM1401シミュレータでFortranIVのプログラムを動かしてみます。

IBM1401 FortranIVについては、IBM1401 FortranIV Summaryを参考にしてください(実は手前味噌)。マニュアルはProgram Specifications, and Operating Procedures
IBM 1401, 1440, and 1460
です。

Simhの実行環境のDockerfileを用意します。

Dockerfile
FROM kazu_gcc:10.1.0 as builder
LABEL stage=builder

RUN git clone -v https://github.com/simh/simh.git
RUN cd simh ; make i1401 i7010
RUN cd /src ; wget http://blog.livedoor.jp/suzanhud/IBM1401/FORTRAN/FortranIV.tar.xz
RUN apk add xz
RUN mkdir FortranIV ; cd FortranIV ; tar xvf ../FortranIV.tar.xz
COPY tapedump.c /src
RUN gcc /src/tapedump.c -o /src/tapedump

RUN apk update \
    && ALPINE_GLIBC_BASE_URL="https://github.com/sgerrand/alpine-pkg-glibc/releases/download" \
    && ALPINE_GLIBC_PACKAGE_VERSION="2.31-r0" \
    && ALPINE_GLIBC_BASE_PACKAGE_FILENAME="glibc-$ALPINE_GLIBC_PACKAGE_VERSION.apk" \
    && ALPINE_GLIBC_BIN_PACKAGE_FILENAME="glibc-bin-$ALPINE_GLIBC_PACKAGE_VERSION.apk" \
    && ALPINE_GLIBC_I18N_PACKAGE_FILENAME="glibc-i18n-$ALPINE_GLIBC_PACKAGE_VERSION.apk" \
    && apk add --no-cache wget \
    && apk --no-cache add binutils tzdata \
    && cp /usr/share/zoneinfo/Asia/Tokyo /etc/localtime \
    && echo "Asia/Tokyo" >  /etc/timezone \
    && wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub \
    && wget -q "$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION/$ALPINE_GLIBC_BASE_PACKAGE_FILENAME" \
               "$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION/$ALPINE_GLIBC_BIN_PACKAGE_FILENAME" \
               "$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION/$ALPINE_GLIBC_I18N_PACKAGE_FILENAME" \
    && apk add --no-cache \
           "$ALPINE_GLIBC_BASE_PACKAGE_FILENAME" \
           "$ALPINE_GLIBC_BIN_PACKAGE_FILENAME" \
           "$ALPINE_GLIBC_I18N_PACKAGE_FILENAME" \
    && /usr/glibc-compat/bin/localedef -i ja_JP -f UTF-8 ja_JP.UTF-8 \
    && GCC_LIBS_URL="https://archive.archlinux.org/packages/g/gcc-libs/gcc-libs-8.3.0-1-x86_64.pkg.tar.xz" \
    && wget -q -O /tmp/gcc-libs.tar.xz ${GCC_LIBS_URL} \
    && mkdir /tmp/gcc \
    && tar -xf /tmp/gcc-libs.tar.xz -C /tmp/gcc

FROM alpine

COPY --from=builder /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
COPY --from=builder /etc/timezone  /etc/timezone
COPY --from=builder /tmp/gcc/usr/lib/libgcc* /tmp/gcc/usr/lib/libstdc++* /usr/glibc-compat/lib/
ENV LANG=ja_JP.UTF-8 LANGUAGE=ja_JP.UTF-8

COPY --from=builder /src/simh/BIN/i1401 /usr/local/bin/
COPY --from=builder /src/simh/BIN/i7010 /usr/local/bin/
COPY --from=builder /src/tapedump /usr/local/bin/
RUN mkdir /simh
COPY --from=builder /src/FortranIV /simh

docker buildでDockerイメージを作成します。

C:\kazu_simh>docker build -t kazu_simh:i1401 --no-cache=true .
Sending build context to Docker daemon  440.3MB
Step 1/20 : FROM kazu_gcc:10.1.0 as builder
 ---> 944b456d9cd4
Step 2/20 : LABEL stage=builder
 ---> Running in fd896353609c
Removing intermediate container fd896353609c
 ---> 718cb1f5cc36
Step 3/20 : RUN git clone -v https://github.com/simh/simh.git
 ---> Running in 0375d742d08c
Cloning into 'simh'...
POST git-upload-pack (gzip 3227 to 1649 bytes)
Updating files: 100% (1455/1455), done.
Removing intermediate container 0375d742d08c
 ---> 6267cf3915f1
Step 4/20 : RUN cd simh ; make i1401 i7010
 ---> Running in b72bbbd01f50
Illegal option -p
lib paths are:
include paths are:  /usr/bin/../lib/gcc/x86_64-alpine-linux-musl/10.1.0/include /usr/include
using semaphore: /usr/include/semaphore.h
***
*** i1401 i7010 Simulator being built with:
*** - compiler optimizations and no debugging support. GCC Version: 10.1.0.
*** - Per simulator tests will be run.
***
*** git commit id is cb23bca33af7378247a4c5bd71100b6c5e57bd97.
*** git commit time is 2020-05-23T19:06:21+0200.
***
gcc -std=gnu99 -U__STRICT_ANSI__  -O2 -finline-functions -fgcse-after-reload -fpredictive-commoning -fipa-cp-clone -fno-unsafe-loop-optimizations -fno-strict-overflow -DSIM_GIT_COMMIT_ID=cb23bca33af7378247a4c5bd71100b6c5e57bd97 -DSIM_GIT_COMMIT_TIME=2020-05-23T19:06:21+0200  -DSIM_COMPILER="GCC Version: 10.1.0" -DSIM_BUILD_TOOL=simh-makefile -I . -D_GNU_SOURCE -DHAVE_SEMAPHORE -DHAVE_SYS_IOCTL -DHAVE_UTIME -DHAVE_GLOB  ./I1401/i1401_lp.c ./I1401/i1401_cpu.c ./I1401/i1401_iq.c ./I1401/i1401_cd.c ./I1401/i1401_mt.c ./I1401/i1401_dp.c ./I1401/i1401_sys.c ./scp.c ./sim_console.c ./sim_fio.c ./sim_timer.c ./sim_sock.c ./sim_tmxr.c ./sim_ether.c ./sim_tape.c ./sim_disk.c ./sim_serial.c ./sim_video.c ./sim_imd.c ./sim_card.c -I ./I1401 -o BIN/i1401
BIN/i1401 RegisterSanityCheck  </dev/null
 Running internal register sanity checks on IBM 1401 simulator.
*** Good Registers in IBM 1401 simulator.
gcc -std=gnu99 -U__STRICT_ANSI__  -O2 -finline-functions -fgcse-after-reload -fpredictive-commoning -fipa-cp-clone -fno-unsafe-loop-optimizations -fno-strict-overflow -DSIM_GIT_COMMIT_ID=cb23bca33af7378247a4c5bd71100b6c5e57bd97 -DSIM_GIT_COMMIT_TIME=2020-05-23T19:06:21+0200  -DSIM_COMPILER="GCC Version: 10.1.0" -DSIM_BUILD_TOOL=simh-makefile -I . -D_GNU_SOURCE -DHAVE_SEMAPHORE -DHAVE_SYS_IOCTL -DHAVE_UTIME -DHAVE_GLOB  ./I7000/i7010_cpu.c ./I7000/i7010_sys.c ./I7000/i7010_chan.c ./I7000/i7000_cdp.c ./I7000/i7000_cdr.c ./I7000/i7000_con.c ./I7000/i7000_chan.c ./I7000/i7000_lpr.c ./I7000/i7000_mt.c ./I7000/i7000_chron.c ./I7000/i7000_dsk.c ./I7000/i7000_com.c ./I7000/i7000_ht.c  ./scp.c ./sim_console.c ./sim_fio.c ./sim_timer.c ./sim_sock.c ./sim_tmxr.c ./sim_ether.c ./sim_tape.c ./sim_disk.c ./sim_serial.c ./sim_video.c ./sim_imd.c ./sim_card.c -I ./I7000 -DI7010 -DUSE_SIM_CARD -o BIN/i7010
BIN/i7010 RegisterSanityCheck  </dev/null
 Running internal register sanity checks on IBM 7010 simulator.
*** Good Registers in IBM 7010 simulator.
Removing intermediate container b72bbbd01f50
 ---> d11bf767b594
Step 5/20 : RUN cd /src ; wget http://blog.livedoor.jp/suzanhud/IBM1401/FORTRAN/FortranIV.tar.xz
 ---> Running in 3420d73a26b7
Connecting to blog.livedoor.jp (203.104.130.159:80)
saving to 'FortranIV.tar.xz'
FortranIV.tar.xz      51% |****************                | 74743  0:00:00 ETA
FortranIV.tar.xz     100% |********************************|  142k  0:00:00 ETA
'FortranIV.tar.xz' saved
Removing intermediate container 3420d73a26b7
 ---> af4932ed0a56
Step 6/20 : RUN apk add xz
 ---> Running in fe3e86ea3c57
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/community/x86_64/APKINDEX.tar.gz
(1/1) Installing xz (5.2.4-r0)
Executing busybox-1.31.1-r9.trigger
OK: 128 MiB in 59 packages
Removing intermediate container fe3e86ea3c57
 ---> 3eaa6b9e4720
Step 7/20 : RUN mkdir FortranIV ; cd FortranIV ; tar xvf ../FortranIV.tar.xz
 ---> Running in b8b3133f2f60
FortranIV/
FortranIV/generation/
FortranIV/generation/adc00233.tap
FortranIV/generation/deck3.cd
FortranIV/generation/mksystem.ini
FortranIV/generation/system.cd
FortranIV/generation/FortranIV_v2m2.tap
FortranIV/generation/deck2.cd
FortranIV/generation/mksystem.sh
FortranIV/generation/mksystem.bat
FortranIV/generation/mkdeck.lst
FortranIV/generation/deck1.cd
FortranIV/generation/mkdeck.ini
FortranIV/generation/mksystem.lst
FortranIV/generation/deck4.cd
FortranIV/running/
FortranIV/running/sample.bat
FortranIV/running/sample.sh
FortranIV/running/FortranIV_v2m2.tap
FortranIV/running/sample.ini
FortranIV/running/sample.lst
FortranIV/running/deck1.cd
FortranIV/running/system_new.tap
Removing intermediate container b8b3133f2f60
 ---> a4ff0dae4ecb
Step 8/20 : COPY tapedump.c /src
 ---> 7fbc3ee6d9b4
Step 9/20 : RUN gcc /src/tapedump.c -o /src/tapedump
 ---> Running in aeb8e9008f00
Removing intermediate container aeb8e9008f00
 ---> a91f6bceb284
Step 10/20 : RUN apk update     && ALPINE_GLIBC_BASE_URL="https://github.com/sgerrand/alpine-pkg-glibc/releases/download"     && ALPINE_GLIBC_PACKAGE_VERSION="2.31-r0"     && ALPINE_GLIBC_BASE_PACKAGE_FILENAME="glibc-$ALPINE_GLIBC_PACKAGE_VERSION.apk"     && ALPINE_GLIBC_BIN_PACKAGE_FILENAME="glibc-bin-$ALPINE_GLIBC_PACKAGE_VERSION.apk"     && ALPINE_GLIBC_I18N_PACKAGE_FILENAME="glibc-i18n-$ALPINE_GLIBC_PACKAGE_VERSION.apk"     && apk add --no-cache wget     && apk --no-cache add binutils tzdata     && cp /usr/share/zoneinfo/Asia/Tokyo /etc/localtime     && echo "Asia/Tokyo" >  /etc/timezone     && wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub     && wget -q "$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION/$ALPINE_GLIBC_BASE_PACKAGE_FILENAME"                "$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION/$ALPINE_GLIBC_BIN_PACKAGE_FILENAME"                "$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION/$ALPINE_GLIBC_I18N_PACKAGE_FILENAME"     && apk add --no-cache            "$ALPINE_GLIBC_BASE_PACKAGE_FILENAME"            "$ALPINE_GLIBC_BIN_PACKAGE_FILENAME"            "$ALPINE_GLIBC_I18N_PACKAGE_FILENAME"     && /usr/glibc-compat/bin/localedef -i ja_JP -f UTF-8 ja_JP.UTF-8     && GCC_LIBS_URL="https://archive.archlinux.org/packages/g/gcc-libs/gcc-libs-8.3.0-1-x86_64.pkg.tar.xz"     && wget -q -O /tmp/gcc-libs.tar.xz ${GCC_LIBS_URL}     && mkdir /tmp/gcc     && tar -xf /tmp/gcc-libs.tar.xz -C /tmp/gcc
 ---> Running in 376a6670ad62
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/community/x86_64/APKINDEX.tar.gz
v3.11.6-59-g55953a04ec [http://dl-cdn.alpinelinux.org/alpine/v3.11/main]
v3.11.6-60-g1ebe2cad40 [http://dl-cdn.alpinelinux.org/alpine/v3.11/community]
OK: 11270 distinct packages available
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/community/x86_64/APKINDEX.tar.gz
(1/1) Installing wget (1.20.3-r0)
Executing busybox-1.31.1-r9.trigger
OK: 128 MiB in 60 packages
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/community/x86_64/APKINDEX.tar.gz
(1/1) Installing tzdata (2020a-r0)
Executing busybox-1.31.1-r9.trigger
OK: 131 MiB in 61 packages
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/community/x86_64/APKINDEX.tar.gz
(1/3) Installing glibc (2.31-r0)
(2/3) Installing glibc-bin (2.31-r0)
(3/3) Installing glibc-i18n (2.31-r0)
Executing glibc-bin-2.31-r0.trigger
/usr/glibc-compat/sbin/ldconfig: /usr/glibc-compat/lib/ld-linux-x86-64.so.2 is not a symbolic link

OK: 168 MiB in 64 packages
Removing intermediate container 376a6670ad62
 ---> a85f075ed289
Step 11/20 : FROM alpine
 ---> f70734b6a266
Step 12/20 : COPY --from=builder /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
 ---> a2a9a390bdf2
Step 13/20 : COPY --from=builder /etc/timezone  /etc/timezone
 ---> fa1893777b2b
Step 14/20 : COPY --from=builder /tmp/gcc/usr/lib/libgcc* /tmp/gcc/usr/lib/libstdc++* /usr/glibc-compat/lib/
 ---> 5ed30ca186a8
Step 15/20 : ENV LANG=ja_JP.UTF-8 LANGUAGE=ja_JP.UTF-8
 ---> Running in 2e9440c537e2
Removing intermediate container 2e9440c537e2
 ---> c59c1d605952
Step 16/20 : COPY --from=builder /src/simh/BIN/i1401 /usr/local/bin/
 ---> fcc4f8293db4
Step 17/20 : COPY --from=builder /src/simh/BIN/i7010 /usr/local/bin/
 ---> bc2d444c38e7
Step 18/20 : COPY --from=builder /src/tapedump /usr/local/bin/
 ---> c58d48f4628a
Step 19/20 : RUN mkdir /simh
 ---> Running in 1a842458dbd1
Removing intermediate container 1a842458dbd1
 ---> 49bc4587a83b
Step 20/20 : COPY --from=builder /src/FortranIV /simh
 ---> f64cf8da43c2
Successfully built f64cf8da43c2
Successfully tagged kazu_simh:i1401
SECURITY WARNING: You are building a Docker image from Windows against a non-Windows Docker host. All files and directories added to build context will have '-rwxr-xr-x' permissions. It is recommended to double check and reset permissions for sensitive files and directories.
C:\kazu_simh>

イメージができたら動かします。
まず、システム起動用というかFortranコンパイラのテープイメージを作成します。
generation配下にmksystem.shがあり、これを使用します。
行うことは以下の通り。
1)配布テープイメージからカードデッキを作成する。
2)カードデッキを用いて、コンパイラのテープイメージを作成する。

C:\kazu>docker run -it kazu_simh:i1401
/ # cd /simh/FortranIV/generation
/simh/FortranIV/generation # ./mksystem.sh

IBM 1401 simulator V4.0-0 Current        git commit id: cb23bca3
/simh/FortranIV/generation/mkdeck.ini-3> at stkr4 -n deck1.cd
STKR: creating new file: deck1.cd
/simh/FortranIV/generation/mkdeck.ini-4> at -n lpt mkdeck.lst
LPT: creating new file: mkdeck.lst

HALT instruction, IS: 429 (MCW 924 1000)

HALT instruction, IS: 664 (B 525)
/simh/FortranIV/generation/mkdeck.ini-7> c

Unit not attached, IS: 619 (P)
/simh/FortranIV/generation/mkdeck.ini-8> at stkr4 -n deck2.cd
STKR: creating new file: deck2.cd

HALT instruction, IS: 664 (B 525)
/simh/FortranIV/generation/mkdeck.ini-10> c

Unit not attached, IS: 619 (P)
/simh/FortranIV/generation/mkdeck.ini-11> at stkr4 -n deck3.cd
STKR: creating new file: deck3.cd

HALT instruction, IS: 664 (B 525)
/simh/FortranIV/generation/mkdeck.ini-13> c

Unit not attached, IS: 619 (P)
/simh/FortranIV/generation/mkdeck.ini-14> at stkr4 -n deck4.cd
STKR: creating new file: deck4.cd

HALT instruction, IS: 664 (B 525)

HALT instruction, IS: 772 (B 767)
Goodbye

IBM 1401 simulator V4.0-0 Current        git commit id: cb23bca3
/simh/FortranIV/generation/mksystem.ini-2> at mt4 FortranIV_v2m2.tap
Tape Image 'FortranIV_v2m2.tap' scanned as SIMH format.
contains 186827 bytes of tape data (648 records, 1 tapemarks)
A potentially unreasonable number of record sizes(31) vs tape marks (1) have been found
The tape format (SIMH) might not be correct for the 'FortranIV_v2m2.tap' tape image
/simh/FortranIV/generation/mksystem.ini-3> at -n mt1 work.tap
MT: creating new file: work.tap
/simh/FortranIV/generation/mksystem.ini-5> at -n lpt mksystem.lst
LPT: creating new file: mksystem.lst

HALT instruction, IS: 7718 (B 7711)

HALT instruction, IS: 1956 (B 1300)
/simh/FortranIV/generation/mksystem.ini-10> at mt4 work.tap
Tape Image 'work.tap' scanned as SIMH format.
contains 8809 bytes of tape data (12 records, 1 tapemarks)
A potentially unreasonable number of record sizes(9) vs tape marks (1) have been found
The tape format (SIMH) might not be correct for the 'work.tap' tape image
/simh/FortranIV/generation/mksystem.ini-11> at mt1 FortranIV_v2m2.tap
Tape Image 'FortranIV_v2m2.tap' scanned as SIMH format.
After processing 127627 bytes of tape data (56 records, 1 tapemarks)
Read Tape Record Returned Unexpected Status: invalid record length
63936 bytes of unexamined data remain in the tape image file
A potentially unreasonable number of record sizes(30) vs tape marks (1) have been found
The tape format (SIMH) might not be correct for the 'FortranIV_v2m2.tap' tape image

HALT instruction, IS: 1956 (B 1300)
Goodbye
/simh/FortranIV/generation #

次に作ったコンパイラのテープイメージを使ってプログラムをコンパイルし、実行します。

/simh/FortranIV/generation # cd ../running/
/simh/FortranIV/running # ls
FortranIV_v2m2.tap  sample.bat          sample.lst          system_new.tap
deck1.cd            sample.ini          sample.sh
/simh/FortranIV/running # ./sample.sh

IBM 1401 simulator V4.0-0 Current        git commit id: cb23bca3
/simh/FortranIV/running/sample.ini-3> at mt1 FortranIV_v2m2.tap
Tape Image 'FortranIV_v2m2.tap' scanned as SIMH format.
contains 186827 bytes of tape data (648 records, 1 tapemarks)
A potentially unreasonable number of record sizes(31) vs tape marks (1) have been found
The tape format (SIMH) might not be correct for the 'FortranIV_v2m2.tap' tape image
/simh/FortranIV/running/sample.ini-4> at mt3 -n scratch.mt3
MT: creating new file: scratch.mt3
/simh/FortranIV/running/sample.ini-5> at mt4 -n scratch.mt4
MT: creating new file: scratch.mt4
/simh/FortranIV/running/sample.ini-6> at mt5 -n scratch.mt5
MT: creating new file: scratch.mt5
/simh/FortranIV/running/sample.ini-7> at mt6 -n scratch.mt6
MT: creating new file: scratch.mt6
/simh/FortranIV/running/sample.ini-9> at lpt -n sample.lst
LPT: creating new file: sample.lst

HALT instruction, IS: 1956 (B 1300)

HALT instruction, IS: 1956 (B 1300)
/simh/FortranIV/running/sample.ini-14> at mt1 scratch.mt4
Tape Image 'scratch.mt4' scanned as SIMH format.
contains 195370 bytes of tape data (652 records, 1 tapemarks)
A potentially unreasonable number of record sizes(33) vs tape marks (1) have been found
The tape format (SIMH) might not be correct for the 'scratch.mt4' tape image
/simh/FortranIV/running/sample.ini-15> at mt4 -n system_new.tap
MT: creating new file: system_new.tap

HALT instruction, IS: 1956 (B 1300)

HALT instruction, IS: 3086 (B 3079)
Goodbye
/simh/FortranIV/running #

実行結果はsample.lstに出力されます。

/simh/FortranIV/running # cat sample.lst
                         FORTRAN   RUN                                                      000SAMPL
FORTRAN COMPILATION  VER 2 MOD 2
$NO MULTIPLY DIVIDE
     C     SAMPLE PROGRAM TO TEST SYSTEM
     C                                                                       003SAMPL
     C     PROGRAM FOR FINDING THE LARGEST VALUE                             004SAMPL
     C       ATTAINED BY A SET OF NUMBERS                                    005SAMPL
001        DIMENSION A(12)                                                   006SAMPL
002        READ (1,1)N,(A(I),I=1,N)                                          007SAMPL
003      1 FORMAT (I3/(12F6.2))                                              008SAMPL
004        BIGA=A(1)                                                         009SAMPL
005        DO 20 I=2,N                                                       010SAMPL
006        IF (BIGA.LT.A(I)) BIGA = A(I)                                     011SAMPL
007     20 CONTINUE                                                          012SAMPL
008        WRITE (3,2)N,BIGA                                                 013SAMPL
009      2 FORMAT (21H1THE LARGEST OF THESE,I3,11H NUMBERS IS,F9.2)          014SAMPL
010        STOP                                                              015SAMPL
011        END                                                               016SAMPL

NAME DICTIONARY
  00126 A       00131 N       00136 I       00149 BIGA

 SEQUENCE NUMBER DICTIONARY

   002-00151   004-00170   005-00182   006-00205   007-00249   000-00249   008-00253   010-00272

   011-00282   001-00292   002-00292   003-00355   008-00408   009-00423   011-00506

                         LOADER    RUN                                                      017SAMPL

$NAME MAP                                                               018SAMPL

$STORAGE PRINT                                                          019SAMPL

                                          *** NAME MAP ***

05851  ///      06210  )C       06673  )D       07036  )A       07223  )B       06850  ,9
07982  *1       06677  )F       06745  )G       08003  *3       08024  LINK     06797  )H
07673  G.       07752  P.       07511  Q.       07472  H.       07319  M.       06206  )E
06850  ,0       06902  (0       06914  (1       06966  (2       06986  (3       06946  (4
06926  (5       07249  Z)1      07128  Z)       07290  Y)       07183  U)       07224  V)
07645  G.3      07672  G.1      07609  G.2

                                       *** END OF NAME MAP ***



                                                 *** STORAGE PRINT ***

                                                                                              X1 O42     X2 P42     X3 /0U

05700 X0|     01??0?
              1111
05800 Y0|                                            1?A            2BL29I8S1M X0|0!5VZ9S B|45Y2W>Y4 Z|BO7XBP4V Y3WY5|Y3/X
                                                     1 1            11   1  11 1  11  1   1   1  1    11   1    1  1  1  1
05900 Z0|    0SZ5TB|45Y 4Z-$Y3WY3Y $Y3W5Z4Z|B |45$Y3WY3Y $Y3W>Y4Z|B Y8WBL2900L 2MX0|0J2TJ 0YB02MZ8/D ETB02MZ9/D ETBR75YC/(
               1  1   1   111  1   11  1   11    11  1   11  1   11    1   1   111  11  1   1   1  1   1   1  1   1   1  1
06000 !0|    B!2UBR75$Y 3WY3Y$YTW( BP9XBO7XBP 4VY3WY3ZY3 /X0S!5/B!0 UB?93BF7T0 01BG5S0010 03IBE1//BF 7T001BG5S0 12006F002B
             1   1   11   1  11  1 1   1   1    1  1  1   1  1  1    1   1   1   1   1  1   11   11    1  1   1   1  11  1
06100 J0|    D7SBE1/ BR 75YC/YUZ(B ?93BF7T001 BC1Z0211TH E LARGEST  OF THESEBG 5S001003IB C1Z011 NUM BERS ISBG5 S001009F00
                1   11    1  1  11    1   1   1   1  1                      1    1  1  11    1  1           1    1  1  11
06200 K0|    2BE1/ HO7T HO3W0?0HK7 WHO4T0!0HO 5|0|0MO7T0 99,0?10?4M 0?3K8TM0?6 K9|)0?10?4 H099000HK9 X000HL0U00 0H089000H0
              1   11    1      1    1      1       1       1      1       1       1       1      1       1       1      1
06300 L0|    94000MO7T0 99HO5U0?7? 0|0O7VYO7U 0|0BM6/0?0 (C0|00!0H0 99,0?0Q099 S0!0)0?1HM 5W0!0?0?0O 7WYO7U0!0Y O7U0?0BM2S
                  1       1      1       1       1        1      1    1   1    1   1   1       1       1      1       1
06400 M0|    0?00A0|00! 0SO7U0?0BL 8ZVM5|0?01 D0!0Q094D0 ?0Q099BL8Z H094000BN9 WD0!0Q099C 0?00|0Q094 ,0!1VN1|0? 12?0?1O7WY
                 1       1      1    1        1   1   1    1   1    1      1    1   1   1       1    1   1        1      1
06500 N0|    O7U0?1,N5U S0|00?1VN3 W0?1KAO7U0 !0BN1|A0|0 0?1YO7U0?1 BN8/NH0990 ?1H0940!1) 0!0,0!1BM8 U)N5UYO7W0 ?1)0!1VO5V
                   1    1      1        1       1   1       1       1    1       1      1    1   1    1   1       1   1
06600 O0|    O7VKVO6TO7 WK?0!0YO5/ O1SYO7V0|0 H099000H09 4000H08900 0B000VO1SO 7WK!O1SBO1 S   1  H09 4H0940!4HP 3W0?0M9560
                 1        1   1       1       1      1       1       1   1        1   1    1  1111    1      1       1
06700 P0|    99M0!5P1S? 000QBZM0!2 P2ZLQBZ000 H099000,P9 WBP5TH094) P9WM0!2Q0T M0J1M0!8Q0 XM0!2Q1UM0 J4Q2/HQ2Z0 J5B0J5NA00
               1      1       1       1       1      1    1   1   1    1       1   1       1      1       1       1   11
06800 Q0|    0000?000Q4 ZS000Q4ZV0 00Q4ZKB000                       BR0S0!40BR 1U0!41BR6W 0!42BR8W0! 43BR4W0!44 BR2W0!45.5
                 1       1      1        1    1                     1       1        1        1        1        1       1
06900 R0|    40B?0W222  B?1XB?1X22 2 B?0WB?0W 222 V?0W2G 9BB?1XB?0W 222 V?0W2G 9KB?1XB?1X 222 V?0W2G 9BB?1XB?1X 222 V?0W2G
               1        1   1        1   1        1        1   1        1        1   1        1        1   1        1
07000 ?0|    9KB?1XM0!7 094B0!0B0! 90!8|H/020 !4BU63SB9| M0!6?6UM0! 3?5X?000B9 XL000C0SBK 0W9601'B9X C0YAC0YB9| CB8XB9SBB6
               1   1       1   1        1       1   1    1      1       1       1      1        1       1       1      1
07100 A0|    XTBA2/0!7$ H0940!6B?4 |HA8TA8USC 1TB9|BA4|Z AC1VB8XBA4 |ZYB8WB9|? B8Y090YAYW B8YMB9|089 B000=0J008 9Y0!9088H0
               1        1      1    1      1       1     1      1     1      1       1       1       1   1       1      1
07200 B0|    940!7BB2U0 !4,H0940!4 B000M0!7B3 XM089000H/ 020!4BX47M 0!7B6S=089 000BB3YBY7 6SSEN!02.B 6X2SKB      15
                  1        1       1   1       1      1       1   1       1       1   1    1  1   1    1   1     1 1    1
07300 C0|             1 60009F   M 0!6K81,D2Y M089K84=K2 0K81AK81K8 4CL02K84BD 3WUH0940!7 AK81089=K8 1094BD0TL1 61M0!01T2B
                      1     1    1       1    1      1       1       1      1     1       1      1       1        1      1
07400 D0|    D1|M1T20!0 H0940!1H08 90|1BB18K2 4*BO00ML02 K84S089K84 MK84K81BQ1 8E06)D2YBC 6TH094=K20 K90CK03K90 BF4VSBB18T
                1       1      1       1        1   1       1       1      1    1  1   1    1   1       1       1    1
07500 E0|    MK96094BB1 8BE5U0!4/B E4SK99=VE5 |K751BQ18E 05,K75BO00 )K75H003E6 ZV003L17SB E9V0!4/MF7 SL24=F0YL2 4BF0ZHL240
             1      1    1       1        1        1   1   1   1    1   1       1       1        1       1       1   1
07600 F0|    !5BO59I9CH G5|000HG4X 000MG5|G4U MMMMHK9000 0BO59MG2WK 90MG2TK96P G2XG2/BB18    MG4UG5| MMMMMK90G2 WMK96M0!6K
               1   1  1       1       1       11111       1   1       1      1       1    1  1       11111       1   1
07700 G0|    90H0940!7H K96HF7SBB1 8                                 |BO00K99= M0J0L12,04 2045M0J304 7M0!9044HK 740?0HK710
               1      1    1   1    1  1  1      1     1      1      11        1      1       1       1      1       1
07800 H0|    !0VH2/L281 M0!6K62,L2 8M044094A0 89094=K200 94CL02094B I7VUHK680! 1HK650!0DK 17001YK980 01YK35I1ZH I7UC41BI2X
               1        1      1    1      1       1       1      1     1       1      1       1       1      1       1
07900 I0|    L12LBI4VL1 2IBI5W001  BQ06E03YK3 4I1ZHI7U00 3BI1SYK36I 1ZBI1SYK17 K98B003L12 ABI7UBQ06E 041INP
                 1        1        1   1  1       1       1   1       1   1       1        1   1   1   11
08000 00!       3LST                   H089M0 |203QM04J9 25B555
                11                     1   1       1       1   1

                                                    *** END OF STORAGE PRINT ***


$EXECUTION
THE LARGEST OF THESE 12 NUMBERS IS  9876.54
                                   PAUSE PRESS START TO UPDATE SYSTEM WITH PHASE            023SAMPL
                                   UPDAT79F,INSERT                                          024SAMPL
                                   UPDAT///,INSER                                           113SAMPL
                                   NOTE DIAL TAPE UNIT 4 (WORK1) TO UNIT 1 (SYSTEM)         159SAMPL
                                   NOTE GET NEW SCRATCH TO TAPE UNIT 4 (WORK1)              160SAMPL
                                   PAUSE DIAL OUT AND SAVE MASTER SYSTEM TAPE, PUSH START   161SAMPL
                         PRODUCTIONRUN  ///                                                 162SAMPL

THE LARGEST OF THESE 12 NUMBERS IS  9876.54
                                   PAUSE PRESS START TO DELETE PHASE FROM SYSTEM            165SAMPL
                         FORTRAN   UPDAT///,DELETE                                          166SAMPL
                                   HALT  SAMPLE PROGRAM COMPLETE, ALL SYSTEMS ARE GO.       167SAMPL
/simh/FortranIV/running #

せっかくなのでDockerfileなどをgithubに登録しました。

今回は、Dockerイメージを作るのに、multi stage buildを使っています。ビルドした際の最初のステージのイメージも残ります。

C:\kazu_simh>docker images
REPOSITORY                               TAG                 IMAGE ID            CREATED             SIZE
kazu_simh                                i1401               e2a89e7eec90        8 seconds ago       9.1MB
<none>                                   <none>              f52ab37c6026        9 seconds ago       385MB

このイメージを使って他のシミュレータを作っても良いのでリネームしましょう。

C:\kazu_simh>docker tag f52ab37c6026 kazu_simh:build

ラベルを付けていますので、削除するなら以下を実行します。

C:\kazu_simh>docker image prune --filter label=stage=builder

変更履歴

(2019/10/21)マルチステージのbuildでlabelを付けた。また、削除時ラベルを用いるように修正。
(2020/5/24)使用するgccを10.1.0にバージョンアップ。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0