Giter VIP home page Giter VIP logo

dispak's Introduction

Simulator of BESM-6 computer at user level

The simulator takes a pack of punch cards on input and runs them as a task for DISPAK operating system. Calls to the OS (extracodes) are simulated as needed. Tasks can run either in batch mode, or in interactive mode.

A format of the input is described in Input-Format.

The simulator consists of three components:

  • dispak - the simulator
  • besmtool - a utility for dealing with images of BESM-6 disks and tapes
  • disbesm6 - a disassembler of BESM-6 binaries

Build

mkdir build
cd build
cmake ..
make
make install

Testing

To run all available tests:

cd build
make test

Expected output:

$ make test
Running tests...
Test project /Users/vak/Project/Besm-6/dispak/build
    Start 1: algol-besm6
1/3 Test #1: algol-besm6 ......................   Passed    0.05 sec
    Start 2: algol-gdr
2/3 Test #2: algol-gdr ........................   Passed    0.06 sec
    Start 3: fortran-dubna
3/3 Test #3: fortran-dubna ....................   Passed    0.09 sec

100% tests passed, 0 tests failed out of 3

Total Test time (real) =   0.20 sec

To see, why a particular test fails, use:

cd build
ctest -V -R test-name

dispak's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dispak's Issues

A bug in "stay resident" mode of E66

The following program will result in a segmentation fault when the two marked lines are uncommented

шифр 419900зс5^
еев1а3
*name gost-10859
*assembler
*bemsh
inp$$$
main start 1
 vtm '30000'(13)
 *66 is
 atx '10'(8)
* *66 is        <--- uncomment to 
* atx '10'(8)  <--- cause a crash
printo extrd printo
 vtm res(14)
 its 14
 vtm res+len-1(14)
 its 14
 vtm N(14)
 its 14
 vtm M(14)
 its 14
 vjm printo(13)
 *74
N dc b'30'
M dc b'2'
is atx start
 atx fin-1
 atx
 atx res
 dc b'-1'
rep equ 2
start nop
 dc (rep)b'7'
 dc (rep)b'1'
 dc (rep)b'5'
 dc (rep)b'12'
 dc (rep)b'6'
 dc (rep)b'10'
 dc (rep)b'3'
 dc (rep)b'4'
 dc (rep)b'2'
 dc (rep)b'11'
fin nop
len equ fin-start
res dc (len)b'0'
 fin
eoi$$$
trn$$$
0-0
end$$$
*main main
*execute
*end file
<6 ` characters>
еконец 

GCC is stricter than clang when -Werrors is set

cu.c:66:9: error: this ‘else’ clause does not guard... [-Werror=misleading-indentation]
   66 |         else
      |         ^~~~
cu.c:260:17: note: in expansion of macro ‘CHK_STACK’
  260 |                 CHK_STACK;
      |                 ^~~~~~~~~
cu.c:67:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘else’
   67 | #define GET_OP  {\
      |                 ^~
   68 |                 LOAD(enreg, XADDR(addr + reg[ui.i_reg]));\
      |
cu.c:67:17: note: in definition of macro ‘GET_OP’
   67 | #define GET_OP  {\
      |                 ^~
   68 |                 LOAD(enreg, XADDR(addr + reg[ui.i_reg]));\
      |

besmtool dump chokes on nonexistent zones

besmtool dump terminates its copy loop when it encounters a nonexistent zone. There are 2 issues with that:

  1. It does so silently, giving the user the idea that everything is a-ok (unless the user cares to check and see that too few zones have been copied). A more prominent warning/error message should be in order.
  2. There needs to be at least an option to proceed with the copying and supply a blank page (разметочный код) for the missing zone contents. Otherwise, dumping a sparse disk becomes a really tedious exercise.

A bug in native implementation of E64

The following program produces (using standard program 4) a nicely formatted code printout by default, and a corrupted one with -x

шифр 419900зс5^
еев1а3
*name gost-10859
*assembler
*no list
*no load list
 program: ,name,
 13,vtm,4096
 ,*66,adr
 , ,4
 ,*74,
 a1:,xta,a
 ,a/x,b
 ,a*x,c
 ,arx,=1
 adr:, ,a1
 , ,a1+2
 a:,real,5.0
 b:,real,6.0
 c:,real,-7.0
  ,end ,
*execute
*end file
<6 ` characters>
еконец

aclocal version

The build process is bitching about not being able to find aclocal-1.11, because my aclocal is 1.13.
I am seeing, that aclocal-1.11 (the version part) is [semi]hardcoded in aclocal.m4.
Is this the intention and how can I straighten this out?

besmtool wouldn't recognize a disk

besmtool list's idea of what is a disk file is too restrictive compared to that of the emulator.
It is sufficient to
echo -n DISK > 1234
for the emulator to view 1234 as a valid disk, while besmtool wouldn't recognize it as such.

Особенность сборки/установки

На одной из Linux машин вылезла интересная вещь.
После запуска ./configure --prefix=некоторый_путь, а затем сборки make проходит компиляция и скачивание дисков.
Также успешно генерируются диски, но почему-то не всегда переносятся в этот --prefix по команде make install в итоге dispak работает, но выдает ошибку переполнения АУ.
Помог запуск его с помощью strace для определения путей и подсовыванием дисков в $HOME/.besm6/
Может этот способ починки еще кому-то поможет.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.