A.N.A.L.O.G. ISSUE 73 / JUNE 1989 / PAGE 10
You glance at your watch for the sixth time. It is just past 1:30 a.m. Time to start work. Just two days ago was the first you’d heard of Dr. Moore. Nice guy, designer of a killer biological organism. CONTROL called and briefed you. There was not much information. Moore had been trailed to a lab—the lab you’re standing in front of right now. Hmmm, suspicious, only one entrance just west of you. The report said there was a vial containing the organism and three forms of data relating to the organism. One form was most likely a formula. As to the others, it’s anyone’s guess. Your job: Steal it before Moore can sneak it out of the country and sell it to our enemies.
There doesn’t seem to be an alarm system, and the front door was easy to pick. Too easy. You wonder what it’s like inside. They must have some security measures. It looks very high tech. Well, here goes. The door is open now. You’re going inside. The door is swinging shut—slowly. What’s that? Wham! A steel panel dropped from the ceiling and is blocking the exit. Now how do you get out? Well, that can wait. First you’d better find that organism.
Listing 1 is the data used to create your copy of Secret Agent. Please refer to the M/L Editor, on page 61 for typing instructions.
Secret Agent is a machine-language game and is loaded by using the binary load option of your DOS.
To carry out your mission, you type in commands. There are two types of commands: single letters and sentences. The single letter commands are: N, S, E, W, U and D. Use these commands to move from room to room. Other single-letter commands include “L” to look at a room, “I” to list the objects you are carrying, “X” to save the game at your current location and “R” to load a saved game.
Sentences may be typed in the format shown in Figure 1. The parentheses indicate optional words and the square brackets indicate a prepositional phrase, which is needed at times. It is up to you to discover the verbs, nouns and prepositions. No spaces are allowed at the beginning of a command.
Some command examples:
S OPEN THE DOOR OPEN THE DOOR WITH THE FANCY KEY
Besides the regular alpha keys, only three other keys are accepted: CapsLock, Shift-Clear and Delete-Backspace. Caps allows you to toggle between lower- and upper-case. Do not press Shift with Caps! Shift-Clear clears the screen. Delete-Backspace is the only input editing key. One additional note: Only the first three letters of nouns and verbs are used in interpreting your command. Other words like “with” and “the” must be typed completely or an error will be given.
If your command is not valid (mostly because the verb or noun is not in the dictionary), or there is a misspelled word, the message “What?” will appear. Other error messages include “Not yet,” which means you are on the right train of thought; “You can’t do that,” which indicates an action that can never be done, or at least not in the room you’re in; and “You haven’t got that,” which means you are missing the object you tried to use.
The name of each room that you enter is displayed on the top line of the screen. At the extreme right is your score. When it is 4, it is time to leave the lab. Every time you enter a room, you will be given a description of the room, a list of exits and a list of visible objects. Only the visible objects can be picked up (example: GET KEY). However, you may be able to do something with things mentioned in the description.
This program has a nice text-compression routine that Bryan Schappel and I developed for use in adventure games or possibly for spelling dictionaries. First each text character is coded into a number from to 31. Because there are more than 32 letters and punctuation marks there is a second set of 32 codes. The first code set is:
0 = end of message flag 1-26 = a-z (lowercase) 27 = end of text flag 28 = space 29 30 = capital letter flag 31 = flag for second set of 32
The second set of codes is:
0-18 = '?!,-:/()0123456789
Since the coded text uses only five of the eight bits available in a byte, it can be compressed. The coded text is slightly larger than the pure text because of capital letters taking two bytes for one. For example “A” is coded as 31,1. The compression routine then takes eight bytes of data and compresses them into five bytes. This results in quite a savings of memory. The text for Secret Agent was about 2800 bytes. It compressed to a little less than 1900 bytes. Of course, some of that gain was lost by having to incorporate the uncompression and decoding routines into the program.
The assembly listings (Listings 2 through 6) for Secret Agent do not contain the decompression or decoding routines. That is a separate file which I used from the DDT debugger in MAC/65. Getting the magazine version going was quite a chore. I had three separate binary files to interface: the character set data, the compressed text and the game itself.
First, I assembled the revised program with the decompressor and decoder built in. Then I BLOADed it into MAC/65. Next, I BSAVEd the game portion and the character set as separate files. I loaded in the compressor program and ran it to compress the text. Then the text had to be BSAVEd. So now I had the three separate files, plus I had to add a run address.
But how to get all four files together? I used DOS 2 to append the files to one another. But, whenever I tried to load in the whole file, the computer locked up. I finally unified the file and then it worked. I still don’t know why it wouldn’t work before unifying it.
There are some obvious refinements that can be made to this type of adventure game. One is to allow multiple commands for input. Sound effects would be nice also. Adding more prepositions like “in,” “on,” “to,” etc., would make for more interesting games. Secret Agent was originally written in BASIC, and in that form it was 196 sectors long. It is now in machine language (minus sound effects) and only 61 sectors! The text compressor was a valuable tool for bringing down the size of this text adventure. I hope you enjoy playing it.
Barry Kolbe is a high school math teacher He has been programming since 1981 on an Atari 800, and for the last four years, he has programmed mostly in 6502 assembly language. He is now studying GFA BASIC for his new ST, while perusing the C and 68000 assembly books at the bookstore.
1000 DATA 255,255,0,128,255,129,0,0,0,0,0,0,0,0,0,24,4710 1010 DATA 24,24,24,0,24,0,0,102,102,10 2,0,0,0,0,0,102,5660 1020 DATA 255,102,102,255,102,0,24,62, 96,60,6,124,24,0,0,102,8941 1030 DATA 102,24,48,102,70,0,28,54,28, 56,111,102,59,0,0,24,7118 1040 DATA 24,24,0,0,0,0,0,14,28,24,24, 28,14,0,0,112,4290 1050 DATA 56,24,24,56,112,0,0,102,60,2 55,60,102,0,0,0,24,8184 1060 DATA 24,126,24,24,0,0,0,0,0,0,0,2 4,24,48,0,0,2776 1070 DATA 0,126,0,0,0,0,0,0,0,0,0,24,2 4,0,0,6,2018 1080 DATA 12,24,48,96,64,0,0,60,102,11 0,118,102,60,0,0,24,8172 1090 DATA 56,24,24,24,126,0,0,60,102,1 2,24,48,126,0,0,126,8004 1100 DATA 12,24,12,102,60,0,0,12,28,60 ,108,126,12,0,0,126,7724 1110 DATA 96,124,6,102,60,0,0,60,96,12 4,102,102,60,0,0,126,9906 1120 DATA 6,12,24,48,48,0,0,60,102,60, 102,102,60,0,0,60,7738 1130 DATA 102,62,6,12,56,0,0,0,24,24,0 ,24,24,0,0,0,2758 1140 DATA 24,24,0,24,24,48,6,12,24,48, 24,12,6,0,0,0,3036 1150 DATA 126,0,0,126,0,0,96,48,24,12, 24,48,96,0,0,60,6220 1160 DATA 102,12,24,0,24,0,0,60,102,11 0,110,96,62,0,0,30,7624 1170 DATA 55,103,103,111,59,0,0,30,51, 115,126,115,127,0,0,30,9225 1180 DATA 51,96,96,112,63,0,0,60,102,9 9,99,99,126,0,0,30,9257 1190 DATA 51,96,124,96,127,0,0,30,51,9 6,124,96,96,0,0,30,8727 1200 DATA 51,96,110,99,62,0,0,99,99,99 ,127,99,99,0,0,127,1056 1210 DATA 24,24,24,24,127,0,0,3,3,3,11 5,54,60,0,0,103,6507 1220 DATA 110,124,124,108,111,0,0,112, 112,96,96,99,127,0,0,99,1280 1230 DATA 99,119,127,107,99,0,0,124,11 8,118,118,118,119,0,0,28,814 1240 DATA 54,99,99,54,28,0,0,30,51,51, 62,48,48,0,0,28,5684 1250 DATA 54,99,99,111,62,3,0,60,54,54 ,62,51,51,0,0,30,6514 1260 DATA 51,96,62,3,127,0,0,63,108,10 8,12,12,27,0,0,51,6335 1270 DATA 51,51,51,99,62,0,0,99,99,99, 54,60,24,0,0,99,8165 1280 DATA 99,107,127,119,99,0,0,99,102 ,60,28,54,99,0,0,99,9082 1290 DATA 99,54,30,12,24,0,0,63,102,12 ,24,51,126,0,0,30,6291 1300 DATA 24,24,24,24,30,0,0,64,96,48, 24,12,6,0,0,120,5952 1310 DATA 24,24,24,24,120,0,0,8,28,54, 99,0,0,0,0,0,4095 1320 DATA 0,0,0,0,255,0,0,131,255,131, 0,24,60,126,126,60,2930 1330 DATA 24,0,0,0,30,54,118,118,159,0 ,0,96,96,124,102,102,2327 1340 DATA 253,0,0,0,60,112,96,112,223, 0,0,6,6,62,102,102,320 1350 DATA 255,0,0,0,28,54,54,28,247,0, 0,28,56,48,62,123,9528 1360 DATA 217,28,0,0,30,51,115,222,135 ,60,0,96,96,96,124,102,3721 1370 DATA 231,0,0,24,0,24,24,126,195,0 ,0,28,0,28,60,111,8176 1380 DATA 205,60,0,48,48,62,54,60,247, 0,0,24,24,24,24,24,7270 1390 DATA 231,0,0,0,51,127,127,219,219 ,0,0,0,124,102,102,102,3452 1400 DATA 231,0,0,0,60,102,103,231,60, 0,0,0,124,102,102,124,2206 1410 DATA 231,96,0,0,62,102,102,126,14 3,14,0,0,96,126,102,102,2078 1420 DATA 195,0,0,0,14,27,51,99,223,0, 0,12,63,12,12,28,6762 1430 DATA 247,0,0,0,115,51,51,51,223,0 ,0,0,54,54,54,127,9630 1440 DATA 205,0,0,0,99,99,107,127,221, 0,0,0,51,126,110,219,4069 1450 DATA 177,0,0,0,27,27,31,54,207,24 ,0,0,0,102,91,219,973 1460 DATA 131,62,0,24,60,126,126,24,60 ,0,24,24,24,24,24,24,6425 1470 DATA 24,24,0,126,112,124,110,102, 6,0,8,24,56,120,56,24,8998 1480 DATA 8,0,16,24,28,30,28,24,16,0,0 ,96,41,103,243,235,3016 1490 DATA 73,164,133,7,138,234,72,46,2 5,65,233,20,101,133,18,247,6359 1500 DATA 116,50,40,65,225,189,198,44, 138,225,151,178,123,218,15,45,8978 1510 DATA 52,26,10,224,122,101,29,100, 154,103,161,145,66,15,23,16,2355 1520 DATA 44,146,210,186,157,147,222,2 08,122,116,124,130,114,246,79,123,1376 1530 DATA 65,224,185,45,11,59,39,189,1 60,245,203,58,116,174,39,94,7824 1540 DATA 110,160,44,101,195,144,121,1 ,99,46,28,131,195,9,139,66,4233 1550 DATA 201,33,7,167,64,166,87,43,24 ,15,60,198,72,202,15,13,2374 1560 DATA 5,106,70,22,119,204,8,129,23 6,124,146,14,123,230,4,64,6023 1570 DATA 240,222,216,86,133,151,124,1 92,136,30,130,31,71,247,204,8,8116 1580 DATA 129,226,176,163,164,158,228, 142,125,243,2,32,122,109,11,25,5479 1590 DATA 217,61,237,7,169,87,56,172,7 ,134,19,148,30,115,229,68,5714 1600 DATA 124,125,7,166,250,209,31,31, 65,226,134,116,248,250,15,92,9760 1610 DATA 179,167,199,208,122,176,248, 250,15,17,247,119,199,208,123,47,1500 1620 DATA 175,80,27,23,229,239,156,250 ,33,46,63,65,236,190,189,153,1040 1630 DATA 75,242,247,215,64,105,240,13 1,196,123,139,192,121,52,248,39,940 1640 DATA 215,62,157,65,100,94,116,30, 160,86,87,115,160,246,95,94,7916 1650 DATA 145,238,248,41,212,6,197,237 ,16,26,115,160,241,36,248,64,9520 1660 DATA 164,231,65,236,190,189,24,93 ,240,83,163,12,165,158,133,217,1172 1670 DATA 107,228,94,116,30,203,235,20 9,133,223,5,58,119,246,136,13,9081 1680 DATA 59,112,231,157,7,168,130,244 ,184,77,39,208,200,191,47,65,9559 1690 DATA 236,190,189,153,75,242,244,3 0,203,235,208,178,69,9,51,212,1041 1700 DATA 6,197,237,16,26,115,160,246, 95,94,204,165,235,159,68,37,9695 1710 DATA 199,236,224,81,164,44,231,65 ,228,211,224,159,95,2,187,157,1712 1720 DATA 7,156,250,119,37,167,58,15,3 8,157,187,221,240,83,166,77,9603 1730 DATA 57,208,123,47,175,67,34,246, 229,12,146,227,246,136,47,102,193 1740 DATA 58,136,61,57,67,46,116,30,11 5,232,132,184,253,64,97,2,6831 1750 DATA 186,124,232,61,151,215,163,1 1,190,10,116,143,237,16,26,115,6735 1760 DATA 160,248,61,68,23,162,101,75, 209,86,148,123,187,74,201,211,968 1770 DATA 235,204,110,209,5,235,3,50,2 02,124,248,58,15,81,5,237,7113 1780 DATA 19,70,23,169,159,203,223,81, 5,239,138,99,20,116,235,205,736 1790 DATA 223,9,47,249,60,19,149,212,1 59,94,238,249,161,107,66,201,2095 1800 DATA 243,160,242,105,217,135,51,2 49,123,240,122,137,58,40,87,118,8753 1810 DATA 101,29,100,154,103,175,119,6 6,198,116,204,123,229,62,124,29,8642 1820 DATA 7,178,250,244,97,119,193,78, 200,161,39,104,128,211,157,7,9255 1830 DATA 178,250,244,97,119,193,78,15 6,180,237,16,26,124,93,7,178,7520 1840 DATA 250,244,97,119,193,78,190,5, 119,104,128,211,157,7,174,128,8996 1850 DATA 211,166,124,190,30,131,156,2 39,134,196,141,124,231,65,234,32,1605 1860 DATA 189,152,76,94,190,5,116,249, 208,122,136,44,139,240,79,161,785 1870 DATA 119,124,255,59,230,243,252,1 11,27,179,186,104,52,117,238,234,3453 1880 DATA 105,206,131,217,125,122,25,2 3,183,40,100,151,31,180,65,122,6183 1890 DATA 112,207,173,12,215,206,131,2 17,125,122,212,206,101,39,58,15,8065 1900 DATA 7,172,12,203,46,137,129,157, 58,105,61,189,162,11,217,60,7296 1910 DATA 79,167,67,71,181,58,44,251,1 51,215,226,232,61,68,23,178,94 1920 DATA 120,159,78,153,50,44,254,62, 138,180,235,83,57,150,124,232,1028 1930 DATA 61,68,23,161,129,122,57,86,1 04,44,251,151,214,66,123,139,9028 1940 DATA 62,115,190,28,130,53,243,157 ,7,168,130,244,48,47,83,62,6459 1950 DATA 141,1,145,210,227,244,52,238 ,95,95,139,160,245,16,94,153,756 1960 DATA 143,124,186,153,244,172,40,2 33,36,153,37,39,59,237,107,73,7504 1970 DATA 167,57,208,123,47,175,70,135 ,172,189,12,251,7,166,111,113,8692 1980 DATA 73,211,134,125,153,75,9,245, 46,163,251,151,214,93,101,92,303 1990 DATA 121,252,93,7,136,80,145,153, 236,130,68,134,137,123,186,210,1754 2000 DATA 178,147,238,95,89,116,204,44 ,209,206,131,217,125,122,96,165,1886 2010 DATA 133,39,114,250,203,173,76,23 0,151,187,157,7,178,250,244,179,5366 2020 DATA 24,96,82,116,210,123,123,68, 23,172,8,185,208,122,117,33,7069 2030 DATA 10,230,103,172,12,203,46,138 ,178,157,39,209,214,157,162,36,296 2040 DATA 250,157,29,203,235,206,131,2 17,125,101,214,166,115,75,221,219,4412 2050 DATA 134,125,157,70,50,206,102,17 1,57,208,122,225,161,101,211,49,844 2060 DATA 239,36,251,68,23,163,123,96, 25,81,165,117,57,208,123,47,6622 2070 DATA 175,73,39,221,221,75,187,68, 23,173,172,151,158,220,52,44,9059 2080 DATA 167,206,9,149,23,57,208,122, 101,28,139,78,248,39,43,169,6944 2090 DATA 242,247,205,76,230,151,187,1 91,87,65,222,252,227,250,59,245,6793 2100 DATA 126,95,143,227,209,103,190,1 6,101,44,247,203,123,4,94,131,8537 2110 DATA 208,145,103,62,250,126,167,1 31,233,122,157,163,251,73,103,161,2794 2120 DATA 56,82,238,116,30,154,30,250, 116,52,237,208,26,124,61,7,6570 2130 DATA 168,130,200,191,4,250,231,24 6,79,123,121,208,122,136,47,75,190 2140 DATA 49,134,9,113,251,100,214,83, 232,105,64,141,115,238,95,89,163 2150 DATA 116,79,38,121,208,120,61,157 ,10,86,118,1,113,89,209,49,5359 2160 DATA 227,92,251,68,23,165,12,233, 210,61,242,231,65,228,211,168,4473 2170 DATA 12,250,30,158,65,178,105,158 ,141,238,164,158,198,20,157,157,1866 2180 DATA 211,65,163,157,7,168,130,244 ,174,164,130,225,151,180,127,104,2931 2190 DATA 130,247,200,11,159,98,203,22 8,245,50,194,203,178,44,202,25,1721 2200 DATA 13,29,48,70,150,38,153,235,1 8,89,246,143,237,16,94,220,333 2210 DATA 179,167,58,15,7,164,44,215,2 12,207,169,119,104,130,244,111,1877 2220 DATA 147,139,46,188,221,162,11,21 7,61,237,231,65,234,32,178,47,577 2230 DATA 83,62,133,221,125,130,206,20 8,34,97,123,116,209,29,26,2,5797 2240 DATA 153,79,157,7,131,211,61,228, 232,194,36,184,180,234,103,215,4455 2250 DATA 187,180,65,122,80,206,157,18 4,88,206,116,30,64,92,116,184,8979 2260 DATA 253,123,187,68,23,183,11,25, 212,207,161,235,75,64,179,163,815 2270 DATA 8,146,226,211,183,77,17,208, 246,108,125,57,208,122,69,39,8676 2280 DATA 66,226,116,76,169,122,42,210 ,143,116,250,25,23,174,40,101,7449 2290 DATA 218,32,189,35,223,46,116,30, 154,10,203,22,125,104,86,94,5580 2300 DATA 214,29,162,11,217,190,180,71 ,110,22,51,157,7,130,238,133,8419 2310 DATA 130,75,159,208,192,189,76,25 0,151,116,61,24,78,94,116,30,6553 2320 DATA 162,11,34,244,50,47,104,17,4 8,179,248,250,52,5,50,159,6968 2330 DATA 199,208,184,157,15,108,87,17 ,46,63,90,17,161,46,47,58,2201 2340 DATA 15,7,164,40,223,32,209,54,47 ,96,192,186,157,154,105,62,8714 2350 DATA 165,221,162,11,209,190,78,44 ,185,208,122,136,44,139,212,207,2299 2360 DATA 161,234,220,241,117,238,237, 16,94,220,44,103,58,15,7,179,7112 2370 DATA 25,92,145,246,9,29,105,34,24 5,1,113,231,215,187,180,65,607 2380 DATA 122,80,206,157,184,88,206,13 3,196,232,123,64,137,133,235,18,1523 2390 DATA 89,246,143,237,16,94,220,179 ,167,58,15,13,5,106,70,22,3319 2400 DATA 79,172,73,122,247,118,136,47 ,104,17,48,179,231,125,68,22,6708 2410 DATA 69,248,39,208,246,119,77,6,1 42,139,61,162,11,210,61,242,9608 2420 DATA 231,65,230,61,235,159,72,23, 28,178,125,103,212,187,168,44,9773 2430 DATA 139,206,131,212,65,100,94,16 6,125,15,80,246,23,174,40,101,7191 2440 DATA 218,32,189,185,103,78,145,23 9,151,58,15,81,5,145,122,153,7388 2450 DATA 244,61,27,195,78,160,46,58,9 2,126,189,221,15,80,247,175,452 2460 DATA 157,7,168,130,200,189,76,250 ,23,119,193,245,60,31,75,201,336 2470 DATA 239,213,246,125,62,199,139,2 09,189,176,173,11,47,143,164,146,1427 2480 DATA 108,94,133,196,236,36,151,80 ,178,234,11,34,243,160,240,123,2490 2490 DATA 4,62,143,249,10,230,6,71,44, 187,34,206,147,235,221,208,3039 2500 DATA 245,129,23,104,17,48,188,232 ,60,30,145,239,151,82,238,209,2361 2510 DATA 5,233,67,58,118,225,99,57,20 8,122,136,47,77,89,57,52,5589 2520 DATA 172,139,209,189,211,76,233,6 2,188,221,15,72,89,175,161,113,752 2530 DATA 58,30,140,34,75,139,78,116,3 0,15,100,241,62,157,61,67,5290 2540 DATA 34,79,180,65,122,92,38,147,2 31,65,224,247,236,251,250,151,7041 2550 DATA 13,29,66,78,142,140,34,75,13 9,78,166,125,75,187,68,23,5857 2560 DATA 163,124,156,89,115,160,243,3 1,73,245,230,236,139,52,206,133,3501 2570 DATA 148,250,23,19,163,66,97,62,1 41,149,165,11,46,209,5,237,7846 2580 DATA 2,38,22,124,232,61,68,22,69, 234,103,208,244,76,169,122,711 2590 DATA 42,210,143,119,69,158,209,5, 233,30,249,115,160,240,122,208,3867 2600 DATA 184,236,41,59,39,137,244,235 ,18,89,245,238,237,16,94,153,1986 2610 DATA 143,124,185,208,120,61,33,66 ,78,134,5,235,18,89,245,238,9993 2620 DATA 237,16,94,153,143,124,185,20 8,122,136,44,139,212,207,161,236,4656 2630 DATA 194,98,245,5,145,121,208,108 ,0,48,64,67,32,91,61,32,2651 2640 DATA 194,65,76,186,50,112,112,96, 66,90,48,16,66,0,140,2,1614 2650 DATA 2,2,2,2,2,2,2,2,2,2,2,2,2,2, 2,2,2922 2660 DATA 2,2,2,2,2,65,9,48,0,40,80,12 0,160,200,240,24,5111 2670 DATA 64,104,144,184,224,8,48,88,1 28,168,208,248,32,72,112,0,7518 2680 DATA 0,0,0,0,0,0,1,1,1,1,1,1,2,2, 2,2,2853 2690 DATA 2,2,2,3,3,3,0,0,0,0,0,0,0,0, 0,0,2747 2700 DATA 0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,2700 2710 DATA 0,0,0,0,51,35,47,50,37,26,0, 16,0,0,64,0,5649 2720 DATA 32,96,63,21,18,58,42,56,61,5 7,13,1,5,0,37,35,6851 2730 DATA 8,10,47,40,62,45,11,16,46,22 ,43,23,33,34,32,52,7444 2740 DATA 12,118,32,46,44,126,155,125, 72,169,0,133,20,165,20,240,6973 2750 DATA 252,104,96,160,0,152,153,0,1 40,153,0,141,153,0,142,153,7170 2760 DATA 0,143,200,208,241,32,151,51, 96,164,84,185,44,48,24,105,6272 2770 DATA 0,133,182,185,67,48,105,140, 133,183,96,165,84,201,17,144,9328 2780 DATA 58,169,0,133,176,169,140,133 ,177,169,40,133,178,169,140,133,1873 2790 DATA 179,162,0,160,39,177,178,145 ,176,136,16,249,165,179,133,177,3182 2800 DATA 165,178,133,176,24,105,40,13 3,178,165,179,105,0,133,179,232,1258 2810 DATA 224,23,144,223,198,84,198,20 2,76,223,48,96,32,41,49,29,5683 2820 DATA 130,48,166,187,96,72,42,42,4 2,42,41,3,134,187,170,104,5693 2830 DATA 41,159,96,173,252,2,201,255, 240,249,162,255,142,252,2,162,6376 2840 DATA 25,221,134,48,240,24,202,16, 248,162,5,221,160,48,240,5,9778 2850 DATA 202,16,248,48,17,189,166,48, 76,129,49,76,55,49,138,24,4065 2860 DATA 109,190,2,76,129,49,201,60,2 08,241,173,190,2,201,97,240,3085 2870 DATA 8,169,97,141,190,2,76,55,49, 169,65,208,246,160,127,140,930 2880 DATA 31,208,162,8,202,208,253,136 ,16,245,96,134,180,132,181,160,3683 2890 DATA 0,177,180,201,255,208,1,96,3 2,205,48,160,0,132,200,177,352 2900 DATA 180,153,0,133,200,201,0,208, 4,230,200,208,5,192,38,208,1471 2910 DATA 238,136,177,180,201,32,240,5 ,136,208,247,160,37,200,132,189,3814 2920 DATA 169,0,153,0,133,152,24,101,1 80,133,180,144,2,230,181,160,1280 2930 DATA 2,185,254,132,240,11,32,32,4 9,145,182,32,172,48,200,208,9851 2940 DATA 240,32,243,49,165,200,208,3, 76,156,49,32,223,48,96,230,9532 2950 DATA 84,169,2,133,85,96,32,205,48 ,164,85,136,169,30,145,182,9118 2960 DATA 162,0,134,186,169,80,133,201 ,165,85,133,203,165,84,133,202,2914 2970 DATA 32,205,48,32,176,50,32,55,49 ,201,155,240,36,201,126,240,1576 2980 DATA 53,201,125,240,43,166,186,22 8,201,176,235,72,32,143,50,166,1949 2990 DATA 186,104,201,96,144,3,56,233, 32,157,0,132,230,186,76,26,7957 3000 DATA 50,166,186,157,0,132,32,133, 50,32,243,49,32,223,48,96,6473 3010 DATA 32,183,48,76,250,49,165,85,1 97,203,208,18,165,84,197,202,3050 3020 DATA 240,28,32,133,50,198,84,169, 39,133,85,76,119,50,32,133,5705 3030 DATA 50,198,85,32,205,48,169,63,1 64,85,145,182,198,186,76,26,9698 3040 DATA 50,32,205,48,164,85,169,0,14 5,182,96,72,32,205,48,104,7189 3050 DATA 32,32,49,164,85,145,182,230, 85,165,85,201,40,208,9,169,391 3060 DATA 2,133,85,230,84,32,223,48,32 ,176,50,96,32,205,48,169,7520 3070 DATA 63,164,85,145,182,96,169,97, 141,190,2,169,128,141,244,2,290 3080 DATA 32,183,48,169,9,141,48,2,169 ,48,141,49,2,169,62,141,5259 3090 DATA 47,2,169,0,141,45,62,141,46, 62,133,204,32,151,51,162,7017 3100 DATA 116,160,117,32,143,49,162,14 1,160,117,32,143,49,230,84,32,7593 3110 DATA 160,51,32,250,49,169,1,141,3 1,63,173,1,132,201,155,208,9869 3120 DATA 107,173,0,132,162,5,221,203, 61,240,5,202,16,248,48,49,8724 3130 DATA 134,199,32,97,60,172,45,62,1 85,34,63,24,101,199,168,185,8854 3140 DATA 71,62,16,10,162,159,160,113, 32,143,49,76,246,50,141,45,7113 3150 DATA 62,201,33,208,3,76,55,61,32, 160,51,32,195,60,76,246,7173 3160 DATA 50,201,73,208,6,32,223,59,76 ,246,50,201,76,208,6,32,7526 3170 DATA 204,51,76,246,50,201,88,208, 6,32,229,64,76,246,50,201,483 3180 DATA 82,208,9,32,73,65,32,160,51, 76,246,50,32,163,52,165,6735 3190 DATA 196,240,10,162,65,160,113,32 ,143,49,76,246,50,165,192,10,8441 3200 DATA 170,189,203,66,141,146,51,18 9,204,66,141,147,51,32,255,255,2898 3210 DATA 76,246,50,169,1,133,84,133,8 5,230,85,96,160,24,169,0,7162 3220 DATA 153,90,48,136,16,250,173,45, 62,10,170,189,223,61,133,182,848 3230 DATA 189,224,61,133,183,160,0,177 ,182,240,9,32,32,49,153,92,7263 3240 DATA 48,200,208,243,32,204,51,96, 32,115,53,32,74,52,32,214,5792 3250 DATA 51,96,162,0,189,56,113,157,0 ,132,232,224,9,208,245,160,3131 3260 DATA 0,185,48,62,205,45,62,240,49 ,200,192,23,208,243,224,9,2110 3270 DATA 240,18,169,32,157,254,131,16 9,0,157,255,131,162,0,160,132,1324 3280 DATA 32,143,49,96,160,0,185,47,11 3,157,0,132,240,4,232,200,627 3290 DATA 208,244,162,0,160,132,32,143 ,49,96,152,72,10,168,185,184,9570 3300 DATA 64,133,183,185,183,64,133,18 2,160,0,177,182,240,7,157,0,9749 3310 DATA 132,232,200,208,245,169,44,1 57,0,132,169,32,232,157,0,132,30 3320 DATA 232,104,168,76,237,51,162,0, 189,183,113,157,0,132,232,224,2763 3330 DATA 15,208,245,172,45,62,185,34, 63,168,169,0,133,186,132,199,951 3340 DATA 185,71,62,48,29,132,199,165, 186,10,168,185,33,62,133,182,9741 3350 DATA 185,34,62,133,183,160,0,177, 182,157,0,132,240,4,232,200,2260 3360 DATA 208,245,164,199,230,186,200, 165,186,201,6,208,209,169,32,157,4653 3370 DATA 254,131,169,0,157,255,131,16 2,0,160,132,32,143,49,96,162,8934 3380 DATA 0,134,190,134,192,134,193,13 4,197,134,198,134,196,169,69,133,3917 3390 DATA 182,169,63,133,183,166,190,1 60,0,177,182,221,0,132,208,8,672 3400 DATA 232,200,192,3,208,243,240,22 ,230,192,165,182,24,105,3,133,918 3410 DATA 182,144,2,230,183,165,192,20 1,18,208,218,230,196,96,189,0,3790 3420 DATA 132,201,155,240,246,201,32,2 40,3,232,208,242,32,40,53,32,9781 3430 DATA 53,53,32,40,53,32,184,53,176 ,225,165,193,133,194,189,0,1259 3440 DATA 132,201,155,208,1,96,201,32, 240,3,232,208,241,232,134,190,6184 3450 DATA 32,40,53,32,72,53,32,40,53,3 2,53,53,32,184,53,165,3514 3460 DATA 193,133,195,96,189,0,132,201 ,32,208,3,232,208,246,134,190,4748 3470 DATA 96,160,0,185,219,61,221,0,13 2,208,8,232,200,192,4,208,2450 3480 DATA 242,134,190,96,166,190,160,0 ,189,0,132,217,209,61,208,11,658 3490 DATA 232,200,192,5,208,242,230,19 7,134,190,96,189,0,132,217,214,5353 3500 DATA 61,208,11,232,200,192,5,208, 242,230,198,76,92,53,96,173,2503 3510 DATA 45,62,10,170,189,240,66,168, 189,239,66,170,32,143,49,173,1358 3520 DATA 45,62,201,1,208,8,162,12,160 ,118,32,143,49,96,201,9,6442 3530 DATA 208,33,173,29,63,240,8,162,1 40,160,119,32,143,49,96,173,8852 3540 DATA 17,63,240,8,162,29,160,116,3 2,143,49,96,162,116,160,122,8958 3550 DATA 32,143,49,96,169,123,133,182 ,169,63,133,183,162,0,134,193,1383 3560 DATA 166,190,160,0,177,182,221,0, 132,208,8,232,200,192,3,208,2911 3570 DATA 243,240,21,230,193,165,182,2 4,105,3,133,182,144,2,230,183,1597 3580 DATA 165,193,201,46,208,218,56,96 ,24,96,173,46,62,201,6,176,8583 3590 DATA 57,166,194,224,45,240,67,224 ,23,176,55,189,48,62,205,45,9510 3600 DATA 62,240,20,201,128,208,8,162, 209,160,113,32,143,49,96,162,9931 3610 DATA 77,160,113,32,143,49,96,169, 128,157,48,62,238,46,62,162,8761 3620 DATA 93,160,113,32,143,49,32,13,6 1,96,162,133,160,113,32,143,7154 3630 DATA 49,96,162,14,160,115,32,143, 49,96,160,0,185,48,62,205,7719 3640 DATA 45,62,240,10,192,23,240,3,20 0,208,241,76,129,59,174,46,663 3650 DATA 62,224,6,176,213,169,128,153 ,48,62,238,46,62,152,72,32,7829 3660 DATA 35,54,104,168,76,64,54,230,2 05,208,14,169,0,133,205,160,1373 3670 DATA 0,185,48,62,205,45,62,240,23 8,200,192,23,208,243,165,205,6472 3680 DATA 201,6,144,8,162,211,160,117, 32,143,49,96,166,194,224,10,292 3690 DATA 208,3,76,22,55,224,45,240,55 ,189,48,62,201,128,240,8,9864 3700 DATA 162,101,160,113,32,143,49,96 ,173,45,62,157,48,62,224,18,6838 3710 DATA 208,7,169,1,141,25,63,208,9, 224,8,208,5,169,1,141,7010 3720 DATA 28,63,206,46,62,162,123,160, 113,32,143,49,32,13,61,96,4646 3730 DATA 160,0,185,48,62,201,128,240, 8,200,192,23,208,244,76,79,1953 3740 DATA 54,165,205,201,6,240,157,192 ,10,240,39,201,8,208,5,169,774 3750 DATA 1,141,28,63,201,18,208,5,169 ,1,141,25,63,230,205,206,770 3760 DATA 46,62,152,72,32,201,54,104,1 68,173,45,62,153,48,62,76,6538 3770 DATA 221,54,104,104,169,7,76,74,6 0,76,32,55,165,194,201,7,7138 3780 DATA 208,32,173,55,62,201,128,240 ,3,76,17,57,173,20,63,208,7583 3790 DATA 3,76,19,58,73,1,141,20,63,17 3,45,62,141,56,62,76,4051 3800 DATA 118,55,201,28,208,108,173,45 ,62,201,1,240,16,201,2,240,353 3810 DATA 45,201,25,240,65,162,91,160, 114,32,143,49,96,173,18,63,6961 3820 DATA 240,20,73,1,141,18,63,169,1, 141,48,62,141,49,62,32,3581 3830 DATA 122,55,32,204,51,96,162,3,16 0,114,32,143,49,96,162,28,6470 3840 DATA 160,1,32,8,59,173,13,63,240, 236,73,1,141,13,63,169,7057 3850 DATA 2,141,50,62,208,217,162,28,1 60,21,32,8,59,173,33,63,5022 3860 DATA 240,212,73,1,141,33,63,169,2 5,141,64,62,141,70,62,76,5485 3870 DATA 115,55,201,27,208,159,173,45 ,62,201,25,208,25,162,27,160,9268 3880 DATA 17,32,8,59,173,19,63,240,173 ,73,1,141,19,63,169,25,5615 3890 DATA 141,69,62,76,115,55,201,4,24 0,3,76,89,55,162,27,160,7045 3900 DATA 22,32,8,59,173,32,63,240,141 ,73,1,141,32,63,169,4,5263 3910 DATA 141,58,62,76,115,55,162,15,1 60,114,32,143,49,96,165,194,9024 3920 DATA 168,185,48,62,201,128,240,8, 162,101,160,113,32,143,49,96,8640 3930 DATA 165,194,201,3,240,16,201,9,2 40,20,201,12,208,24,162,204,1322 3940 DATA 160,114,32,143,49,96,162,111 ,160,114,32,143,49,96,162,152,9330 3950 DATA 160,114,32,143,49,96,162,248 ,160,114,32,143,49,96,173,45,8889 3960 DATA 62,201,5,208,26,162,2,160,30 ,32,220,56,169,5,141,53,6579 3970 DATA 62,169,255,141,50,62,206,46, 62,32,129,59,76,118,55,201,7817 3980 DATA 11,208,20,162,0,160,30,32,22 0,56,169,11,141,54,62,169,7295 3990 DATA 255,141,48,62,76,90,56,201,1 2,208,20,162,16,160,34,32,5661 4000 DATA 220,56,169,12,141,59,62,169, 255,141,64,62,76,90,56,201,9189 4010 DATA 18,208,20,162,15,160,44,32,2 20,56,169,255,141,63,62,169,559 4020 DATA 21,141,182,62,76,90,56,201,2 0,208,20,162,4,160,43,32,5910 4030 DATA 220,56,169,20,141,62,62,169, 255,141,52,62,76,90,56,201,9137 4040 DATA 21,208,18,162,12,160,42,32,2 20,56,169,21,141,61,62,141,7273 4050 DATA 60,62,76,90,56,76,89,55,228, 194,208,16,196,195,208,12,1683 4060 DATA 189,48,62,201,128,208,15,165 ,197,240,16,96,162,25,160,114,829 4070 DATA 32,143,49,104,104,96,104,104 ,76,17,57,104,104,76,250,55,7382 4080 DATA 165,194,201,18,208,28,173,66 ,62,201,128,240,8,162,101,160,1558 4090 DATA 113,32,143,49,96,169,0,141,2 5,63,162,40,160,114,32,143,7075 4100 DATA 49,96,201,8,208,20,173,56,62 ,201,128,208,224,169,0,141,1801 4110 DATA 28,63,162,130,160,115,32,143 ,49,96,76,89,55,173,45,62,6237 4120 DATA 201,19,208,17,165,194,201,24 ,240,3,76,89,55,169,20,141,8370 4130 DATA 188,62,76,118,55,201,24,208, 17,165,194,201,23,208,235,173,4308 4140 DATA 24,63,73,1,141,24,63,76,224, 57,201,14,240,249,201,10,1157 4150 DATA 240,245,201,9,208,212,165,19 4,201,23,208,206,169,0,141,29,2113 4160 DATA 63,32,224,57,169,32,141,126, 62,76,118,55,173,45,62,201,8520 4170 DATA 15,208,55,173,21,63,208,6,16 5,194,201,25,240,3,76,50,8483 4180 DATA 58,173,67,62,201,128,240,3,7 6,17,57,173,22,63,208,3,6403 4190 DATA 76,129,59,73,1,141,22,63,169 ,15,141,63,62,162,80,160,7314 4200 DATA 115,32,143,49,32,224,57,76,1 18,55,201,16,208,208,165,194,2725 4210 DATA 201,25,208,202,173,27,63,73, 1,141,27,63,162,68,160,115,7715 4220 DATA 32,143,49,96,165,194,201,19, 208,15,173,67,62,201,128,208,2214 4230 DATA 19,162,97,160,115,32,143,49, 96,201,6,208,18,173,54,62,7558 4240 DATA 201,128,240,3,76,17,57,162,4 9,160,118,32,143,49,96,162,7906 4250 DATA 233,160,113,32,143,49,96,166 ,194,189,48,62,201,128,240,3,1240 4260 DATA 76,17,57,224,6,208,7,173,45, 62,201,23,240,8,162,73,8490 4270 DATA 160,114,32,143,49,96,173,26, 63,73,1,141,26,63,240,8,5514 4280 DATA 169,255,141,211,62,76,118,55 ,169,16,208,246,96,169,0,141,1049 4290 DATA 31,63,165,194,201,26,208,11, 169,1,133,198,169,5,133,195,1175 4300 DATA 76,121,58,201,36,240,241,165 ,194,201,5,208,8,162,195,160,4387 4310 DATA 117,32,143,49,96,173,45,62,2 01,26,208,67,162,26,160,5,7556 4320 DATA 32,8,59,173,30,63,208,3,76,8 2,59,173,10,210,201,100,9159 4330 DATA 176,18,169,0,141,30,63,169,8 0,141,35,67,169,122,141,36,7642 4340 DATA 67,76,118,55,162,161,160,115 ,32,143,49,173,10,210,201,180,2247 4350 DATA 144,8,162,218,160,115,32,143 ,49,96,169,0,76,74,60,201,8126 4360 DATA 9,240,3,76,89,55,162,36,160, 5,32,8,59,173,29,63,3929 4370 DATA 240,3,76,250,55,173,17,63,24 0,174,173,10,210,201,165,144,4026 4380 DATA 8,169,0,141,17,63,76,118,55, 162,161,160,115,32,143,49,7907 4390 DATA 173,10,210,201,150,176,8,162 ,29,160,116,32,143,49,96,169,9385 4400 DATA 1,76,74,60,228,194,208,16,19 6,195,208,17,185,48,62,201,2332 4410 DATA 128,208,23,165,198,240,6,96, 104,104,76,82,59,104,104,173,9270 4420 DATA 31,63,240,3,76,250,55,76,89, 55,104,104,76,17,57,173,6774 4430 DATA 45,62,201,13,208,24,165,194, 201,38,208,18,173,16,63,240,1096 4440 DATA 13,73,1,141,16,63,169,13,141 ,65,62,76,118,55,162,57,6070 4450 DATA 160,115,32,143,49,96,173,45, 62,201,15,208,40,165,194,201,2085 4460 DATA 41,240,3,76,89,55,173,21,63, 240,18,73,1,141,21,63,4799 4470 DATA 169,147,141,13,67,169,122,14 1,14,67,76,118,55,162,71,160,8395 4480 DATA 113,32,143,49,96,201,27,208, 218,165,194,201,27,208,212,173,6190 4490 DATA 23,63,240,233,73,1,141,23,63 ,169,29,141,238,62,76,118,9091 4500 DATA 55,173,45,62,201,7,208,25,16 5,194,201,39,208,8,169,0,9442 4510 DATA 141,14,63,76,224,57,201,40,2 40,3,76,89,55,169,1,208,8879 4520 DATA 239,201,29,208,245,165,194,2 01,40,208,239,169,30,141,247,62,5419 4530 DATA 169,255,141,245,62,32,224,57 ,76,118,55,162,0,189,37,113,8560 4540 DATA 157,0,132,232,224,10,208,245 ,160,0,185,48,62,201,128,208,3536 4550 DATA 41,152,72,10,168,185,183,64, 133,182,185,184,64,133,183,160,4153 4560 DATA 0,177,182,240,7,157,0,132,23 2,200,208,245,169,44,157,0,2937 4570 DATA 132,232,169,32,157,0,132,232 ,104,168,200,192,23,208,203,224,6326 4580 DATA 10,208,17,160,0,185,47,113,1 57,0,132,232,200,192,10,208,2455 4590 DATA 244,76,66,60,169,0,157,255,1 31,169,32,157,254,131,162,0,2079 4600 DATA 160,132,32,143,49,96,10,170, 189,50,67,168,189,49,67,170,9765 4610 DATA 32,143,49,162,179,160,116,32 ,143,49,76,138,61,173,45,62,7797 4620 DATA 201,26,208,46,173,30,63,208, 1,96,32,163,52,165,196,208,1362 4630 DATA 9,165,192,201,10,208,3,76,81 ,58,173,10,210,201,200,144,2456 4640 DATA 5,169,0,76,74,60,162,218,160 ,115,32,143,49,104,104,76,8422 4650 DATA 246,50,201,9,208,40,173,29,6 3,208,35,173,17,63,240,30,8649 4660 DATA 32,163,52,165,196,208,9,165, 192,201,10,208,3,76,81,58,9035 4670 DATA 173,10,210,201,130,176,7,104 ,104,169,1,76,74,60,96,173,8443 4680 DATA 45,62,201,5,208,11,173,14,63 ,240,5,169,5,76,74,60,6150 4690 DATA 96,201,23,208,10,173,24,63,2 40,246,169,2,76,74,60,201,492 4700 DATA 17,208,10,173,27,63,208,232, 169,4,76,74,60,201,18,208,157 4710 DATA 10,173,28,63,240,218,169,3,7 6,74,60,201,30,208,209,173,2818 4720 DATA 25,63,240,204,169,6,76,74,60 ,169,0,141,47,62,160,4,6277 4730 DATA 185,58,62,201,128,240,22,136 ,16,246,173,60,62,201,128,208,3438 4740 DATA 3,206,47,62,173,47,62,9,16,1 41,127,48,96,238,47,62,7001 4750 DATA 76,27,61,162,205,160,116,32, 143,49,230,84,173,47,62,201,1132 4760 DATA 4,208,10,162,16,160,117,32,1 43,49,76,78,61,162,179,160,9828 4770 DATA 116,32,143,49,76,138,61,169, 45,133,184,169,62,133,185,169,2496 4780 DATA 0,133,180,169,134,133,181,16 0,0,177,184,145,180,230,180,208,7399 4790 DATA 2,230,181,230,184,208,2,230, 185,165,185,201,63,208,232,165,8350 4800 DATA 184,201,34,208,226,96,162,16 8,160,117,32,143,49,173,31,208,2034 4810 DATA 201,6,240,2,208,247,169,45,1 33,184,169,62,133,185,169,0,2310 4820 DATA 133,180,169,134,133,181,160, 0,177,180,145,184,230,180,208,2,5085 4830 DATA 230,181,230,184,208,2,230,18 5,165,185,201,63,208,232,165,184,8663 4840 DATA 201,34,208,226,76,186,50,78, 83,69,87,85,68,73,78,84,6941 4850 DATA 79,32,87,73,84,72,32,84,72,6 9,32,0,112,8,112,17,2504 4860 DATA 112,32,112,48,112,56,112,70, 112,86,112,86,112,99,112,111,8234 4870 DATA 112,131,112,139,112,149,112, 149,112,159,112,166,112,179,112,56,192 6 4880 DATA 112,149,112,189,112,202,112, 86,112,56,112,149,112,159,112,56,472 4890 DATA 112,86,112,212,112,228,112,2 39,112,246,112,246,112,251,112,3,5332 4900 DATA 113,11,113,18,113,25,113,30, 113,78,84,79,255,255,255,3,1619 4910 DATA 32,255,255,8,255,6,255,255,1 5,255,255,255,255,255,22,28,7598 4920 DATA 28,255,255,255,255,255,1,255 ,255,2,3,255,5,255,255,255,9043 4930 DATA 1,255,255,255,255,1,7,255,25 5,255,255,255,5,255,12,255,9201 4940 DATA 255,4,255,1,11,255,255,255,8 ,255,9,255,255,3,255,255,8425 4950 DATA 255,255,255,6,255,255,255,25 5,255,10,255,6,255,255,255,13,9324 4960 DATA 9,11,255,255,255,12,255,5,10 ,255,255,255,11,4,255,255,6557 4970 DATA 255,255,10,255,255,14,24,255 ,255,23,255,255,13,23,22,255,3643 4980 DATA 255,255,255,255,255,17,23,25 5,255,255,18,255,16,255,255,17,7086 4990 DATA 19,255,255,255,255,18,255,25 5,255,255,7,255,255,19,255,255,1980 5000 DATA 255,16,255,18,255,255,255,15 ,255,255,255,255,255,255,15,255,2734 5010 DATA 14,255,255,255,26,255,255,13 ,255,255,28,255,255,255,255,24,175 5020 DATA 27,28,255,255,255,26,255,255 ,255,255,255,25,255,255,26,255,1449 5030 DATA 255,27,255,255,255,255,255,2 55,255,33,255,255,255,255,255,255,7034 5040 DATA 255,255,255,9,255,255,255,25 5,255,1,1,1,1,1,1,1,5622 5050 DATA 1,1,1,1,1,1,1,1,1,1,1,1,1,1, 0,6,5251 5060 DATA 12,18,24,30,36,42,48,54,60,6 6,72,78,84,90,96,102,4852 5070 DATA 108,114,120,126,132,138,144, 150,156,162,168,174,180,186,192,198,79 18 5080 DATA 204,71,69,84,68,82,79,79,80, 69,82,69,65,73,78,83,5491 5090 DATA 87,69,65,84,85,82,70,76,73,6 9,88,65,87,65,86,83,5615 5100 DATA 72,79,84,65,75,76,73,70,77,7 9,86,80,85,83,85,78,5923 5110 DATA 76,80,82,69,80,85,84,66,65,6 8,78,65,73,67,65,82,4971 5120 DATA 80,65,68,68,73,83,71,85,78,6 6,65,84,66,79,88,71,5351 5130 DATA 65,83,70,79,76,86,73,65,70,7 9,82,77,69,77,77,73,5358 5140 DATA 67,80,82,79,82,79,68,67,79,7 3,83,77,65,83,67,85,5475 5150 DATA 69,76,69,70,76,65,76,65,82,6 7,79,77,75,78,79,72,5285 5160 DATA 79,79,83,87,73,82,79,66,67,6 5,66,68,69,83,83,65,5071 5170 DATA 70,83,76,79,67,65,71,76,69,8 6,76,79,67,86,69,78,5403 5180 DATA 77,65,67,65,80,69,68,79,79,8 0,76,65,82,69,68,66,5005 5190 DATA 76,85,80,73,67,69,78,76,68,8 2,73,72,79,76,65,76,5252 5200 DATA 76,98,97,100,103,101,0,110,9 7,105,108,102,105,108,101,0,6891 5210 DATA 99,97,114,100,0,112,97,100,0 ,100,105,115,107,0,103,117,6739 5220 DATA 110,0,98,97,116,111,110,0,98 ,111,120,0,103,97,115,32,6274 5230 DATA 109,97,115,107,0,102,111,108 ,100,101,114,0,118,105,97,108,7910 5240 DATA 0,102,111,114,109,117,108,97 ,0,109,101,109,111,0,109,105,7279 5250 DATA 99,114,111,100,111,116,0,112 ,114,111,103,114,97,109,0,114,7705 5260 DATA 111,100,0,99,111,105,110,0,1 15,109,97,108,108,32,107,101,7483 5270 DATA 121,0,115,99,117,98,97,32,10 3,101,97,114,0,101,108,101,7262 5280 DATA 99,116,114,111,110,105,99,32 ,100,101,118,105,99,101,0,102,7327 5290 DATA 108,97,115,104,105,110,103,3 2,98,97,108,108,0,108,97,114,7642 5300 DATA 103,101,32,107,101,121,0,99, 111,109,98,105,110,97,116,105,8787 5310 DATA 111,110,0,5,64,11,64,20,64,2 5,64,29,64,34,64,38,1409 5320 DATA 64,44,64,48,64,57,64,64,64,6 9,64,77,64,82,64,91,4768 5330 DATA 64,99,64,103,64,108,64,118,6 4,129,64,147,64,161,64,171,9672 5340 DATA 64,32,62,65,169,3,162,16,157 ,66,3,169,8,157,74,3,5633 5350 DATA 169,171,157,68,3,169,65,157, 69,3,169,0,157,75,3,32,5502 5360 DATA 86,228,48,43,169,11,162,16,1 57,66,3,169,45,157,68,3,6376 5370 DATA 169,62,157,69,3,169,246,157, 72,3,169,0,157,73,3,32,6574 5380 DATA 86,228,48,11,162,71,160,113, 32,143,49,32,62,65,96,32,5679 5390 DATA 62,65,162,181,160,65,32,143, 49,96,162,16,169,12,157,66,8501 5400 DATA 3,32,86,228,96,32,62,65,169, 3,162,16,157,66,3,169,7502 5410 DATA 171,157,68,3,169,65,157,69,3 ,169,0,157,75,3,169,4,6214 5420 DATA 157,74,3,32,86,228,48,199,16 9,7,162,16,157,66,3,169,8867 5430 DATA 45,157,68,3,169,62,157,69,3, 169,246,157,72,3,169,0,8693 5440 DATA 157,73,3,32,86,228,48,222,17 3,30,63,240,13,169,181,141,2726 5450 DATA 35,67,169,121,141,36,67,76,4 0,65,169,80,141,35,67,169,8469 5460 DATA 122,141,36,67,76,40,65,68,58 ,83,80,89,46,68,65,84,5028 5470 DATA 155,70,105,108,101,32,101,11 4,114,111,114,46,32,0,32,78,4914 5480 DATA 66,32,222,65,96,46,32,39,63, 33,44,45,58,47,40,41,2417 5490 DATA 48,49,50,51,52,53,54,55,56,5 7,169,0,133,206,169,80,8747 5500 DATA 133,207,169,0,133,208,169,11 2,133,209,160,0,177,206,240,32,4890 5510 DATA 201,31,240,46,201,30,240,32, 201,27,208,5,169,255,145,208,5495 5520 DATA 96,144,10,56,233,28,170,189, 201,65,76,20,66,24,105,96,8033 5530 DATA 145,208,32,70,66,76,238,65,3 2,56,66,177,206,24,105,64,8750 5540 DATA 208,238,32,56,66,177,206,170 ,189,203,65,76,20,66,24,169,344 5550 DATA 255,145,208,96,230,206,208,2 ,230,207,96,230,208,208,2,230,8243 5560 DATA 209,96,32,56,66,32,63,66,96, 120,169,0,133,206,169,96,379 5570 DATA 133,207,169,0,133,208,169,80 ,133,209,160,7,169,0,153,192,3055 5580 DATA 3,136,16,250,160,4,177,206,1 53,208,3,136,16,248,162,7,1958 5590 DATA 169,0,160,6,110,208,3,110,20 9,3,110,210,3,110,211,3,9395 5600 DATA 110,212,3,106,136,192,1,24,2 08,234,106,106,106,157,192,3,1752 5610 DATA 202,16,223,160,7,185,192,3,1 45,208,136,16,248,160,7,185,3268 5620 DATA 192,3,201,27,240,32,136,16,2 46,165,206,24,105,5,133,206,2145 5630 DATA 165,207,105,0,133,207,165,20 8,24,105,8,133,208,165,209,105,4029 5640 DATA 0,133,209,76,104,66,96,238,5 3,111,54,32,55,2,56,66,5533 5650 DATA 56,4,57,65,57,144,57,232,57, 27,58,81,58,238,53,51,7639 5660 DATA 59,90,59,165,59,32,55,165,59 ,66,56,86,118,157,118,157,9781 5670 DATA 118,195,118,232,118,13,119,1 57,118,66,119,107,119,3,120,3,7969 5680 DATA 120,13,119,169,119,219,119,3 ,120,33,120,104,120,164,120,190,2299 5690 DATA 120,227,120,7,121,66,121,170 ,122,106,121,3,120,132,121,181,1504 5700 DATA 121,208,121,250,121,43,122,1 70,122,170,122,170,122,174,115,248,657 2 5710 DATA 115,58,116,93,116,143,116,23 2,116,77,117,229,117,224,2,225,4903 5720 DATA 2,0,48,0,0,0,0,0,0,0,0,0,0,0 ,0,0,5866
; SAVE#D:SPYPT1.M65 ; ;------------------; ; Secret Agent ; ; (c) 1988 ; ; by Barry Kolbe ; ;------------------; .OPT NOLIST ; .MACRO PRINT LDX #<%1 LDY #>%1 JSR PRINTE .ENDM ; *= $B0 SCR .DS 2 ;screen scroll SCR2 .DS 2 ;ditto ML .DS 2 ;more indirects SL .DS 2 J .DS 2 X1 .DS 1 ;save X & Y X2 .DS 1 Y1 .DS 1 Y2 .DS 1 IX .DS 1 ;char counter XF .DS 1 VP .DS 1 ;verb counter NP .DS 1 ;noun counter DO .DS 1 ;direct object PO .DS 1 ;prep. object ERFLG .DS 1 ;error flag INTOF .DS 1 ;'INTO' flag WITHF .DS 1 ;'WITH' flag TEMP .DS 1 EOLF .DS 1 ;in printing MAXLEN .DS 1 ;max input ROWX .DS 1 ;save rowcrs COLX .DS 1 ;save colcrs NOEND .DS 1 INROOM .DS 1 ;objects in room ; GR0 = $8C00 ;screen memory HOLD = $8600 ;data backup CHSET = $8000 ;character set IBUF = $8400 ;input buffer PBUF = $8500 ;print buffer ; ROWCRS = $54 ;cursor row COLCRS = $55 ;& column RTCLOK = $14 ;clock CH = $02FC ;key CAPS = $02BE ;caps flag CONSOL = $D01F ;consol button RANDOM = $D20A ;random number EOL = $9B ;end of line BOTLIN = 17 ;scroll value ENLIN = $26 ;wrap around val NUMOBJ = 46 ;total # objects NUMSHO = 23 ;# obj can show NUMV = 18 ;number of verbs ; .INCLUDE #D:SPYPT3.M65 ; *= $6000 ; START JSR KEEP ;back up data JMP BEGIN ; .INCLUDE #D:SPYPT6.M65 ; ;start things going ; BEGIN LDA #$61 ;lowercase STA CAPS LDA #>CHSET ;install STA $02F4 ;character set JSR CLRGR0 ;clear screen LDA #<GDLST ;install STA $0230 ;Display List LDA #>GDLST STA $0231 LDA #$3E ;enbale DMA STA $022F LDA #0 ;initialize STA WHERE ;outside STA CARRY ;carry nothing STA NOEND JSR HOME ;home cursor PRINT M47 ;print credits PRINT M48 INC ROWCRS ;next line JSR SHOLOC ;show room info ; ;Main loop ; DOIN JSR INPUT ;get input LDA #1 ;shoot STA FK ;shoot flag LDA IBUF+1 ;check for CMP #EOL ;single letter BNE TRYCMD ;command LDA IBUF ; ;Move from room to room ; LDX #5 ;a direction? CML1 CMP SINGLE,X BEQ GSING ;yes DEX ;try again BPL CML1 BMI TRYSPC ;try X,I,R,L GSING STX TEMP ;save direction JSR APEROB ;ape or robot? LDY WHERE ;present loc LDA EXOF,Y ;get offset CLC ;add direction ADC TEMP ;0-5 TAY LDA EXITAB,Y ;get exit BPL GOOO ;value:+ =ok PRINT M8 ;'Can't go' JMP DOIN ;more input GOOO STA WHERE ;new room CMP #$21 ;escape? BNE GOOP ;no JMP ENDGAM ;see if won GOOP JSR SHOLOC ;show new room JSR CKDEAD ;deadly room? JMP DOIN ;more input ; ;Check other single letters ; TRYSPC CMP #'I ;inventory? BNE TLOK JSR INVENT JMP DOIN ; TLOK CMP #'L ;look at room? BNE TSAV JSR LOOK JMP DOIN ; TSAV CMP #'X ;save data BNE TRYLOA ;to disk? JSR SVEGAM JMP DOIN ; TRYLOA CMP #'R ;retrieve data BNE TRYCMD JSR LOADGAM JSR SHOLOC ;show room JMP DOIN ; ;Interpret sentence ; TRYCMD JSR INTPRET ;parse LDA ERFLG ;error? BEQ AOK PRINT M1 ;'What?' JMP DOIN ;get input AOK LDA VP ;get verb number ASL A ;x2 for TAX ;look up table LDA CMDTBL,X STA DOCM+1 LDA CMDTBL+1,X STA DOCM+2 DOCM JSR $FFFF ;do verb JMP DOIN ;more input ; ;Set the cursor at 2,1 ; HOME LDA #1 STA ROWCRS STA COLCRS INC COLCRS RTS ; ;Show the name of the room ;in the status line ; SHOLOC LDY #24 ;clear out LDA #0 line SC1 STA PLACE,Y DEY BPL SC1 LDA WHERE ;get room ASL A ;x2 for table TAX LDA ROOMTAB,X ;use STA SL ;indirect for LDA ROOMTAB+1,X ;for move STA SL+1 LDY #0 SC2 LDA (SL),Y ;get byte BEQ SXT ;done if 0 JSR ASC2IC ;Internal Code STA PLACE+2,Y ;on status INY ;line BNE SC2 SXT JSR LOOK ;look at room RTS ; ;Look at a Room ; LOOK JSR DESCRIB ;describe it JSR SHOEXT ;show exits JSR SHOOBJ ;sho objects RTS ; ;Show objects in Room ; SHOOBJ LDX #0 ;'You see:' SHS LDA YOUS,X STA IBUF,X INX CPX #9 BNE SHS ;X = 9 LDY #0 ;scan objects NN1 LDA OBJTBL,Y CMP WHERE ;is it here? BEQ SOB ;yes SOC INY ;next object CPY #NUMSHO ;that all? BNE NN1 ;no CPX #9 BEQ NOOB ;you see nothing LDA #$20 ;zap last ',' STA IBUF-2,X LDA #0 ;'EOL' marker STA IBUF-1,X PRINT IBUF ;on screen RTS ; NOOB LDY #0 ;'Nothing' NOI LDA NOTH,Y STA IBUF,X BEQ NRT INX INY BNE NOI NRT PRINT IBUF ;print it RTS ; SOB TYA PHA ;save Y ASL A ;x2 TAY ;point to LDA OBJNAM+1,Y ;object's STA SL+1 ;name LDA OBJNAM,Y STA SL LDY #0 ;move name into ODM LDA (SL),Y ;buffer BEQ ODN STA IBUF,X INX INY BNE ODM ODN LDA #', ;add in ', ' STA IBUF,X LDA #$20 INX STA IBUF,X INX PLA ;get Y back TAY JMP SOC ;do more ; ;Show exits ; SHOEXT LDX #0 ;'The exits SK1 LDA M9,X ;are:' STA IBUF,X INX CPX #15 BNE SK1 LDY WHERE ;room # LDA EXOF,Y ;offset into TAY ;EXITAB LDA #0 ;ibuf counter STA X1 ;direction cntr SXX STY TEMP LDA EXITAB,Y ;get exits BMI ELQ ;$FF = no STY TEMP LDA X1 ;get dir name ASL A ;x2 TAY LDA DIRECT,Y ;point to STA SL ;name LDA DIRECT+1,Y STA SL+1 LDY #0 ;move name ELP LDA (SL),Y ;to buffer STA IBUF,X BEQ ELQ INX INY BNE ELP ELQ LDY TEMP NOEX INC X1 ;try next direct INY LDA X1 CMP #6 ;is that all? BNE SXX LDA #$20 ;zap last ',' STA IBUF-2,X LDA #0 ;set 'EOL' STA IBUF-1,X PRINT IBUF ;print RTS ; ;Find the VERB & NOUN ; ;input format: ; verb (the) object [with/into] ; (the) object] ; (the) and [..] are optional ; ;if verb or first object are not ;recognized an error is returned ; ;spaces and 'the' are skipped ; INTPRET LDX #0 ;set variables STX IX ;char counter STX VP ;verb number STX NP ;noun number STX INTOF ;into and with STX WITHF ;flags STX ERFLG ;error flag ; ;search ; LDA #<VERBT ;point to STA SL ;verb table LDA #>VERBT STA SL+1 SV2 LDX IX ;get counter LDY #0 SV5 LDA (SL),Y ;do the first CMP IBUF,X ;3 letters BNE SV1 ;match? INX INY CPY #3 BNE SV5 ;not done BEQ GOTV ;got a verb SV1 INC VP ;next verb LDA SL ;add 3 to CLC ;pointer ADC #3 STA SL BCC SS1 INC SL+1 SS1 LDA VP ;end of verbs? CMP #NUMV BNE SV2 SV3 INC ERFLG ;error RTS ; ;got verb ; GOTV LDA IBUF,X ;look for CMP #EOL ;EOL or BEQ SV3 ;first space CMP #$20 BEQ GOTSP INX BNE GOTV GOTSP JSR NSPACE ;find next char JSR SKPTHE ;skip 'the' JSR NSPACE ;find next char SH1 JSR FINDN ;get noun BCS SV3 ;error SH2 LDA NP ;save as STA DO ;direct object ; ;find EOL or space ; SH3 LDA IBUF,X ;if EOL done CMP #EOL BNE SH9 RTS SH9 CMP #$20 ;find end of BEQ SH4 ;noun- i.e. SV8 INX ;a space char BNE SH3 SH4 INX STX IX JSR NSPACE ;find non space JSR PREP ;a preposition? JSR NSPACE ;find non space JSR SKPTHE ;skipping... JSR FINDN ;last noun? LDA NP ;as prep. object STA PO RTS ; ;Find a 'non' SPACE character ; NSPACE LDA IBUF,X CMP #$20 BNE NS INX BNE NSPACE NS STX IX ;char counter RTS ; ;Skip the word 'the' ; SKPTHE LDY #0 ST1 LDA THE,Y CMP IBUF,X BNE THER INX INY CPY #4 BNE ST1 STX IX THER RTS ; ;Check for 'INTO' or 'WITH' ;if found set flags ; PREP LDX IX LDY #0 P2 LDA IBUF,X ;'INTO'? CMP INTOB,Y BNE PREP1 INX INY CPY #5 BNE P2 INC INTOF ;flag P4 STX IX RTS ;ok PREP1 LDA IBUF,X ;'WITH'? CMP WITHB,Y BNE P3 INX INY CPY #5 BNE PREP1 INC WITHF ;set flag JMP P4 P3 RTS ; ;Get a description of a room ; DESCRIB LDA WHERE ;this room ASL A ;x2 TAX LDA DESTAB+1,X ;point to TAY ;description LDA DESTAB,X TAX JSR PRINTE ;print it LDA WHERE ;room 1? CMP #1 BNE DSS ;special msg PRINT M53 RTS ; DSS CMP #9 ;ape room? BNE DEOU LDA FI ;in cage BEQ APER ;yes PRINT D9 ;'In cage' RTS APER LDA F6 ;ape alive? BEQ APES PRINT M37 ;'Charging' RTS APES PRINT D20 ;'Dead ape' DEOU RTS ; ;Find the NOUN ; FINDN LDA #<NOUNT ;point to STA SL ;noun table LDA #>NOUNT STA SL+1 LDX #0 ;noun counter STX NP SN2 LDX IX ;char counter LDY #0 SN7 LDA (SL),Y ;compare 3 CMP IBUF,X ;letters BNE SN1 INX INY CPY #3 ;match 3? BNE SN7 BEQ GOTN ;yes SN1 INC NP ;next noun LDA SL ;add 3 to the CLC ;pointer ADC #3 STA SL BCC SN5 INC SL+1 SN5 LDA NP ;at end of CMP #NUMOBJ ;nouns? BNE SN2 ;no SEC ;error RTS GOTN CLC ;got one RTS ; ;Beginning of Verb Handlers ; DO = direct object ; PO = prepositional object ; ;Get an object ; DGET LDA CARRY ;carrying the CMP #6 ;maximum BCS NOGT ;yes LDX DO ;object number CPX #$2D ;get all BEQ GETAL ;yes CPX #$17 ;over maximum BCS GT ;possible to LDA OBJTBL,X ;get CMP WHERE ;is it here? BEQ IH ;yes CMP #$80 ;you have it? BNE NTH ;no PRINT M11 ;'Have already' RTS NTH PRINT M3 ;'Not here' RTS IH LDA #$80 ;take it STA OBJTBL,X INC CARRY ;add 1 TOOK PRINT M4 ;'Taken' JSR DOSCOR ;check score RTS NOGT PRINT M7 ;'Can't carry' RTS GT PRINT M24 ;'Can't get' RTS ; ;Get all objects ; GETAL LDY #0 ;check if GET LDA OBJTBL,Y ;here CMP WHERE BEQ TAK ;yes take CPY #NUMSHO ;at end? BEQ TK1 ;yes INY BNE GET TK1 JMP PDON ;'Done' TAK LDX CARRY ;carry more? CPX #$06 BCS NOGT ;no LDA #$80 ;take it STA OBJTBL,Y INC CARRY ;add 1 TYA ;save Y PHA JSR TOOK ;'Taken' PLA ;get Y back TAY JMP GET ;do more ; ;Drop object(s) ; INJ INC INROOM ;add 1 BNE INK ; DDRO LDA #0 ;zero counter STA INROOM LDY #0 ;count objects INN LDA OBJTBL,Y ;in room CMP WHERE BEQ INJ ;here's one INK INY ;next object CPY #NUMSHO ;done? BNE INN LDA INROOM ;at 6 or more? CMP #6 BCC INL ;ok INM PRINT M51 ;'No room' RTS INL LDX DO ;is it the CPX #$0A ;dreaded vial? BNE PP1 ;no - whew JMP VDED ;a goner PP1 CPX #$2D ;drop all? BEQ DPAL ;yup LDA OBJTBL,X ;have it? CMP #$80 BEQ DH ;yes PRINT M5 ;'Don't have' RTS DH LDA WHERE ;put in room STA OBJTBL,X CPX #$12 ;was it scuba? BNE DDY LDA #1 ;reset flag STA FE BNE DDX DDY CPX #$08 ;is it the mask? BNE DDX LDA #1 ;reset flag STA FH DDX DEC CARRY ;1 less to carry DP4 PRINT M6 ;'Dropped' JSR DOSCOR ;change score? RTS ; ;Drop all ; DPAL LDY #0 ;scan objects DP1 LDA OBJTBL,Y CMP #$80 ;have this 1? BEQ DP2 ;yes DP3 INY ;next object CPY #NUMSHO ;done? BNE DP1 JMP TK1 ;'done' DP2 LDA INROOM ;is there room? CMP #6 ;6 maximum BEQ INM ;no room CPY #$0A ;vial? BEQ VDED ;dead! CMP #$08 ;gas mask? BNE NOGS LDA #1 ;flip flag STA FH NOGS CMP #$12 ;scuba gear BNE NOSC LDA #1 ;flip flag STA FE ; NOSC INC INROOM ;1 more in room DEC CARRY ;carry 1 less TYA ;save Y PHA JSR DP4 ;'Dropped' PLA TAY ;get Y LDA WHERE ;put in room STA OBJTBL,Y JMP DP3 ;more ; VDED PLA ;virus dropped PLA LDA #7 JMP DEAD ; ; ;Unlock is the same as OPEN ; DUNL JMP DOPE ; ;Open ; DOPE LDA DO ;the box? CMP #7 BNE DDF LDA OBJTBL+7 ;have it? CMP #$80 BEQ GSS JMP HAVNT ;'Haven't got' GSS LDA F9 ;if opned before BNE GD1 JMP EE2 ;see 'Nothing' GD1 EOR #1 ;else set flag STA F9 ;so no reopen GGS LDA WHERE ;gas mask here STA OBJTBL+8 JMP LKSEE ;show it ; DDF CMP #$1C ;open desk? BNE OCC LDA WHERE ;which room? CMP #1 ;entrance? BEQ OD1 CMP #2 ;reception? BEQ OD2 CMP #$19 ;office? BEQ OD9 NOCAN PRINT M19 ;'Can't ' RTS ; OD1 LDA F7 ;entrance desk BEQ ITOPN ;already open? EOR #1 STA F7 LDA #1 ;badge & STA OBJTBL ;nailfile STA OBJTBL+1 OE1 JSR ITOPN ;'Open' LKSEE JSR LOOK ;show room RTS ; ITOPN PRINT M13 ;'It's open' RTS OD2 LDX #$1C ;reception desk LDY #1 ;use nailfile JSR CKWITH ;say 'WITH' LDA F1 ;opened flag BEQ ITOPN EOR #1 STA F1 LDA #2 ;show card STA OBJTBL+2 BNE OE1 ; OD9 LDX #$1C ;office desk LDY #$15 ;large key JSR CKWITH ;'WITH'? LDA FN ;open flag BEQ ITOPN EOR #1 STA FN LDA #$19 ;show: STA OBJTBL+$10 ;coin STA OBJTBL+$16 ;combination JMP OE1 ; OCC CMP #$1B ;cabinet BNE NOCAN LDA WHERE CMP #$19 ;office? BNE OCK LDX #$1B ;cabinet LDY #$11 ;small key JSR CKWITH ;'WITH' LDA F8 ;open flag BEQ ITOPN EOR #1 STA F8 LDA #$19 STA OBJTBL+$15 ;large key JMP OE1 ; OCK CMP #4 ;kitchen? BEQ KOK JMP NOCAN ;'Can't' KOK LDX #$1B ;cabinet LDY #$16 ;combination JSR CKWITH ;'WITH' LDA FM ;open flag BEQ ITOPN EOR #1 STA FM LDA #4 STA OBJTBL+$0A ;vial JMP OE1 ; NOTYT PRINT M14 ;'Not yet!' RTS ; ;Read ; DREA LDA DO ;what shall TAY ;we read? LDA OBJTBL,Y CMP #$80 ;have it? BEQ DORE PRINT M5 ;'Can't read' RTS DORE LDA DO CMP #3 ;pad BEQ RPD CMP #9 ;folder BEQ RFO CMP #$0C ;memo BNE NORE PRINT M22 ;'Tighten RTS ;security' RPD PRINT M20 ;'Push button' RTS RFO PRINT M21 ;'Experiments' RTS NORE PRINT M23 ;'Can't read' RTS ; ;Insert (Put) into ; DINS LDA WHERE CMP #5 ;security? BNE IRB LDX #2 ;card LDY #$1E ;slot JSR CKINTO ;say 'INTO' LDA #5 STA OBJTBL+5 ;got a gun LDA #$FF ;lose card STA OBJTBL+2 DINR DEC CARRY ;1 less JSR PDON ;'Done' JMP LKSEE ;show ; IRB CMP #$0B ;hallway BNE IRC LDX #0 ;badge LDY #$1E ;slot JSR CKINTO ;'INTO' LDA #$0B STA OBJTBL+6 ;baton LDA #$FF STA OBJTBL ;lose badge JMP DINR ; IRC CMP #$0C ;cafeteria BNE IRR ;try rod LDX #$10 ;coin LDY #$22 ;vending JSR CKINTO ;'INTO' LDA #$0C STA OBJTBL+$0B ;formula LDA #$FF STA OBJTBL+$10 ;lose coin JMP DINR ; IRR CMP #$12 ;security BNE IRD ;try disk LDX #$0F ;rod LDY #$2C ;hole JSR CKINTO ;'INTO' LDA #$FF STA OBJTBL+$0F ;lose rod LDA #$15 ;gain exit STA EXITAB+111 JMP DINR ; IRD CMP #$14 ;computer room BNE IRM ;try memo LDX #4 ;disk LDY #$2B ;drive JSR CKINTO ;'INTO' LDA #$14 ;program STA OBJTBL+$0E LDA #$FF ;no disk STA OBJTBL+4 JMP DINR ; IRM CMP #$15 ;photo lab BNE IRO LDX #$0C ;memo LDY #$2A ;enlarger JSR CKINTO ;'INTO' LDA #$15 STA OBJTBL+$0D ;microdot STA OBJTBL+$0C ;memo JMP DINR IRO JMP NOCAN ;'Can't' ; ;Check DO, PO , ownershp ;and for the word 'INTO' ; Is X= DO, Y = PO? ; CKINTO CPX DO ;X = DO? BNE NTFIT CPY PO ;Y = PO? BNE NTFIT LDA OBJTBL,X ;have X? CMP #$80 BNE UNV LDA INTOF ;said 'INTO'? BEQ WRA RTS ;sure go ahead NTFIT PRINT M16 ;'Won't fit' PLA PLA ;pull return RTS UNV PLA ;pull return PLA JMP HAVNT ;'Don't have it' WRA PLA ;pull return PLA JMP NOTYT ;'Not yet' ; .INCLUDE #D:SPYPT2.M65 .INCLUDE #D:SPYPT4.M65 .INCLUDE #D:SPYPT5.M65 *= $02E0 .WORD START
;SAVE#D:SPYPT2.M65 ; ;--------------------------; ; Secret Agent (c) 1988 ; ; By: Barry Kolbe ; ; Second half of main ; ; program ; ;--------------------------; ; ;Wear scuba gear or gas mask ; DWEA LDA DO CMP #$12 ;scuba? BNE WTA ;no LDA OBJTBL+$12 ;have it? CMP #$80 BEQ WTB ;yes HAVNT PRINT M5 ;'haven't got' RTS ; WTB LDA #0 ;set flag STA FE PRINT M17 ;'Wearing ..' RTS ; WTA CMP #$08 ;gas mask? BNE WTC ;no LDA OBJTBL+$08 ;own it? CMP #$80 BNE HAVNT ;no LDA #0 ;set wear flag STA FH PRINT M31 ;'Wearing...' RTS WTC JMP NOCAN ;'Can't do that' ; ;Turn ; DTUR LDA WHERE ;room? CMP #$13 ;stairwell BNE TR1 ;nope LDA DO CMP #$18 ;hook? BEQ TR2 ;yes TR3 JMP NOCAN ;'Can't' TR2 LDA #$14 ;new exit west STA EXITAB+117 JMP LKSEE ;show ; TR1 CMP #$18 ;stairwell BNE TR4 ;no LDA DO CMP #$17 ;knob BNE TR3 ;'Can't' LDA FD ;flip flag EOR #1 ;electric floor STA FD TR5 JMP PCLIK ;say 'Click' TR4 CMP #$0E ;stairwell BEQ TR5 ;just 'Click' CMP #$0A ;west end? BEQ TR5 ;yes TR6 CMP #9 ;ape room? BNE TR3 ;no LDA DO CMP #$17 ;knob BNE TR3 ;'Can't' LDA #0 ;loose ape! STA FI JSR PCLIK ;'Click' LDA #$20 ;south exit STA EXITAB+55 ;now JMP LKSEE ; ;flip switch ; DFLI LDA WHERE ;room? CMP #$0F ;office? BNE FCH ;no LDA FA ;is safe visible BNE FEV ;yes LDA DO CMP #$19 ;switch? BEQ FES ;yes FEV JMP NOSPEC ;'Nothng happns' FES LDA OBJTBL+$13 ;have it CMP #$80 BEQ FET ;yes JMP HAVNT FET LDA FB ;opened before? BNE FEU ;no JMP PDON ;'Done' FEU EOR #1 ;set flag STA FB LDA #$0F ;show rod STA OBJTBL+$0F PRINT M29 ;'Safe open' JSR PCLIK ;'Click' JMP LKSEE ; FCH CMP #$10 ;chem lab? BNE FEV ;no LDA DO CMP #$19 ;switch? BNE FEV ;no LDA FG ;X-ray machine EOR #1 STA FG ;fall through PCLIK PRINT M28 ;'.Click..' RTS ; ;Examine something ; DEXA LDA DO CMP #$13 ;electronic BNE EE1 ;device? LDA OBJTBL+$13 CMP #$80 BNE EVB PRINT M30 ;'On/Off switch' RTS EE1 CMP #$06 ;baton? BNE EE2 LDA OBJTBL+6 CMP #$80 BEQ EE3 EVB JMP HAVNT ;'Haven't got' EE3 PRINT M54 ;'Gravity RTS ;switch' EE2 PRINT M12 ;'Nothing ' RTS ; ;Wave an object ; DWAV LDX DO ;have it? LDA OBJTBL,X CMP #$80 BEQ WA1 ;yes JMP HAVNT ;'Don't have' WA1 CPX #6 ;baton? BNE NOSPEC ;'Nothing' LDA WHERE CMP #$17 ;in right room? BEQ WA4 NOSPEC PRINT M18 ;'Nothing RTS ;special' WA4 LDA FF ;flip flag EOR #1 STA FF BEQ WA2 LDA #$FF ;close exit WA3 STA EXITAB+140 JMP LKSEE WA2 LDA #$10 ;open east BNE WA3 ;exit RTS ; ;Shoot the ___ with the gun ; DSHO LDA #0 ;message flag STA FK ;for CKWITH LDA DO CMP #$1A ;shoot robot? BNE GAP ;no SF2 LDA #1 ;set flags STA WITHF ;auto WITH LDA #5 ;gun STA PO ;as prep object JMP SF1 ;check it out GAP CMP #$24 ;shoot ape? BEQ SF2 ;yes LDA DO ;shoot gun? CMP #$05 BNE SF1 PRINT M50 ;'At what?' RTS SF1 LDA WHERE CMP #$1A ;in robot room? BNE SAPE ;no LDX #$1A ;robot=DO LDY #$05 ;gun =PO JSR CKWITH ;check it LDA FJ ;robot alive? BNE SS3 ;yes SS5 JMP WHAFOR ;'What for?' SS3 LDA RANDOM ;see if hit CMP #100 BCS SS2 ;miss LDA #0 ;a hit STA FJ ;robot dead LDA #<D1F ;change message STA ROBROM LDA #>D1F STA ROBROM+1 JMP LKSEE ;show it ; SS2 PRINT M33 ;'You missed' LDA RANDOM ;see if robot CMP #180 ;hits BCC SS4 PRINT M35 ;robot missed RTS SS4 LDA #0 ;gotcha! JMP DEAD ; SAPE CMP #9 ;ape room? BEQ SAP1 ;yes JMP NOCAN ;'Can't do that' SAP1 LDX #$24 ;ape =DO LDY #5 ;gun =PO JSR CKWITH ;check mostly LDA FI ;for ownership BEQ SJ1 ;is ape out? JMP NOTYT ;no->'Not yet' SJ1 LDA F6 ;alive ape? BEQ SS5 ;no LDA RANDOM ;hit or miss? CMP #165 BCC SA2 LDA #0 ;one dead ape STA F6 JMP LKSEE ;tell us all SA2 PRINT M33 ;'You missed' LDA RANDOM ;see if ape CMP #150 ;gets you BCS SA3 ;yes PRINT M37 ;'Charging' RTS SA3 LDA #1 ;'Crushed!' JMP DEAD ; ;Check: correct Direct Object, ;Prepositional Object, use of ;'WITH' and ownership of PO ;Enter with X=test value of DO ;Y= test value of PO ; CKWITH CPX DO ;X = DO? BNE WP1 ;nawh CPY PO ;Y = PO? BNE WP2 LDA OBJTBL,Y ;have Y? CMP #$80 BNE WP3 ;no LDA WITHF ;say 'WITH'? BEQ WP2 ;no RTS ;go ahead WP1 PLA ;pull return PLA JMP WHAFOR ;'What for?' ; WP2 PLA ;pull return PLA LDA FK ;message flag BEQ WP5 JMP NOTYT ;'Not yet' WP5 JMP NOCAN ;'Can't do' ; WP3 PLA PLA JMP HAVNT ;'Haven't got' ; ;Lift the plant ; DLIF LDA WHERE ;in stairs? CMP #$0D BNE WHAFOR ;no! LDA DO CMP #$26 ;plant? BNE WHAFOR ;so why do it? LDA F5 ;lift before? BEQ WHAFOR ;yes EOR #1 ;set flag STA F5 LDA #$0D ;show key STA OBJTBL+$11 JMP LKSEE ;show us WHAFOR PRINT M27 ;'What for?' RTS ; ;Move an object ; DMOV LDA WHERE CMP #$0F ;office? BNE MVC ;no LDA DO CMP #$29 ;picture? BEQ MV2 ;yup MV1 JMP NOCAN ;no can do MV2 LDA FA ;safe already BEQ PDON ;visible? EOR #1 ;no. set flag STA FA LDA #<DSAF ;say it STA SAFROM LDA #>DSAF STA SAFROM+1 JMP LKSEE ; PDON PRINT M2 ;'Done' RTS ; MVC CMP #$1B ;storage? BNE MV1 ;no LDA DO CMP #$1B ;cabinet? BNE MV1 ;no LDA FC ;moved before? BEQ PDON ;yes EOR #1 STA FC ;set flag LDA #$1D ;show exit down STA EXITAB+167 JMP LKSEE ; ;Push (or Press) buttons ; DPUS LDA WHERE ;storage? CMP #7 BNE PS2 ;no LDA DO CMP #$27 ;red button? BNE PS3 LDA #0 ;turn off lasers PS4 STA F2 JMP PCLIK ;'Click' PS3 CMP #$28 ;blue? BEQ PS1 ;yes PS6 JMP NOCAN ;'Can't ' PS1 LDA #1 ;turn lasers on BNE PS4 PS2 CMP #$1D ;small room BNE PS6 ;(airlock) LDA DO CMP #$28 ;blue button BNE PS6 ;no LDA #$1E ;open east STA EXITAB+176 LDA #$FF ;close north STA EXITAB+174 JSR PCLIK ;'Click' JMP LKSEE ; ;Player's Inventory ; INVENT LDX #0 ;'You have:' ILL LDA YOUH,X STA IBUF,X INX CPX #10 BNE ILL LDY #0 ;see which ones ILQ LDA OBJTBL,Y ;you own CMP #$80 BNE ILN ;no this one TYA PHA ;save Y ASL A ;x2 for an TAY ;offset LDA OBJNAM,Y ;into names STA SL LDA OBJNAM+1,Y STA SL+1 LDY #0 ;move name ILM LDA (SL),Y ;to buffer BEQ ILP ;done at 0 STA IBUF,X INX INY BNE ILM ILP LDA #', ;put in ', ' STA IBUF,X INX LDA #$20 STA IBUF,X INX PLA ;get Y TAY ILN INY ;next object CPY #NUMSHO ;at end? BNE ILQ ;no CPX #10 ;X still 10? BNE ILW ;no LDY #0 ;must have NOH LDA NOTH,Y ;'Nothing!' STA IBUF,X INX INY CPY #10 BNE NOH JMP ILU ;print it ILW LDA #0 ;put in 'EOL' STA IBUF-1,X LDA #$20 ;erase last , STA IBUF-2,X ILU PRINT IBUF ;print it RTS ; ;You have failed the mission ;Enter with A = type of death ; DEAD ASL A ;x2 TAX ;offset LDA DEADTAB+1,X ;get message TAY ;high byte LDA DEADTAB,X TAX ;low of address JSR PRINTE ;print it PRINT M41 ;'Failed' JMP WHANOW ; ;Before allowing a turn see if ;the player is in the ape or ;robot room. Don't allow them to ;move out. ; APEROB LDA WHERE CMP #$1A ;with robot? BNE DOAPE ;no LDA FJ ;robot alive? BNE EYA ;yes RTS ;whew! EYA JSR INTPRET ;get command LDA ERFLG ;test for error BNE EYB ;error LDA VP ;get verb # CMP #$0A ;shoot? BNE EYB ;nope JMP DSHO ;goto shoot EYB LDA RANDOM ;robot shoots CMP #200 BCC EYC LDA #0 ;hit you JMP DEAD ;done for EYC PRINT M35 ;robot misses PLA ;pull return PLA JMP DOIN ;get input ; DOAPE CMP #9 ;ape room? BNE NOEN ;no LDA FI ;in cage? BNE NOEN ;yes LDA F6 ;alive? BEQ NOEN ;dead JSR INTPRET ;get command LDA ERFLG BNE EYD ;error LDA VP ;get verb # CMP #$0A ;shoot? BNE EYD ;no JMP DSHO ;do shoot EYD LDA RANDOM ;see if ape CMP #130 ;gets you BCS NOEN ;escape for now PLA PLA LDA #1 ;crushes you JMP DEAD NOEN RTS ; ;Check for traps in ;various rooms ; CKDEAD LDA WHERE CMP #5 ;hallway? BNE DI2 LDA F2 ;lasers on? BEQ CDOK ;no LDA #5 ;blasted! JMP DEAD CDOK RTS ;ok so far DI2 CMP #$17 ;security? BNE DI3 LDA FD ;electric floor BEQ CDOK ;ok LDA #2 ;Zzzzzit JMP DEAD DI3 CMP #$11 ;X-ray room? BNE DI4 LDA FG ;switch BNE CDOK ;off! LDA #4 ;radiation JMP DEAD DI4 CMP #$12 ;security? BNE DI5 LDA FH ;gas mask on? BEQ CDOK ;yes LDA #3 ;poison gas JMP DEAD DI5 CMP #$1E ;tunnel? BNE CDOK LDA FE ;wearing scuba? BEQ CDOK LDA #6 ;drowned JMP DEAD ; ;Check the status of objects ;and show the score ; DOSCOR LDA #0 ;zero STA SCORE LDY #4 ;check for the DYA LDA OBJTBL+$0A,Y CMP #$80 ;4 objects BEQ UPO DYB DEY BPL DYA LDA OBJTBL+$0C ;don't CMP #$80 ;count memo BNE DYC ;next time DEC SCORE ;(-1 for memo) DYC LDA SCORE ;I'll put them ORA #$10 ;next to one STA PLACE+37 ;another RTS ;show score UPO INC SCORE ;plus 1 JMP DYB ; ;See if you've won after an ;escape from the lab ; ENDGAM PRINT M42 ;'Escaped' INC ROWCRS LDA SCORE ;win? CMP #4 BNE NOWIN PRINT M44 ;You won! ENL JMP ENL NOWIN PRINT M41 ;not quite JMP WHANOW ; ;Save initial condition in ;the event of a restart ; KEEP LDA #<SAVST ;start of STA J ;data LDA #>SAVST STA J+1 LDA #<HOLD ;backup area STA ML LDA #>HOLD STA ML+1 KK3 LDY #0 ;one byte at LDA (J),Y ;a time STA (ML),Y INC ML ;bump pointers BNE KK1 INC ML+1 KK1 INC J BNE KK2 INC J+1 KK2 LDA J+1 ;at the CMP #>SAVEN ;end yet? BNE KK3 LDA J CMP #<SAVEN BNE KK3 RTS ;done ; ;Ok. Something happened to ;bring us here. Either press ;START or SYSTEM RESET ; WHANOW PRINT M49 ;Press START NNW LDA CONSOL ;check consol CMP #6 ;START? BEQ REDO ;try again BNE NNW REDO LDA #<SAVST ;move data STA J ;back to LDA #>SAVST ;where the STA J+1 ;program can LDA #<HOLD ;use it STA ML LDA #>HOLD STA ML+1 KR1 LDY #0 LDA (ML),Y STA (J),Y INC ML BNE KR2 INC ML+1 KR2 INC J BNE KR3 INC J+1 KR3 LDA J+1 ;done yet? CMP #>SAVEN BNE KR1 LDA J CMP #<SAVEN BNE KR1 JMP BEGIN ;start over ; ;Data ; SINGLE .BYTE "NSEWUD" INTOB .BYTE "INTO " WITHB .BYTE "WITH " THE .BYTE "THE " ; ;Table of Room Names ; ROOMTAB .WORD R0 ;0 outside .WORD R1 ;1 entrance .WORD R2 ;2 reception .WORD R3 ;3 conference .WORD R4 ;4 kitchn .WORD R5 ;5 security .WORD R6 ;6 experiment .WORD R7 ;7 storage .WORD R7 ;8 storage .WORD R8 ;9 animal .WORD R9 ;a west end .WORD RA ;b hallway .WORD RB ;c cafeteria .WORD RC ;d stairwell .WORD RC ;e stairwell .WORD RD ;f office .WORD RE ;10 chem lab .WORD RF ;11 x-ray .WORD R5 ;12 security .WORD RC ;13 stairwell .WORD RG ;14 computer .WORD RH ;15 photo lab .WORD R7 ;16 storage .WORD R5 ;17 security .WORD RC ;18 stairwell .WORD RD ;19 office .WORD R5 ;1a security .WORD R7 ;1b storage .WORD RI ;1c electronic .WORD RJ ;1d small(air) .WORD RK ;1e tunnel .WORD RL ;spacer not used .WORD RL ;20 cage ; ;Direction table for names ; DIRECT .WORD XNOR ;north .WORD XSOU ;south .WORD XEAS ;east .WORD XWES ;west .WORD XUP ;up .WORD XDOW ;down ; SAVST ; start of save ; WHERE .DS 1 ;current room CARRY .DS 1 ;# objs carried SCORE .DS 1 ;what else? ; ;Object Location Table ; ;0-31 = In a Room ;$FF = Not Visible ;$80 = Owned by Player ; OBJTBL .BYTE $FF ;badge .BYTE $FF ;nailfile .BYTE $FF ;card .BYTE 3 ;pad .BYTE $20 ;disk 5 .BYTE $FF ;gun .BYTE $FF ;baton .BYTE 8 ;box .BYTE $FF ;gas mask .BYTE 6 ;folder 10 .BYTE $FF ;vial .BYTE $FF ;formula .BYTE $0F ;memo .BYTE $FF ;microdot .BYTE $FF ;program 15 .BYTE $FF ;rod .BYTE $FF ;coin .BYTE $FF ;small key .BYTE $16 ;scub .BYTE $1C ;elec 20 .BYTE $1C ;flash .BYTE $FF ;lar k .BYTE $FF ;combo last 1 ; ;Table of Exits ; ;$FF=noexit # = rooms ; EXITAB .BYTE $FF,$FF,$FF,$01 .BYTE $FF,$FF ;0 outside .BYTE $02,$03,$FF,$05 .BYTE $FF,$FF ;1 entrance .BYTE $FF,$01,$FF,$FF .BYTE $FF,$FF ;2 reception .BYTE $01,$07,$FF,$FF .BYTE $FF,$FF ;3 conference .BYTE $FF,$05,$FF,$0C .BYTE $FF,$FF ;4 kitchen .BYTE $04,$FF,$01,$0B .BYTE $FF,$FF ;5 security .BYTE $FF,$08,$FF,$09 .BYTE $FF,$FF ;6 experiment .BYTE $03,$FF,$FF,$FF .BYTE $FF,$FF ;7 storage .BYTE $06,$FF,$FF,$FF .BYTE $FF,$FF ;8 storage .BYTE $0A,$FF,$06,$FF .BYTE $FF,$FF ;9 animal .BYTE $0D,$09,$0B,$FF .BYTE $FF,$FF ;a west end .BYTE $0C,$FF,$05,$0A .BYTE $FF,$FF ;b hallway .BYTE $FF,$0B,$04,$FF .BYTE $FF,$FF ;c cafeteria .BYTE $FF,$0A,$FF,$FF .BYTE $0E,$18 ;d stairs .BYTE $FF,$FF,$17,$FF .BYTE $FF,$0D ;e stairs .BYTE $17,$16,$FF,$FF .BYTE $FF,$FF ;f office .BYTE $FF,$FF,$11,$17 .BYTE $FF,$FF ;10 chem lab .BYTE $FF,$12,$FF,$10 .BYTE $FF,$FF ;11 x-ray lab .BYTE $11,$13,$FF,$FF .BYTE $FF,$FF ;12 security .BYTE $12,$FF,$FF,$FF .BYTE $FF,$07 ;13 stairs .BYTE $FF,$FF,$13,$FF .BYTE $FF,$FF ;14 computer .BYTE $10,$FF,$12,$FF .BYTE $FF,$FF ;15 photo lab .BYTE $0F,$FF,$FF,$FF .BYTE $FF,$FF ;16 storage .BYTE $FF,$0F,$FF,$0E .BYTE $FF,$FF ;17 security .BYTE $FF,$1A,$FF,$FF .BYTE $0D,$FF ;18 stairs .BYTE $FF,$1C,$FF,$FF .BYTE $FF,$FF ;19 office .BYTE $18,$1B,$1C,$FF .BYTE $FF,$FF ;1a security .BYTE $1A,$FF,$FF,$FF .BYTE $FF,$FF ;1b storage .BYTE $19,$FF,$FF,$1A .BYTE $FF,$FF ;1c electronic .BYTE $1B,$FF,$FF,$FF .BYTE $FF,$FF ;1d small room .BYTE $FF,$FF,$21,$FF .BYTE $FF,$FF ;1e tunnel .BYTE $FF,$FF,$FF,$FF .BYTE $FF,$FF ;$21 out! .BYTE $09,$FF,$FF,$FF .BYTE $FF,$FF ;$20 cage ; ;Flag Table ; F1 .BYTE 1 ;desk R2 lock F2 .BYTE 1 ;lasers R5 on F3 .BYTE 1 ;vend mach R4 F5 .BYTE 1 ;plant Rd key F6 .BYTE 1 ;ape alive R9 F7 .BYTE 1 ;desk R1 F8 .BYTE 1 ;cabinet R19 F9 .BYTE 1 ;box - gas FA .BYTE 1 ;picture moved FB .BYTE 1 ;safe Rf FC .BYTE 1 ;cabinet moved FD .BYTE 1 ;elect. floor FE .BYTE 1 ;wear scuba FF .BYTE 1 ;door FG .BYTE 1 ;x-rays FH .BYTE 1 ;wear gas mask FI .BYTE 1 ;ape in cage FJ .BYTE 1 ;robot alive FK .BYTE 1 ;shoot msg FM .BYTE 1 ;used combinat FN .BYTE 1 ;used large key ; SAVEN ; end of save ; ;Tables of offsets into ;the table of Exits ;Multiples of 6 ; EXOF .BYTE 0,6,12,18,24 .BYTE 30,36,42,48,54 .BYTE 60,66,72,78,84 .BYTE 90,96,102,108,114 .BYTE 120,126,132,138,144 .BYTE 150,156,162,168,174 .BYTE 180,186,192,198,204 ; ;Verb Table - only the ;first 3 letters are used ; VERBT .BYTE "GETDROOPEREAINS" .BYTE "WEATURFLIEXAWAVSHO" .BYTE "TAKLIFMOVPUSUNLPRE" .BYTE "PUT" ; ;Noun Table - first 3 letters ; NOUNT .BYTE "BADNAICARPADDIS" .BYTE "GUNBATBOXGASFOLVIA" .BYTE "FORMEMMICPRORODCOI" .BYTE "SMASCUELEFLALARCOM" .BYTE "KNOHOOSWIROBCABDES" .BYTE "SAFSLOCAGLEVLOCVEN" .BYTE "MACAPEDOOPLAREDBLU" .BYTE "PICENLDRIHOLALL" ; ;Objects ; OB0 .BYTE "badge",0 OB1 .BYTE "nailfile",0 OB2 .BYTE "card",0 OB3 .BYTE "pad",0 OB4 .BYTE "disk",0 OB5 .BYTE "gun",0 OB6 .BYTE "baton",0 OB7 .BYTE "box",0 OB8 .BYTE "gas mask",0 OB9 .BYTE "folder",0 OBA .BYTE "vial",0 OBB .BYTE "formula",0 OBC .BYTE "memo",0 OBD .BYTE "microdot",0 OBE .BYTE "program",0 OBF .BYTE "rod",0 OBG .BYTE "coin",0 OBH .BYTE "small key",0 OBI .BYTE "scuba gear",0 OBJ .BYTE "electronic device" .BYTE 0 OBK .BYTE "flashing ball",0 OBL .BYTE "large key",0 OBM .BYTE "combination",0 ; ;Table for the object names ; OBJNAM .WORD OB0 .WORD OB1 .WORD OB2 .WORD OB3 .WORD OB4 .WORD OB5 .WORD OB6 .WORD OB7 .WORD OB8 .WORD OB9 .WORD OBA .WORD OBB .WORD OBC .WORD OBD .WORD OBE .WORD OBF .WORD OBG .WORD OBH .WORD OBI .WORD OBJ .WORD OBK .WORD OBL .WORD OBM
;SAVE#D:SPYPT3.M65 ; ;-----------------------; ; Cursive Character Set ; ; for Secret Agent ; ;-----------------------; ; ; ;This is the first half ;of the Character Set ; *= CHSET .BYTE $00,$00,$00,$00 .BYTE $00,$00,$00,$00 .BYTE $00,$18,$18,$18 .BYTE $18,$00,$18,$00 .BYTE $00,$66,$66,$66 .BYTE $00,$00,$00,$00 .BYTE $00,$66,$FF,$66 .BYTE $66,$FF,$66,$00 .BYTE $18,$3E,$60,$3C .BYTE $06,$7C,$18,$00 .BYTE $00,$66,$66,$18 .BYTE $30,$66,$46,$00 .BYTE $1C,$36,$1C,$38 .BYTE $6F,$66,$3B,$00 .BYTE $00,$18,$18,$18 .BYTE $00,$00,$00,$00 .BYTE $00,$0E,$1C,$18 .BYTE $18,$1C,$0E,$00 .BYTE $00,$70,$38,$18 .BYTE $18,$38,$70,$00 .BYTE $00,$66,$3C,$FF .BYTE $3C,$66,$00,$00 .BYTE $00,$18,$18,$7E .BYTE $18,$18,$00,$00 .BYTE $00,$00,$00,$00 .BYTE $00,$18,$18,$30 .BYTE $00,$00,$00,$7E .BYTE $00,$00,$00,$00 .BYTE $00,$00,$00,$00 .BYTE $00,$18,$18,$00 .BYTE $00,$06,$0C,$18 .BYTE $30,$60,$40,$00 .BYTE $00,$3C,$66,$6E .BYTE $76,$66,$3C,$00 .BYTE $00,$18,$38,$18 .BYTE $18,$18,$7E,$00 .BYTE $00,$3C,$66,$0C .BYTE $18,$30,$7E,$00 .BYTE $00,$7E,$0C,$18 .BYTE $0C,$66,$3C,$00 .BYTE $00,$0C,$1C,$3C .BYTE $6C,$7E,$0C,$00 .BYTE $00,$7E,$60,$7C .BYTE $06,$66,$3C,$00 .BYTE $00,$3C,$60,$7C .BYTE $66,$66,$3C,$00 .BYTE $00,$7E,$06,$0C .BYTE $18,$30,$30,$00 .BYTE $00,$3C,$66,$3C .BYTE $66,$66,$3C,$00 .BYTE $00,$3C,$66,$3E .BYTE $06,$0C,$38,$00 .BYTE $00,$00,$18,$18 .BYTE $00,$18,$18,$00 .BYTE $00,$00,$18,$18 .BYTE $00,$18,$18,$30 .BYTE $06,$0C,$18,$30 .BYTE $18,$0C,$06,$00 .BYTE $00,$00,$7E,$00 .BYTE $00,$7E,$00,$00 .BYTE $60,$30,$18,$0C .BYTE $18,$30,$60,$00 .BYTE $00,$3C,$66,$0C .BYTE $18,$00,$18,$00 .BYTE $00,$3C,$66,$6E .BYTE $6E,$60,$3E,$00 .BYTE $00,$1E,$37,$67 .BYTE $67,$6F,$3B,$00 .BYTE $00,$1E,$33,$73 .BYTE $7E,$73,$7F,$00 .BYTE $00,$1E,$33,$60 .BYTE $60,$70,$3F,$00 .BYTE $00,$3C,$66,$63 .BYTE $63,$63,$7E,$00 .BYTE $00,$1E,$33,$60 .BYTE $7C,$60,$7F,$00 .BYTE $00,$1E,$33,$60 .BYTE $7C,$60,$60,$00 .BYTE $00,$1E,$33,$60 .BYTE $6E,$63,$3E,$00 .BYTE $00,$63,$63,$63 .BYTE $7F,$63,$63,$00 .BYTE $00,$7F,$18,$18 .BYTE $18,$18,$7F,$00 .BYTE $00,$03,$03,$03 .BYTE $73,$36,$3C,$00 .BYTE $00,$67,$6E,$7C .BYTE $7C,$6C,$6F,$00 .BYTE $00,$70,$70,$60 .BYTE $60,$63,$7F,$00 .BYTE $00,$63,$63,$77 .BYTE $7F,$6B,$63,$00 .BYTE $00,$7C,$76,$76 .BYTE $76,$76,$77,$00 .BYTE $00,$1C,$36,$63 .BYTE $63,$36,$1C,$00 .BYTE $00,$1E,$33,$33 .BYTE $3E,$30,$30,$00 .BYTE $00,$1C,$36,$63 .BYTE $63,$6F,$3E,$03 .BYTE $00,$3C,$36,$36 .BYTE $3E,$33,$33,$00 .BYTE $00,$1E,$33,$60 .BYTE $3E,$03,$7F,$00 .BYTE $00,$3F,$6C,$6C .BYTE $0C,$0C,$1B,$00 .BYTE $00,$33,$33,$33 .BYTE $33,$63,$3E,$00 .BYTE $00,$63,$63,$63 .BYTE $36,$3C,$18,$00 .BYTE $00,$63,$63,$6B .BYTE $7F,$77,$63,$00 .BYTE $00,$63,$66,$3C .BYTE $1C,$36,$63,$00 .BYTE $00,$63,$63,$36 .BYTE $1E,$0C,$18,$00 .BYTE $00,$3F,$66,$0C .BYTE $18,$33,$7E,$00 .BYTE $00,$1E,$18,$18 .BYTE $18,$18,$1E,$00 .BYTE $00,$40,$60,$30 .BYTE $18,$0C,$06,$00 .BYTE $00,$78,$18,$18 .BYTE $18,$18,$78,$00 .BYTE $00,$08,$1C,$36 .BYTE $63,$00,$00,$00 .BYTE $00,$00,$00,$00 .BYTE $00,$00,$FF,$00 .BYTE $00,$36,$7F,$7F .BYTE $3E,$1C,$08,$00 .BYTE $18,$18,$18,$1F .BYTE $1F,$18,$18,$18 .BYTE $03,$03,$03,$03 .BYTE $03,$03,$03,$03 .BYTE $18,$18,$18,$F8 .BYTE $F8,$00,$00,$00 .BYTE $18,$18,$18,$F8 .BYTE $F8,$18,$18,$18 .BYTE $00,$00,$00,$F8 .BYTE $F8,$18,$18,$18 .BYTE $03,$07,$0E,$1C .BYTE $38,$70,$E0,$C0 .BYTE $C0,$E0,$70,$38 .BYTE $1C,$0E,$07,$03 .BYTE $01,$03,$07,$0F .BYTE $1F,$3F,$7F,$FF .BYTE $00,$00,$00,$00 .BYTE $0F,$0F,$0F,$0F .BYTE $80,$C0,$E0,$F0 .BYTE $F8,$FC,$FE,$FF .BYTE $0F,$0F,$0F,$0F .BYTE $00,$00,$00,$00 .BYTE $F0,$F0,$F0,$F0 .BYTE $00,$00,$00,$00 .BYTE $FF,$FF,$00,$00 .BYTE $00,$00,$00,$00 .BYTE $00,$00,$00,$00 .BYTE $00,$00,$FF,$FF ; ;This is the fourth part ;of the Character Set ;I skipped the control ;characters ; *= CHSET+$0300 ; .BYTE $00,$18,$3C,$7E .BYTE $7E,$3C,$18,$00 .BYTE $00,$00,$1E,$36 .BYTE $76,$76,$9F,$00 .BYTE $00,$60,$60,$7C .BYTE $66,$66,$FD,$00 .BYTE $00,$00,$3C,$70 .BYTE $60,$70,$DF,$00 .BYTE $00,$06,$06,$3E .BYTE $66,$66,$FF,$00 .BYTE $00,$00,$1C,$36 .BYTE $36,$1C,$F7,$00 .BYTE $00,$1C,$38,$30 .BYTE $3E,$7B,$D9,$1C .BYTE $00,$00,$1E,$33 .BYTE $73,$DE,$87,$3C .BYTE $00,$60,$60,$60 .BYTE $7C,$66,$E7,$00 .BYTE $00,$18,$00,$18 .BYTE $18,$7E,$C3,$00 .BYTE $00,$1C,$00,$1C .BYTE $3C,$6F,$CD,$3C .BYTE $00,$30,$30,$3E .BYTE $36,$3C,$F7,$00 .BYTE $00,$18,$18,$18 .BYTE $18,$18,$E7,$00 .BYTE $00,$00,$33,$7F .BYTE $7F,$DB,$DB,$00 .BYTE $00,$00,$7C,$66 .BYTE $66,$66,$E7,$00 .BYTE $00,$00,$3C,$66 .BYTE $67,$E7,$3C,$00 .BYTE $00,$00,$7C,$66 .BYTE $66,$7C,$E7,$60 .BYTE $00,$00,$3E,$66 .BYTE $66,$7E,$8F,$0E .BYTE $00,$00,$60,$7E .BYTE $66,$66,$C3,$00 .BYTE $00,$00,$0E,$1B .BYTE $33,$63,$DF,$00 .BYTE $00,$0C,$3F,$0C .BYTE $0C,$1C,$F7,$00 .BYTE $00,$00,$73,$33 .BYTE $33,$33,$DF,$00 .BYTE $00,$00,$36,$36 .BYTE $36,$7F,$CD,$00 .BYTE $00,$00,$63,$63 .BYTE $6B,$7F,$DD,$00 .BYTE $00,$00,$33,$7E .BYTE $6E,$DB,$B1,$00 .BYTE $00,$00,$1B,$1B .BYTE $1F,$36,$CF,$18 .BYTE $00,$00,$00,$66 .BYTE $5B,$DB,$83,$3E .BYTE $00,$18,$3C,$7E .BYTE $7E,$18,$3C,$00 .BYTE $18,$18,$18,$18 .BYTE $18,$18,$18,$18 .BYTE $00,$7E,$70,$7C .BYTE $6E,$66,$06,$00 .BYTE $08,$18,$38,$78 .BYTE $38,$18,$08,$00 .BYTE $10,$18,$1C,$1E .BYTE $1C,$18,$10,$00
;SAVE#D:SPYPT4.M65 ; ;-------------------; ; Secret Agent ; ; By: Barry Kolbe ; ; Disk I/O routines ; ; (c) 1988 ; ;-------------------; ; ;CIO equates ; ICCOM = $0342 ;command ICBAL = $0344 ;buffer address ICBAH = $0345 ICBLL = $0348 ;buffer length ICBLH = $0349 AUX1 = $034A ;type access AUX2 = $034B CIO = $E456 ; SVEGAM JSR CLOSE1 ;close IOCB 1 LDA #3 ;open LDX #$10 ;channel 1 STA ICCOM,X LDA #8 ;to write STA AUX1,X LDA #<FNAM ;file name STA ICBAL,X LDA #>FNAM STA ICBAH,X LDA #0 STA AUX2,X JSR CIO ;open it! BMI IOERR ;show error LDA #$0B ;put bytes LDX #$10 ;channel 1 STA ICCOM,X LDA #<SAVST ;starting STA ICBAL,X ;address LDA #>SAVST STA ICBAH,X LDA #<[SAVEN-SAVST+1] STA ICBLL,X ;number of LDA #>[SAVEN-SAVST+1] STA ICBLH,X ;bytes JSR CIO ;save data BMI IOERR ;woops! IODON PRINT M2 ;'done' JSR CLOSE1 ;close file RTS IOERR JSR CLOSE1 ;close IOCB 1 PRINT IOMSG ;say 'Error' RTS ; CLOSE1 LDX #$10 ;close IOCB 1 LDA #$0C ;close commnd STA ICCOM,X JSR CIO RTS ; LOADGAM JSR CLOSE1 ;close IOCB 1 LDA #3 ;open LDX #$10 STA ICCOM,X LDA #<FNAM STA ICBAL,X LDA #>FNAM STA ICBAH,X LDA #0 STA AUX2,X LDA #4 ;read STA AUX1,X JSR CIO IOJ BMI IOERR ;'Error' LDA #7 ;get bytes LDX #$10 STA ICCOM,X LDA #<SAVST ;starting STA ICBAL,X ;address LDA #>SAVST STA ICBAH,X ;get number LDA #<[SAVEN-SAVST+1] STA ICBLL,X ;of bytes LDA #>[SAVEN-SAVST+1] STA ICBLH,X JSR CIO BMI IOJ ;'Error' ; ;Reset proper Message ; LDA FJ ;robot dead? BEQ RBK ;yes LDA #<D1A ;say 'guarding' STA ROBROM LDA #>D1A STA ROBROM+1 JMP IODON RBK LDA #<D1F ;'mangled STA ROBROM ;robot' LDA #>D1F STA ROBROM+1 JMP IODON ; FNAM .BYTE "D:SPY.DAT",EOL IOMSG .BYTE "File error. ",0
;SAVE#D:SPYPT5.M65 ; ;-------------------; ; Secret Agent ; ; (c) 1988 ; ; by Barry Kolbe ; ;-------------------; ; ;Table of Verbs (Commands) ; CMDTBL .WORD DGET ;get .WORD DDRO ;drop .WORD DOPE ;open .WORD DREA ;read .WORD DINS ;insert .WORD DWEA ;wear .WORD DTUR ;turn .WORD DFLI ;flip .WORD DEXA ;examine .WORD DWAV ;wave .WORD DSHO ;shoot .WORD DGET ;take .WORD DLIF ;lift .WORD DMOV ;move .WORD DPUS ;push .WORD DOPE ;unlock .WORD DPUS ;press .WORD DINS ;put ($12) ; ;Table of Room Descriptions ; DESTAB .WORD D0 .WORD D1 .WORD D1 .WORD D3 .WORD D4 .WORD D5 .WORD D1 .WORD D7 .WORD D8 APEROM .WORD DE .WORD DE .WORD D5 .WORD DC .WORD DD .WORD DE SAFROM .WORD DF .WORD D10 .WORD D11 .WORD D12 .WORD D13 .WORD D14 .WORD D15 .WORD DFAKE .WORD D17 .WORD DE .WORD D19 ROBROM .WORD D1A .WORD D1B .WORD D1C .WORD D1D .WORD DFAKE .WORD DFAKE .WORD DFAKE ; ;Room Names ; R0 .BYTE "Outside",0 R1 .BYTE "Entrance",0 R2 .BYTE "Reception area",0 R3 .BYTE "Conference room",0 R4 .BYTE "Kitchen",0 R5 .BYTE "Security area",0 R6 .BYTE "Experiment room",0 R7 .BYTE "Storage room",0 R8 .BYTE "Animal room",0 R9 .BYTE "West end of hallway" .BYTE 0 RA .BYTE "Hallway",0 RB .BYTE "Cafeteria",0 RC .BYTE "Stairwell",0 RD .BYTE "Office",0 RE .BYTE "Chemical Lab",0 RF .BYTE "X-ray Lab",0 RG .BYTE "Computer Lab",0 RH .BYTE "Photo Lab",0 RI .BYTE "Electronics Lab",0 RJ .BYTE "Small room",0 RK .BYTE "Tunnel",0 RL .BYTE "Cage",0 ; ;Messages ; XNOR .BYTE "North, ",0 XSOU .BYTE "South, ",0 XEAS .BYTE "East, ",0 XWES .BYTE "West, ",0 XUP .BYTE "Up, ",0 XDOW .BYTE "Down, ",0 ; YOUH .BYTE "You have: " NOTH .BYTE "Nothing ",0 YOUS .BYTE "You see: " M1 .BYTE "What?",0 M2 .BYTE "Done.",0 M3 .BYTE "It's not here. ",0 M4 .BYTE "Taken. ",0 M5 .BYTE "You don't have that" .BYTE ". ",0 M6 .BYTE "Dropped. ",0 M7 .BYTE "You can't carry " .BYTE "anymore. ",0 M8 .BYTE "You can't go that " .BYTE "way. ",0 M9 .BYTE "The exits are: ",0 M10 .BYTE "You see: ",0 M11 .BYTE "You already have " .BYTE "that. ",0 M12 .BYTE "You see nothing " .BYTE "special. ",0 M13 .BYTE "It's open. ",0 M14 .BYTE "Not yet. ",0 M16 .BYTE "It won't fit. ",0 M17 .BYTE "You are wearing the" .BYTE " scuba gear. ",0 M18 .BYTE "Nothing happens. " .BYTE 0 M19 .BYTE "You can't do tha" .BYTE "t. ",0 M20 .BYTE "'The blue button tu" .BYTE "rns off the lasers" .BYTE ".' ",0 M21 .BYTE "The title is: The " .BYTE "Effect of Bio-Agents" .BYTE " on Mammals. ",0 M22 .BYTE "It says: 'Tighten " .BYTE "security on all fl" .BYTE "oors.' ",0 M23 .BYTE "You can't read tha" .BYTE "t. ",0 M24 .BYTE "You can't get tha" .BYTE "t! ",0 M25 .BYTE "You can't open t" .BYTE "hat. ",0 M27 .BYTE "What for? ",0 M28 .BYTE ".. Click.. ",0 M29 .BYTE "The safe opens. ",0 M30 .BYTE "There's an ON/OFF s" .BYTE "witch on it. ",0 M31 .BYTE "You are wearing the" .BYTE " gas mask. ",0 M33 .BYTE "You missed. ",0 M34 .BYTE "A laser blast from " .BYTE "the robot atomizes " .BYTE "you! ",0 M35 .BYTE "The robot fires, but" .BYTE " misses. ",0 M36 .BYTE "The ape crushes your" .BYTE "bones.. Crack.. ",0 M37 .BYTE "The ape is charging " .BYTE "at you! ",0 M38 .BYTE "The floor is electr" .BYTE "ified. Zzzit.. ",0 M39 .BYTE "You choke as poison" .BYTE "ed gas seeps into y" .BYTE "our lungs! ",0 M40 .BYTE "Deadly radiation mel" .BYTE "ts your flesh. ",0 M41 .BYTE "You failed your miss" .BYTE "ion. ",0 M42 .BYTE "You escaped from the" .BYTE " lab. ",0 M43 .BYTE "Suddenly laser burst" .BYTE "s cut through you. " .BYTE 0 M44 .BYTE "Your mission was suc" .BYTE "cessful. ",0 M45 .BYTE "Water floods the com" .BYTE "partment. ",0 M46 .BYTE "You drown in the mur" .BYTE "ky waters..blub.. ",0 M47 .BYTE "Secret Agent: Missi" .BYTE "on 1 ",0 M48 .BYTE " (c) 1988 by Barry" .BYTE " Kolbe ",0 M49 .BYTE "Press START to try " .BYTE "again. ",0 M50 .BYTE "Shoot at what? ",0 M51 .BYTE "There's no room. ",0 M52 .BYTE "The escaping viurs a" .BYTE "ttacks your body. ",0 M53 .BYTE "A steel door blocks " .BYTE "the east door. ",0 M54 .BYTE "It has a gravity con" .BYTE "trolled switch. ",0 ; ;They Gotcha! ; DEADTAB .WORD M34 ;robot .WORD M36 ;ape .WORD M38 ;floor .WORD M39 ;gas .WORD M40 ;x-ray .WORD M43 ;lasers .WORD M46 ;flood .WORD M52 ;drop vial ; ;Descriptions of Rooms ; D0 .BYTE "The entrance to the " .BYTE "Hanover-Tyler resea" .BYTE "rch facility lies to" .BYTE " the west. ",0 D1 .BYTE "A desk is in the co" .BYTE "rner of the room. " .BYTE 0 D3 .BYTE "There is an oval ta" .BYTE "ble with chairs. ",0 D4 .BYTE "A food cabinet is " .BYTE "on the east wall. ",0 D5 .BYTE "Hanging on the wall" .BYTE " is a metal cabinet " .BYTE "with a slot. ",0 D7 .BYTE "Red and blue button" .BYTE "s are near the door" .BYTE ". ",0 D8 .BYTE "Shelves make up the" .BYTE " south wall. ",0 D9 .BYTE "An albino ape is in " .BYTE "a cage. ",0 DC .BYTE "There are tables, " .BYTE "chairs, and a vend" .BYTE "ing machine. ",0 DD .BYTE "A decorative plant" .BYTE " sits in the corne" .BYTE "r. ",0 DE .BYTE "There is a knob on" .BYTE " the wall. ",0 DF .BYTE "A scenic picutre h" .BYTE "angs on the east wa" .BYTE "ll and a table lies" .BYTE " to the west. ",0 D10 .BYTE "Chemicals lie on " .BYTE "the tables. There's" .BYTE " a switch by the do" .BYTE "or. ",0 D11 .BYTE "Looks dangerous i" .BYTE "n here. ",0 D12 .BYTE "There is a hole " .BYTE "near the west door" .BYTE ". ",0 D13 .BYTE "There is a coat ha" .BYTE "nging on a hook. ",0 D14 .BYTE "There is an ATARI " .BYTE "130XE computer, driv" .BYTE "e and printer here." .BYTE " ",0 D15 .BYTE "A photo-enlarger r" .BYTE "ests on a lab table" .BYTE ". ",0 D17 .BYTE "A door in the east" .BYTE " wall. ",0 D19 .BYTE "The furniture cons" .BYTE "ists of a desk and a" .BYTE " cabinet. ",0 D1A .BYTE "A robot guards the" .BYTE " exits. ",0 D1B .BYTE "A 36 inch high cab" .BYTE "inet is in the cor" .BYTE "ner. ",0 D1C .BYTE "Lots of resisters" .BYTE " and chips clutter " .BYTE "the tables. ",0 D1D .BYTE "There is a blue bu" .BYTE "tton by the door. " .BYTE 0 ; ;These replace the regular ;descriptions when the 'ape' ;and 'robot' are eliminated ; D1F .BYTE "A mangled robot l" .BYTE "ies on the floor. ",0 D20 .BYTE "A dead ape lies " .BYTE "on the floor. ",0 DSAF .BYTE "There is a safe her" .BYTE "e. ",0 ; ;No description on some rooms ; DFAKE .BYTE $FF
;SAVE#D:SPYPT6.M65 ; ;------------------; ; Secret Agent ; ; By: Barry Kolbe ; ; Screen Handlers ; ; (c) 1988 ; ;------------------; ; ;Graphics 0 display list with ;a Status Line at the top ; GDLST .BYTE $70,$70,$60,$42 .WORD PLACE ;status line .BYTE $10,$42 .WORD GR0 .BYTE $02,$02,$02,$02,$02 .BYTE $02,$02,$02,$02,$02 .BYTE $02,$02,$02,$02,$02 .BYTE $02,$02,$02,$02,$02 .BYTE $02,$02,$41 .WORD GDLST ; ;Positions of the Graphics 0 ;lines in increments of 40 ;used by the Print routine ; ;Low bytes ; GL .BYTE $00,$28,$50,$78,$A0 .BYTE $C8,$F0,$18,$40,$68 .BYTE $90,$B8,$E0,$08,$30 .BYTE $58,$80,$A8,$D0 .BYTE $F8,$20,$48,$70 ; ;High bytes ; GH .BYTE $00,$00,$00,$00,$00 .BYTE $00,$00,$01,$01,$01 .BYTE $01,$01,$01,$02,$02 .BYTE $02,$02,$02,$02 .BYTE $02,$03,$03,$03 ; ;The Status Line ; PLACE .SBYTE " " .SBYTE " S" .SBYTE "CORE: 0 " ; ;Tables for converting from ;ASCII to Internal Code ; A2I .BYTE $40,$00,$20,$60 ; ;Special Keys Codes ; ;a-z :The Raw Key Codes ;from 764 (CH = $2FC) ; KEYC .BYTE $3F,$15,$12,$3A,$2A .BYTE $38,$3D,$39,$0D,$01 .BYTE $05,$00,$25,$23,$08 .BYTE $0A,$2F,$28,$3E,$2D .BYTE $0B,$10,$2E,$16,$2B .BYTE $17 ; ;SPACE/./,/DEL-Bsp/EOL ; OKEY .BYTE $21,$22,$20,$34,$0C .BYTE $76 ; ;The ASCII equivalents ; ASCK .BYTE $20,$2E,$2C,$7E,$9B .BYTE $7D ; JIFF PHA ;just wait LDA #0 ;a jiffy STA RTCLOK WAITJ1 LDA RTCLOK BEQ WAITJ1 PLA RTS ; CLRGR0 LDY #0 ;clear the TYA ;screen CLRSC STA GR0,Y STA GR0+$0100,Y STA GR0+$0200,Y STA GR0+$0300,Y INY BNE CLRSC JSR HOME ;reset cursor RTS ; ;Get Screen Position ;from the GL/GH tables ; POSITION LDY ROWCRS LDA GL,Y ;get low offset CLC ADC #<GR0 ;add to start STA SL ;of screen LDA GH,Y ;memory ADC #>GR0 STA SL+1 RTS ; ;Scroll Screen Memory Up ;One Line ; SCROLL LDA ROWCRS ;need to CMP #BOTLIN :scroll? BCC SCMOVEDN ;no LDA #<GR0 ;top line STA SCR LDA #>GR0 STA SCR+1 LDA #<[GR0+40] ;next line STA SCR2 LDA #>[GR0+40] STA SCR2+1 LDX #0 ;counter SCMOVE LDY #39 ;move 40 bytes SCMOVIT LDA (SCR2),Y ;up STA (SCR),Y DEY ;done? BPL SCMOVIT ;no LDA SCR2+1 ;reset pntrs STA SCR+1 LDA SCR2 STA SCR CLC ;add 40 to ADC #$28 ;from pntr STA SCR2 LDA SCR2+1 ADC #0 STA SCR2+1 INX CPX #23 ;23 lines? BCC SCMOVE ;no DEC ROWCRS ;cursor up 1 DEC ROWX JMP SCROLL ;need more? SCMOVEDN RTS ;done ; ;Convert ASCII to Internal Code ; ASC2IC JSR BITER ORA A2I,X LDX X2 RTS ; BITER PHA ;save byte ROL A ;X16 ROL A ROL A ROL A AND #3 ;type of char STX X2 ;save x TAX ;offset PLA ;restore AND #$9F RTS ; ;Get a Key ; INPKEY LDA CH ;get key CMP #$FF ;none pressed BEQ INPKEY ;yup LDX #$FF ;reset STX CH LDX #25 ;a-z? IN1 CMP KEYC,X BEQ IN2 ;yes DEX BPL IN1 LDX #5 ;special key IN3 CMP OKEY,X BEQ IN4 ;yes DEX BPL IN3 BMI K2 IN4 LDA ASCK,X ;get ascii JMP CLKER ;make sound IN7 JMP INPKEY ;get key ; IN2 TXA ;see if caps CLC ;needed ADC CAPS JMP CLKER ; K2 CMP #$3C ;caps key? BNE IN7 ;no LDA CAPS CMP #$61 ;lower? BEQ IN5 ;yes LDA #$61 ;flip IN6 STA CAPS ;switch it JMP INPKEY ;get a key IN5 LDA #$41 ;upper case BNE IN6 ; CLKER LDY #$7F ;make a key CK1 STY CONSOL ;click LDX #8 CK2 DEX BNE CK2 DEY BPL CK1 RTS ; ;print with word wrap ;uses PBUF as output ;Enter with X, Y as Low ;and High byte of Address ; PRINTE STX ML ;X =Low STY ML+1 ;Y = High LDY #0 ;if 1st byte LDA (ML),Y ;is $FF no CMP #$FF ;message,so BNE PE7 ;quit RTS PE7 JSR POSITION ;get screen LDY #0 ;position-set STY EOLF ;end flag PE3 LDA (ML),Y ;get byte STA PBUF,Y ;put in buffer INY CMP #$00 ;end of msg? BNE PE1 ;no INC EOLF ;set flag BNE SPLP PE1 CPY #ENLIN ;at end of BNE PE3 ;physical line? DEY SPLP LDA (ML),Y ;find space CMP #$20 ;for word wrap BEQ GTSP DEY ;back up BNE SPLP LDY #ENLIN-1 GTSP INY ;break SPCE STY Y2 ;save position LDA #0 ;set 0 as STA PBUF,Y ;end flag TYA ;move pointer CLC ;in message ADC ML STA ML BCC PE2 INC ML+1 PE2 LDY #2 ;left margin PE5 LDA PBUF-2,Y ;get byte BEQ PE6 ;end if 0 JSR ASC2IC ;convert STA (SL),Y ;on screen JSR JIFF ;wait a jiff INY ;next char BNE PE5 PE6 JSR CR ;linefeed LDA EOLF ;end? BNE EDON ;yes JMP PE7 ;do more EDON JSR SCROLL ;see if scroll RTS ;done ; ;Force a Carriage Return ; CR INC ROWCRS ;next line LDA #2 ;left margin STA COLCRS RTS ; ;Input Routine ; INPUT JSR POSITION ;get screen LDY COLCRS ;position DEY ;back up LDA #$1E ;' > ' ;for STA (SL),Y ;prompt LDX #0 ;input STX X1 ;counter LDA #$50 ;max input STA MAXLEN LDA COLCRS ;save current STA COLX ;position for LDA ROWCRS ;del-bck spc STA ROWX JSR POSITION JSR SHOCRS ;show the cursor ; INLOOP JSR INPKEY ;loop until CMP #EOL ;end of line BEQ INDONE CMP #$7E ;DEL BCK SPC BEQ DELETE CMP #$7D ;clear screen BEQ SCLEAR LDX X1 ;at end? CPX MAXLEN BCS INLOOP ;yes-get EOL PHA ;save char JSR PUTCHR ;onto screen LDX X1 PLA ;get it back CMP #$60 ;lower case? BCC NOLO ;no SEC SBC #$20 ;make it upper NOLO STA IBUF,X ;in input INC X1 ;buffer JMP INLOOP ;more? ; INDONE LDX X1 ;all done STA IBUF,X JSR ZAPCRS ;erase cursor JSR CR JSR SCROLL ;need to RTS ;scroll? ; ;Clear the Screen ; SCLEAR JSR CLRGR0 JMP INPUT ; ;Delete a character ; DELETE LDA COLCRS ;was there CMP COLX ;any input? BNE DDEL ;yes LDA ROWCRS ;same line? CMP ROWX BEQ NODEL ;yes no DEL JSR ZAPCRS ;erase cursor DEC ROWCRS ;up 1 line LDA #$27 ;right edge STA COLCRS JMP DHI ;show cursor ; DDEL JSR ZAPCRS ;erase cursor DEC COLCRS ;back up DHI JSR POSITION ;new position LDA #$3F ;show cursor LDY COLCRS STA (SL),Y DEC X1 ;1 less char NODEL JMP INLOOP ;get input ; ;Erase the cursor ; ZAPCRS JSR POSITION LDY COLCRS LDA #0 STA (SL),Y RTS ; ;Put a Character on the Screen ; PUTCHR PHA ;save it JSR POSITION ;get position PLA ;retrieve it JSR ASC2IC ;to Int Code LDY COLCRS ;get column STA (SL),Y ;on screen INC COLCRS ;next column LDA COLCRS CMP #$28 ;at right edge? BNE PCO ;no LDA #2 ;yes-reset STA COLCRS INC ROWCRS ;next line JSR SCROLL ;scroll? PCO JSR SHOCRS ;show cursor RTS ; ;Show the Underline as a ;cursor ; SHOCRS JSR POSITION LDA #$3F LDY COLCRS STA (SL),Y RTS