Apr. 5th, 2023

grimjim: infinite voyage (Default)
Tonight I was pleasantly surprised that I found the bulk of the source code to an old roguelike that I had mostly authored (with some contributions) from 1988-9. I'd previously thought the game had been lost.

The abomination dumped raw VT100 escape codes to the screen, partly to leverage using a few lines as a scrolling window for text, and made library calls to get direct keyboard input. The code was mostly VMS Pascal, though I lifted the random number generator from the VMS BASIC library that was also available via a BASIC wrapper so I could link the object files together.

procedure smg$read_keystroke(
    keyboard_id:unsigned;var terminator_code:integer;
    prompt:packed array[a..b:integer]of char;timeout:integer); extern;
procedure smg$create_virtual_keyboard(
    var new_keyboard_id:unsigned); extern;


It's remarkable how far I had to go in order to write a game for VAX VMS. There was no C compiler available, but BASIC and Pascal were regularly part of coursework.

FUNCTION INTEGER RANDB (INTEGER x)
IF (x=0%) THEN RANDOMIZE
END IF
RANDB=INT(x*RND)+1%
END FUNCTION


I may have found a new hobby project for a port to modern Unix/ncurses.

Profile

grimjim: infinite voyage (Default)
grimjim

July 2025

S M T W T F S
  12345
6789101112
13141516171819
20212223242526
272829 3031  

Style Credit

Expand Cut Tags

No cut tags
Page generated Aug. 9th, 2025 04:18
Powered by Dreamwidth Studios