
I also ran into a bit of a problem with Edit on simh, specifically with keyboard mapping. Edit has two modes, Command and Edit. Command (designated by a leading # on the line) let's you do stuff like save/load buffers, delete lines, etc. Edit mode is for entering text, and obviously it treats whatever you type as text to be saved in the file. When you're done entering text, you have to switch back to Command mode, and according to the OS/8 handbook, you do this with the Ctrl-FORM key combo. But there is no FORM key, of course. I tried Ctrl with a bunch of keys - Home, End, Delete, etc. - but none of them worked. I finally found a blog Editing Files on a PDP-8 Using OS/8 EDIT where the guy was doing a lot of what I'm doing now, playing with OS/8 using the simh emulator. It was here that I found out that Ctrl-L will switch from Edit to Command mode. I'll probably start taking a look at TECO to see if it's any better.
It was actually trying to figure out Edit that took me the most time in getting my HELLO program to run, but it wasn't the only issue. The aforementioned blog also had a very nice post on writing Hello World in Fortran, including going through the steps of compiling and executing the program, but unfortunately this turned out not to work on my system. OS/8 has a command called COMPILE that, as you might have already guessed, compiles programs. But this command isn't specific to Fortran - it compiles any of the native OS/8 languages: the three or four assembly languages; Fortran II; and Fortran IV. It uses the source file's extension to figure out what actual compiler to invoke, and then runs it through the whole chain of programs (Fortran IV, for example, uses four or five separate programs to do a full compilation). But I recall reading in the OS/8 Handbook that the COMPILE command will only work if the compiler was installed at the time the system was setup. As the blogger indicates, his Fortran was not working when he first tried it, so he had to go and install it manually on his OS/8 system. So I assume this is why COMPILE did not work for him. Instead, he had to invoke the Fortran compiler directly using the command, RUN F4. So I did this, and while the command itself gave me no errors, the resulting HELLO.LD file would not run as his did when I did, EXECUTE HELLO. But my COMPILE did work, and it generated a HELLO.RL file which did work with the EXECUTE command, as shown above.
So I got the basic steps down, which means I can move on to actually writing my game. And on that front as well I have a little news - I have decided to write Hammurabi. For those who aren't familiar with it, this is a pretty simple game (usually written in BASIC) where the player has to rule a small kingdom, feed his people, plant crops, and try and keep everyone from starving (usually eventually failing). I remember having a lot of fun with it back in the day when I was a teenager. Unfortunately, it really does have a pretty simple strategy, and you'll either win or lose based mostly on luck. But I'm hoping to add features that will change that while hopefully still maintaining the essence of the game. But first, I just want to implement the basic game, so that's next.
No comments:
Post a Comment