Skip to content

About

My Pascal CourseWork

Resources

Stars

3 stars

Watchers

2 watching

Forks

Latest commit

 

History

38 Commits

Folders and files

Repository files navigation

pascal Course Work

This is my course work that I wrote in Pascal and Assembler, I did it in the second year of studying at SEUA. Then I still was a novice in programming, so do not judge strictly 😄

Play it in the browser: https://coursework.otanim.com

How to run

The game is a DOS program, so it runs in DOSBox Staging. From the repository folder:

dosbox bin/COURSE.EXE

COURSE.EXE carries its own graphics driver and Armenian font, so it needs no other files and works with any DOSBox keyboard layout. Problem 547 saves the matrix as 547.TXT next to COURSE.EXE.

How to build

./build.sh compiles src/_main/COURSE.PAS and its units into bin/COURSE.EXE with Turbo Pascal 5.5, which Embarcadero offers as a free download. It runs DOSBox Staging without a window, and links in EGAVGA.BGI from Turbo Pascal with BINOBJ. The source is kept as UTF-8, so the script first uses python3 tools/akconv.py to give the compiler copies in the DOS encoding.

The script expects Turbo Pascal in ~/.local/opt/tp55, with BGI.ARC and UTILS.ARC unpacked there (for GRAPH.TPU, EGAVGA.BGI and BINOBJ.EXE), and DOSBox Staging in ~/.local/opt/dosbox-staging-v0.83.0. Set TP55 or DOSBOX to use other locations.

Files

  • src/_main/COURSE.PAS: the program, which starts the graphics, the fonts and the mouse and runs the desktop, and its units, each using only those listed before it: SHARED.PAS (the keys, the mouse and its cursor, the fonts, centred text, the clock, waiting for a key or a click), MENUS.PAS, TRON.PAS, P547.PAS (Problem 547) and DESKTOP.PAS (with the fake Blue Screen). All of them are stored as UTF-8. Its Armenian texts must stay within the letters and marks the DOS font has: write եւ, not և, and Armenian punctuation, ՛ or ՞ after the stressed vowel, never ! or ?.
  • src/_main/GRMOUSE.PAS: the graphical mouse unit. It talks to the DOS mouse driver; the Turbo Pascal 7 original did this in inline assembler.
  • src/_main/ARMFONT.INC: the Armenian 8x8 font the program draws its texts with.
  • src/_main/FONT16.INC: the 8x16 characters the rules of Tron are written in, taller than the 8x8 ones: the VGA's own, and FONT.COM's Armenian ones. tools/font16.sh makes it again, running FONT /A and tools/FONTDUMP.PAS in DOSBox without a window.
  • bin/COURSE.EXE: the ready-to-run program.
  • package.json: lets other projects, like the coursework.otanim.com website, install COURSE.EXE from a release tag (github:otanim/pascal-coursework#v2.1.7).
  • tools/akconv.py: converts between UTF-8 and the AK Yerevan DOS encoding the font uses.
  • tools/FONT.COM: the Armenian font driver from 1990 that ARMFONT.INC comes from. To edit in the Turbo Pascal editor, make a DOS copy with tools/akconv.py encode and run FONT /A first.

Demonstration

YouTube

Screenshots

Desktop

alt text

Tron: logo

alt text

Tron: game

alt text

About

My Pascal CourseWork

Resources

Stars

3 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages