Short Story Title: Tic-Tac-Toe
Story Type: Fiction
This Short Story is Chapter Two of "Early Microcomputer Experiences"
Date Written: June 23, 2019
Written By: Joel T. Kant
Copyright (c) June 23, 2019
One week into my first semester of my Freshman year, many students left campus for the three-day Labor Day weekend but I didn't go home. On Labor Day evening, most of the students who had left reappeared on campus.
I saw Albert Rose get out of a car with a duffle bag and a briefcase. Carrying a duffle bag after a weekend home was common, about the right space for clothes for a long weekend, but most students did not carry a briefcase.
I asked, "What's up with the briefcase?"
Albert replied, "I have a home computer in it."
There was no possible way an Apple II computer like those in the MSLC could fit in a briefcase even without the disk drives and monitor. Curious, I followed Albert up to the dorm room he shared with Josh Cistern. Josh was already in the room when we came in. Both Albert's bed and Josh's bed were raised up on 4 inch-by-4 inch wooden beams. On Albert's side of the room, a 20" CRT color television filled much of the space under the bed.
Albert announced to Josh and me as he popped own the briefcase, "Here's my new computer. It's a Sinclair ZX-80."
Josh and I peered at it. It was only slightly larger than a fancy calculator. It was less thick that most paperback books. The case was white plastic, and it had a flat membrane that looked like keys were merely painted on. Looking closer, I could see it was like the flat membrane on some microwave ovens. Also in the briefcase were a tape recorder, various cables, and a big switch that went to a TV.
I skeptically asked, "That little thing is a real computer?"
Albert affirmed, "Yes. It has a Z-80 microprocessor, which is the same as what the Radio Shack TRS-80 uses. That's what the 80 stands for in the TRS-80 name. However, this is much cheaper! I ordered it as a kit I would have to solder because that was $100 because if ordered already soldered it cost $150. Yet, to my surprise, it came already soldered and preassembled. Help me pull out the TV a couple feet."
Albert used a screwdriver to install the switch to the back of the TV, then hooked the cable to one end. He hooked the other end to a cable that he then attached to the Sinclair. We shoved the TV back in place. Albert messed with some cables some more, and soon had the Sinclair and tape recorder in front of the TV, sitting on the floor. He turned both on, then sat on the floor himself.
Sure enough, the TV showed a computer prompt!
Albert demonstrated a simple program that inputted a character string, then printed it back on the screen. He had Josh try it. Josh did so, getting characters wrong if he looked away from the keyboard to watch the screen. Only if he looked at the screen when typing did what he wanted get entered.
Josh went to the BASIC code. He said, "I'm going to enter another PRINT line."
He entered the line number, then typed P and then R. The screen had the word PRINT and then R.
Albert instructed him, "The BASIC commands are tokenized. Look at the keys. Each has a BASIC command printed on it. It saves typing."
Josh entered a couple more lines and said, "It may save you typing, but I'm finding it hard."
I suggested, "That may be because you're a touch typist so could type the whole command letter by letter faster than Albert can push the one key."
Albert said, "It becomes natural for one key for one command as you get used to it."
There was a knock at the room door. Albert opened it. Bruce Brown stood there with the FORTRAN textbook and a handout from Computer Programming in Engineering. His eyes bugged out as he saw Josh sitting on the floor with the Sinclair computer and tape recorder, then the big 20" color television showing the display.
Albert explained what his Sinclair was to Bruce.
Bruce asked, "Does it use the BASIC computer language?"
"Yes," Albert replied.
Bruce said, "I'll be right back!"
Still seated on the floor, Josh wondered, "I wondered what that was all about?"
We soon found out as Bruce rushed back with a big book, but had left his FORTRAN book and course materials behind.
Bruce explained, "This is BASIC Computer Games by David H. Ahl. It's a famous book. Let's try some of the games from it!"
Albert took the book and flipped through it, then pointed out, "My Sinclair is so inexpensive because it only has one kilobyte of RAM. Not all those programs will fit."
Bruce took the book back, flipped around, and said, "Here's a very short one. It's a number guessing game. Let's try it."
Josh did most of the typing. Various errors were made, then fixed. After a while, the game was working. In my opinion, it was more fun learning how the game worked then actually playing it. The random number generator was used, modified by a formula, to give a number between 1 and 100. You chose a guess, usually 50. The program said if the actual number was that number, higher, or lower. You had five guesses. That was the entire game. We played several times. Sometimes, we got it in five tries, sometimes not.
I glanced at my watch and did a double-take, and said, "It's after midnight, and I got class tomorrow morning. See you later!"
The other three didn't seem to care that it was after midnight as they were looking in the book for a better game, but I did and left.
About a month later, Albert, Josh, Xavier, Bruce, and I were all waiting for lecture to start in Computer Programming for Engineering. Xavier had obviously seen Albert's Sinclair at some point when I wasn't there because he said, "The Apple II computers in the MSLC have 16 kilobytes and two disk drives each. Having only 1 kilobyte and a tape recorder is a mere toy in comparison. Those games you showed me on the Sinclair are so bad compared to the Apple II games!"
Josh suggested, "Xavier, Bruce, and Joel, come around to our room at around nine pm tonight, and we'll show you something amazing. We might be able to change Xavier's opinion on the value of the Sinclair ZX-80."
Albert did not look so thrilled about his roommate Josh's offer inviting a crowd over at that late time, but made no complaint either.
Xavier said, "That's fairly late."
Josh remarked, "There's a reason."
Josh would not say what the reason was. Albert clearly knew the reason, but played along and would not tell us.
Therefore, promptly at nine pm, both Xavier Carter, Bruce Brown, and I were knocking on Albert and Josh's dorm room door. Josh opened the door. Albert sat on the floor with the Sinclair and tape recorder in front of him. The TV showed the computer display. Something new was a big, tan box. It was larger than the Sinclair itself. It had two black rubber pieces on top.
Albert explained in a tone that quite similar to that of Dr. McCullen himself, "This is a 300 baud acoustic modem."
Josh put in, "Albert got the serial port voltages from the Sinclair converted to true RS-232 voltages, then I wrote a terminal program. The reason I specified come at nine pm is the Computer Center just closed."
Albert dialed on the dorm room phone, listened, then set the phone receiver into the black cups. It fit perfectly. He then typed on that flat keyboard where the keys did not press in.
The TV showed, "USERNAME:"
Albert logged in successfully. He was on the PDP/11 mainframe, doing it from his dorm room!
Albert apologetically said, "There are faster modems than 300 baud, but this is all I can afford. I bought this one at a ham radio festival."
I watched them work. Despite the slowness of the modem communication, because almost nobody else was logged into the PDP mainframe since the Computer Center was closed, it was like a completely different mainframe! The response was so fast! It did not take many seconds after tying a key for it to appear like during the daytime on the proper terminals.
Xavier, Bruce, and I had much praise for this accomplishment.
Xavier tried it and remarked, "If this just had a real keyboard, I'd stop using the VT-100 terminals or the punchcard machines, and just do my work on this! Remember when I asked Professor McCullen the first day of class if the Apple II's in the MSLC could be used as a terminal to the PDP? This is just what I meant!"
That weekend, I stopped by Josh and Albert's room. Bruce and Xavier were using Albert's Sinclair while he sat at the desk doing homework the old fashion way.
Albert mentioned to me, "Josh's not here this weekend. He found a ride back to Irate City where his parents live."
I was surprised as there was nothing special about this weekend.
When the weekend was over and the regular group of us were waiting once more for Dr. McCullen to start his lecture, Josh Cistern told us, "You've got to come to my room and see what I bought this weekend."
Albert Rose clearly already knew and seemed...jealous.
Not waiting until nine pm like that other time but going right after class, the group of us trooped over there. Josh dramatically threw open the door and pointed at his desk. On the desk sat a portable color television. I later found out it was 14" diagonally. While much smaller than the 20" diagonal television that Albert used, this was much smaller and fit on the desk. There was a tan tape recorder on the desk with the brand name Commodore stamped on it. There was also what looked like a very fat keyboard in front of the TV. It had proper keys that pressed. When Josh flipped a couple switches, the color TV displayed, in blue letters on a white background "**** CBM BASIC V2 ****, 3583 BYTES FREE, READY."
Josh explained to us all, "This is a Commodore Vic-20 computer."
Xavier Carter said, "That's still just a tape recorder for storage, not disk drives like on the Apple II. Plus, 3538 bytes while over triple what Albert's machine has still isn't very much."
Bruce said, "Some of the games from my BASIC Computer Games book still won't fit in three and a half kilobytes."
Josh pulled out what looked like a game cartridge for an Atari game console and said, "Watch this."
He turned off the computer. I realized the computer was all inside the enclosure of the fat keyboard. That would have surprised me, but there was more space under that fat keyboard that could almost hold two of Albert's Sinclair ZX-80 computers, I was not really that surprised the motherboard of a computer fit under the keyboard in the enclosure. Josh plugged the cartridge in the back, and turned the computer back on.
The TV now read, "6655 BYTES FREE."
Xavier conceded, "That's getting there."
Bruce said, "I could do a lot with that amount of RAM."
Xavier said, "It's still only a tape recorder for storage. And that's not very many columns across the screen. What is that, thirty?"
Josh said, "Twenty-two. I'd love to have an Apple II with disk drives and 40 column screen, but I'm not made of money! This costs $299, the tape recorder another $50, and another $40 for the 3K memory expansion. That's under four hundred dollars. The kind of computer you like Xavier likes at the MSLC goes for over two thousand dollars, maybe closer to three thousand after getting the dedicated monitor and twin disk drives."
Bruce said, "This looks amazing to me! Can you hook it to a modem like Albert does with his Sinclair?"
Xavier looked intrigued by that possibility.
Josh said, "Not yet. To use Albert's modem, I have to figure out the way the User Port works. I could also get a modem for this computer for under a hundred bucks. It is the first modem sold for that cheap!"
Albert put in, "You mean brand new modem sold that cheap. I paid about $30 for my rubber cup acoustic modem at the ham radio fest."
Josh conceded, "Yes, I mean a brand-new cost. The store where I got this didn't have any in. I may get one next time I am back in Irate City. I also have plans for another larger memory expansion. It takes a perfboard with the right edge connector and chips to make an 8 kilobyte memory expansion, which would get added to the memory already in the computer."
Every night seemed the party room that week at Josh and Xavier's dorm room. I do not know how they got any of their conventional homework done. There was standing room crowds around the Vic-20, with others gathered around the Sinclair. It seemed even more of a party as cans or bottles of beer were generously handed out. Josh had a small dorm fridge, but the beer rarely seemed in it long enough to get cold. Yet, nobody I saw in that room got obnoxiously drunk. It was a fun time, but I tended to leave around ten pm. Besides Computer Programming for Engineers, I had Calculus I and Chemistry I. Thus, I don't know how long that crowd kept at the computers. For all I know, it could have been to the wee hours of the morning.
That weekend, Josh left for Irate City again. Albert was still in the room for the weekend, though. It turned out Josh had given permission to Albert, Xavier, and Bruce to use his Vic-20 in his absence.
I thought that was extremely generous and trusting. If I had a home computer, then I don't think I would trust my friends enough to use it when I wasn't even in town.
As I somewhat expected, Josh came back Sunday night with a Commodore 300 baud modem. It was much smaller than Albert's acoustic modem. This was about the size of a man's wallet. The plastic of the case was dark brown, making it look even more like a leather wallet. The dorm phones did not have modular jacks, but this modem expected phones to have those. Josh proved his EE capabilities as he soon with some wiring and opening the phone had a workaround for that.
A week or two later, I was over at their room on some weekday evening, but after nine pm. Josh had his new modem working. He had his Vic-20 computer communicating to the PDP/11 modem. He had Xavier give it a try.
Xavier did so, the remarked, "Having a proper keyboard with keys that press down makes all the difference in the world!"
With the popularity of the Vic-20 computer being so great by the many visitors to this dorm room, the popularity of the Sinclair ZX-80 gradually fell off. When the Sinclair was free, Albert was letting me use it to learn BASIC. I wrote a program that in a crude drawing showed a six-sided die bounce and land.
I demonstrated it to Albert, who said, "That's not bad."
Bruce stopped looking over the shoulders of Josh and Xavier on the Vic-20 to come see my program.
After the demo, Bruce commented, "Joel, you got the faces of the die wrong."
I asked, "What do you mean?"
Bruce explained, "Adding the opposite side always adds to seven. If you have a 6, then the opposite side is a 1. If a 3, then a 4. As your die rolls, it has that wrong."
Albert got out an actual six-sided die, and I discovered Bruce was correct. The three of us soon had that defect removed from the program. It wasn't a useful program, not even a proper game. All it did was show the die roll, and have a number between one and six when done. The crude and slow character-based animation of the die falling down was merely to make it look cute.
Bruce told Albert and me, "I got a new game from the David Ahl book working on Josh's Vic-20."
Albert asked, "What game?"
Bruce replied, "Tic-Tac-Toe."
Over at the Vic-20, Xavier said to Josh, "Thanks! That really worked! All I have to do is pick up my printout at the Computer Center when it opens in the morning."
Josh and Xavier had ended the terminal program that communicated to the PDP mainframe through the modem. Xavier seemed done for tonight.
Bruce asked, "Josh, can I show these guys that Tic-Tac-Toe program I put in?"
Josh said, "Sure. Here's the tape you saved it to."
It looked like an ordinary cassette tape of the inexpensive sort that sold for two or three for a dollar at a drug store. Bruce loaded the game. Sure enough, it was Tic-Tac-Toe. After we took turns playing, something became clear. The computer never made a mistake. If you let it have the first move, then you either lost or tied, never won.
Josh watched, then asked, "Can I edit your code, Bruce?"
Bruce gave up the chair to Josh and said, "Help yourself. What do you want to do?"
Josh took the chair, which technically was his chair and his own desk, then said, "You have everything in the default color of blue text. X's seem like a warning to me. Let's make them red."
In what seemed almost no time, he had the X's as red. He chose black for the O's, and magenta for the lines. Then, he put in a bloop sound ever time an X went on the screen, and a plop sound ever time an O went on the screen.
We then took turns playing the revised game. I was amazed how much the color and sound changed it. It was starting to feel more like an arcade game.
Josh added, "Adding some animations might be nice. I recently learned how to redefine characters as well."
I looked at my watch and my jaw dropped as it was four am, and this was a weeknight! I hurried off to get what little sleep I could. However, it felt worth it to me. I felt what I had just seen with adding color and sound to a simple, well-known game like Tic-Tac-Toe and how it was done had been about as educational as what I had been getting from any of my professors!
Unfortunately, Josh's Vic-20 computer was so popular that despite how well the modem and terminal program worked, it did not do much to relieve the requirement to do FORTRAN programs for Computer Programming for Engineers. The Vic-20 was only one computer, after all. The Sinclair with the acoustic modem could not be used at the same time as the Vic-20 with the modular-jack modem since the dorm room only had one phone line.
A few days later, I was around at around midnight yet again on a weeknight at Josh and Albert's room. Albert and I were using his Sinclair. Albert had written the program this time. It was to test how random the random function really was. Albert explained to me that all computers really used a pseudo-random number generator, not a true random number like one got from rolling physical dice.
Josh sat at Albert's desk, doing homework out of a math book using his fancy programmable calculator and extremely mundane pencil and paper. At Josh's own desk where the Vic-20 resided, Bruce sat in front of it typing away. I knew Bruce was modemed in to the PDP mainframe, but had not really paid any attention to what he was doing.
Bruce said, "Hey, guys! Come see what I did with the Tic-Tac-Toe program."
Josh put down his pencil to come see. Albert and I got off the floor and came over as well.
Bruce explained to the group of us, "It's pretty easy to convert from BASIC to FORTRAN or vice versa. I converted Tic-Tac-Toe to FORTRAN on the PDP mainframe. Try it out."
Josh took the seat and looked at the screen shown on the 14" color TV. This was the characteristic screen of the mainframe. As he played the game, there was none of the color or sounds that Josh had added to the Vic-20 version of the game. Unlike changing the screen to it seemed to stay the same as in the newest Vic-20 version, this scrolled the lines every time. Thus, grid after grid scrolled past as the game was played. Yet, it did function.
Josh said, "The algorithm works just the same. It's indeed Tic-Tac-Toe in FORTRAN on the mainframe. Not too shabby."
Bruce beamed at the praise from Josh.
Albert noted when he tried it, "It plays very well at night like now when nobody else is on the PDP mainframe. Given how the grid is redrawn every time and how slowly the VT-100 dumb ASCII terminals trickle out characters when the PDP mainframe is heavily loaded?"
I interrupted, "Which is whenever the Computer Center is open."
Albert nodded and said, "This would be almost unplayable during the daytime."
I had to get at least a little sleep, as now around one am. This time, the others seemed ready for bed as well. The fun was over for now.
A couple days later, I noticed that Bruce wasn't in the lecture hall for Computer Programming for Engineers. I didn't think too much of it, figuring he might be ill that day. As usual, Xavier and Josh were seated by me, and Albert sat toward the back. Yet, something was very odd that lecture. Dr. McCullen was reciting the rules for using both mainframes.
Josh muttered to Xavier and me, "This belongs at the start of the course, but it's the middle of the semester."
Dr. McCullen had the rules up on a transparency and continued, "Rule Three is that no VT-100 terminal can be left alone still logged in, not even to go to the restroom! Rule Four is absolutely no computer games of any sort are allowed on either the PDP mainframe or the IBM mainframe. Rule Five is you must never take the printouts that belong to any other student."
Xavier muttered to Josh and me, "Somebody must have done something wrong for us to get this lecture."
Dr. McCullen finished the list, then explained, "If you violate any of these rules, then you will be banned from both mainframes for the rest of the semester."
That evening, I was using punchcards on the IBM mainframe. A sys op came out of the area behind the glass window and yelled, "We're closing in ten minutes! Finish what you're doing."
I looked at my watch. It was 8:50 pm. I thought about the now habitual logging on to the PDP mainframe that took place in Josh and Albert's room using Josh's Vic-20. I didn't really want to do that myself because my program was on punchcards and I didn't want to retype all that. Still, I decided to go see the familiar crowd.
As I approached the dorm room, the door was shut, but I heard Bruce shouting from inside loud enough to be easily heard in the hallway, "It's not fair!"
I knocked, and Albert opened the door.
Bruce Brown sat at Albert's desk. He held a can of beer, and many empties were scattered around the room. Josh sat at the chair at his own desk, but the chair was turned to face Bruce. Both the Sinclair and Vic-20 were off. The room contained only Bruce, Albert, and Josh. The rest of those who liked to come by to use either computer like Xavier and some others I have not bothered to name were not around. Albert motioned me in.
Bruce hung his head down and said, "Mom's going to kill me!"
I asked, "What's going on?"
Bruce himself answered, "Joel, you remember that Tic-Tac-Toe game I put on the PDP mainframe?"
A chill ran down my spine as I thought back to the lecture today, but I simply said, "Yes."
Bruce explained, "I named it TICTAC.FOR Did you know the sys op can see everything in your directory?"
I replied, "I hadn't really thought about it, but I assumed he could see everything on the hard disk if he wanted."
Bruce said, "I only ever played it here off the Vic-20 computer after the Computer Center closed on nine pm. Yet, the sys op noticed that file name of TICTAC.FOR From that, he figured out what it was. I'm banned from both mainframes for the rest of the semester."
I said in astonishment, "For Tic-Tac-Toe? That barely even seems a video game compared to the kind of arcade-style games Xavier plays on those Apple II's in the MSLC or most of the games on Josh's Vic-20!"
Josh suggested, "Maybe you can see the dean. Describe it as a learning exercise. Hey, maybe get Albert to show what he was doing with checking the randomness of the pseudorandom number generator as part of it. Make it sound pompous and academic, not just a game!"
Bruce took a swig of beer, then said, "I appreciate the idea, but I don't think it will work. You should have heard what Professor McCullen said to me! You'd have thought I had embezzled a million dollars or some major crime like that!"
I said, "It seems crazy to me a game as crude and simple as Tic-Tac-Toe counts as a violation of the rules. I can almost understand the ban for the daytime given how overloaded the PDP mainframe is when the Computer Center is open. Why would anybody care about playing Tic-Tac-Toe through a modem line when the Computer Center is closed? There's almost no load on the computer then!"
Bruce downed his beer, then without asking went and dug another out of Josh's dorm fridge. Josh made no objection, going and getting one for himself.
Albert asked, "Bruce, if you can't get Professor McCullen to reconsider, what happens next?"
Bruce took a big drink from his new beer, then said, "Professor McCullen explained what happens next in my life quite clearly to me. I will have an F in his class now, no matter what I do. Even a D isn't possible without turning in the rest of the FORTRAN programs. I'm banned from both mainframes, so I cannot just go use punchcards to survive. He then had me show him my course load this semester. I have 16 credits, with 4 credits of that being his Computer Programming for Engineers. It is required to pass at least 13 credits with C or better to stay off academic probation. With an F in this class, I can only pass 12 credits! Thus, even if I get an A in every other class, I'll be on academic probation next year! He seemed positively gleeful that I'll be on probation!"
Josh said, "All this for a trivial game of Tic-Tac-Toe, purely text based. Unbelievable! I'd have thought the powers-that-be would want to encourage this kind of out-of-classroom learning!"
"When Mom finds out about my going on academic probation next semester, I am not sure she'll let me stay in Electrical Engineering. She seemed to expect me to flunk out of it, and this will confirm her assumption! Yet, I'm getting A's in all my other classes! I was getting an A in Computer Programming in Engineering before this happened! All over a stupid game of Tic-Tac-Toe! I wish I'd never gotten David Ahl's book," Bruce complained, then guzzled the rest of his beer.
THE END OF CHAPTER TWO
Back to Joel Kant Home Page: Joel Kant Home Page.