Excerpts from -
IN THIS BOOK
you'll find:
--RECREATIONAL PROGRAMS: dozens of programs including games, diversions and educational programs; fully detailed so that you can learn from the programming techniques as well as have fun. All programs run on the basic KIM-1 system... PAGE 23
--DIAGNOSTIC & UTILITY PROGRAMS: to help you test your KIM computer - to help you test other devices, such as cassette recorders - and to make your KIM a more powerful machine . . . PAGE 114
--EXPANDING YOUR KIM: guidelines on how to expand your KIM from the basic small-but-powerful KIM-1 system to a huge-and-super-powerful machine. Understanding the jargon; seeing what1s available in both hardware and software. . . PAGE 143
--CONNECTING TO THE WORLD: an introduction to the methods by which KIM can read or sense other devices and can in turn control other mechanisms . . . PACE 155
--POT POURRI: other useful pieces of information about your KIM system; reference material, hints, etc . . . PAGE 166
1
2
3
4

5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

23
24
25
YOU ARE PILOTING YOUR SPACECRAFT BETWEEN MARS AND JUPITER WHEN YOU ENCOUNTER A DENSE PORTION OF THE ASTEROID BELT. PRESS KEY ZERO TO MOVE LEFT, THREE TO MOVE RIGHT. WHEN YOUR CRAFT IS HIT THE DISPLAY WILL GIVE A NUMBER TO INDICATE HOW SUCESSFUL YOU WERE. THE PROGRAM STARTS AT 0200. 0200 A9 00 LDA #$00 ...INITIALIZE COUNTER... 0202 85 F9 STA 00F9 0204 85 FA STA 00FA 0206 85 FB STA 00FB 0208 A2 06 LDX #$06 ...INITIALIZE 00E2-00EB 020A BD CE 02 INIT LDA 02CE,X 020D 95 E2 STA 00E2,X 020F CA DEX 0210 10 F8 BPL INIT 0212 A5 E8 TOGG LDA 00E8 ...TOGGLE 00E8... 0214 49 FF EOR #$FF 0216 85 E8 STA 00E8 (FLASHER FLAG) 0218 A2 05 LDX #$05 DELAY BETWEEN FLASHES 021A 20 48 02 LITE JSR DISP DISPLAY AND.. 021D 20 97 02 JSR CHEK CHECK FOR MATCH 0220 CA DEX 0221 D0 F7 BNE LITE 0223 20 40 1F JSR KEYIN SET DIRECTIONAL REGS. 0226 20 6A 1F JSR GETKEY GET KEYBOARD ENTRY 0229 C9 15 CMP #$15 A VALID KEY? 022B 10 E5 BPL TOGG NO 022D C9 00 CMP #$00 KEY 0? 022F F0 06 BEQ LEFT YES, GO LEFT 0231 C9 03 CMP #$03 KEY 3? 0233 F0 0A BEQ RT YES, GO RIGHT 0235 D0 0B BNE TOGG NOT A VALID KEY 0237 06 E7 LEFT ASL 00E7 SHIFT CRAFT LEFT 0239 A9 40 LDA #$40 LEFT HAND EDGE? 023B C5 E7 CMP 00E7 023D D0 D3 BNE TOGG NO, RETURN 023F 46 E7 RT LSR 00E7 SHIFT RIGHT 0241 D0 CF BNE TOGG NOT RIGHT SIDE, RETURN 0243 38 SEC OFF EDGE, RETURN TO 0244 26 E7 ROL 00E7 RIGHT SIDE 0246 D0 CA BNE TOGG RETURN *** DISPLAY SUBROUTINE *** 0248 A9 7F DISP LDA #$7F PORT TO OUTPUT 024A 8D 41 17 STA 1741 0240 A9 09 LDA #$09 INIT. DIGIT 024F 8D 42 17 STA 1742 0252 A9 20 LDA #$20 BIT POSITION TO 0254 85 E0 STA 00E0 6TH BIT 0256 A0 02 BIT LDY #$02 3 BYTES 0258 A9 00 LDA #$00 ZERO CHARACTER 025A 85 El STA 00El
26
27
28
Bagels
DIRECTIONS - THE COMPUTER HAS CHOSEN FOUR LETTERS, ALL OF WHICH ARE A,B,C,D,E, OR F. LETTERS MAY BE REPEATED - FOR EXAMPLE, THE COMPUTER'S "SECRET COMBINATION" MIGHT BE CACF OR BBBB. YOU GET TEN GUESSES. EACH TIME YOU GUESS, THE COMPUTER WILL TELL YOU TWO THINGS: HOW MANY LETTERS ARE EXACTLY CORRECT (THE RIGHT LETTER IN THE RIGHT PLACE); AND HOW MANY LETTERS ARE CORRECT BUT IN THE WRONG POSITION. FOR EXAMPLE, IF THE COMPUTER'S SECRET COMBINATION IS CBFB AND YOU GUESS BAFD, THE TWO NUMBERS WILL BE 1 AND 1 (THE 'F' MATCHES EXACTLY; THE 'B' MATCHES BUT IN THE WRONG PLACE). THESE NUMBERS WILL SHOW ON THE RIGHT-HAND SIDE OF THE DISPLAY; THE CODE YOU ENTERED WILL APPEAR ON THE LEFT. MAKE A NOTE OF YOUR GUESSES AND THE COMPUTER'S RESPONSES. WITH A LITTLE MENTAL WORK, YOU SHOULD BE ABLE TO BREAK THE CODE EXACTLY IN SEVEN OR EIGHT WORDS. A CORRECT GUESS WILL PRODUCE A RESPONSE OF '4-0'. IF YOU DON'T GUESS RIGHT IN TEN MOVES, THE COMPUTER WILL GIVE YOU THE ANSWER. AFTER A CORRECT GUESS, OR AFTER THE COMPUTER TELLS YOU THE ANSWER, IT WILL START A NEW GAME (WITH A NEW SECRET CODE) THE INSTANT YOU TOUCH A NEW KEY. 0200 E6 16 GO INC RND+4 randomize 0202 20 40 1F JSR KEYIN 'on' pushbutton delay 0205 D0 F9 BNE GO 0207 D8 CLD 0208 A9 0A NEW LDA #$0A ten guesses/game 020A 85 18 STA COUNT new game starting 020C A9 03 LDA #3 create 4 mystery codes 020E 85 10 STA POINTR 0210 38 RAND SEC one plus... 0211 A5 13 LDA RND+1 ...three previous 0213 65 16 ADC RND+4 random numbers 0215 65 17 ADC RND+5 0217 85 12 STA RND =new random value 0219 A2 04 LDX #4 021B B5 12 RLP LDA RND,X move random numbers over 021D 95 13 STA RND+1,X 021F CA DEX 0220 10 F9 BPL RLP 0222 A6 10 LDX POINTR 0224 A0 C0 LDY #$C0 divide by 6 0226 84 11 STY MOD keeping remainder 0228 A0 06 LDY #6 022A C5 11 SET CMP MOD 022C 90 02 BCC PASS 022E E5 11 SBC MOD 0230 46 11 PASS LSR MOD 0232 88 DEY 0233 D0 F5 BNE SET continues division 0235 18 CLC 0236 69 0A ADC #$0A random value A to F
29
30
31
32
33
Start the Program at 0200 and on the right, you'll see the $25 that KIM has given you to play with, The funny symbols on the left are your "wheels" - hit any key and see them spin. Every time you spin the wheels by hitting a key it costs you $1. When the wheels stop, you might have a winning combination, in which case you'll see money being added to your total on the right. Most of the time, you'll get nothing ... but that's the luck of the game. The biggest Jackpot is $15: that's three bars across the display. Other combinations pay off, too; you'll soon learn to recognize the "cherry" symbol, which pays $2 every time it shows in the left hand window. There's no house percentage, so you can go a long time on your beginning $25. The most you can make is $99; and if you run out of money, too bad; KIM doesn't give credit. BANDIT MICRO-WARE ASSEMBLER 65XX-1.0 PAGE 01 0010: 0020: ****************************** 0030: ***** ONE ARMED BANDIT ***** 0040: ***** BY JIM BUTTERFIELD ***** 0050: ****************************** 0060: 0070: 02D1 WINDOW * $0000 DISPLAY WINDOW 0080: 02D1 AMT * $0005 CASH CACHE 0090: 02D1 ARROW * $0006 0100: 02D1 RWD * $0007 REWARD 0110: 02D1 STALLA * $0008 WAIT WHILE 0120: 02D1 TUMBLE * $0009 0130: 0140: LINKAGES TO KIM 0150: 0160: 02D1 KEYIN * $1F40 IS KEY DEPRESSED? 0170: 02D1 PADD * $1741 0180: 02D1 SAD * $1740 0190: 02D1 SBD * $1742 0200: 02D1 TABLE * $IFE7 HEX:7 SEG
34
35
36
37
A teaching program which drills you on binary and hexadecimal numbering schemes. It's kind of fun just as a speed test. Start the program at 0200 and you'll see eight bits on the left side of the display. Some of the bits are in the lower position, meaning 'off' or zero. Others will be in the top row, where they mean 'on' or logic one. All you have to do is translate those bits into hexadecimal notation, and enter the hex value. For example, if all bits happen to be 'on', the number you'd enter is FF; or if all the bits were 'off', you'd enter 00. KIM rewards a correct answer with another problem. If you're not yet at ease with the concept of bits and how they relate to hexadecimal numbering, a few runs of this program will help a lot. 0200 D8 START CLD 0201 A9 01 LDA #1 Set FLAG2 0205 85 1D STA FLAG2 .. to new problem 0205 20 40 1F MAIN JSR KEYIN set directnl reg 0208 20 6A 1F JSR GETKEY get key input 020B C5 14 CMP PREV same as last time? 020D F0 50 BEQ LIGHT yes, skip 020F 85 14 STA PREV record new input 0211 C9 15 CMP #$15 no key? 0213 F0 1C BEQ NOKEY yes, brnch 0215 A6 1C LDX FLAG1 first digit found? 0217 D0 0C BNE DIG1 yes, check second 0219 C5 16 CMP SEED1 first digit match? 021B D0 42 BNE LIGHT no, ignore input 021D AA TAX 021E BD E7 1F LDA TABLE,X change to segment 0221 85 1C STA FLAG1 ..store. 0223 D0 3A BNE LIGHT .. and exit 0225 C5 17 DIG1 CMP SEED2 second digit match? 0227 D0 36 ENE LIGHT no, ignore input 0229 AA TAX 022A BD E7 1F LDA TABLE,X change to segment 022D 85 1D STA FLAG2 022F D0 2E BNE LIGHT 0231 A6 1D NOKEY LDX FLAG2 problem solved? 0233 F0 2A BEQ LIGHT not yet, skip 0235 A9 00 LDA #0 Clear.. 0237 85 1C STA FLAG1 ..for new problem 0239 85 1D STA FLAG2 023B AD F4 1A LDA TIMER get random value 023E AA TAX 023F 29 0F AND #$0F extract last digit 0241 85 17 STA SEED2 .. and store
38
39
Description: KIM uses a 'real' deck of cards in this game. So when you've seen four aces going by, you know that there will be no more - until the next shuffle. BLACKJACK starts at address 0200. You'll see the cards being shuffled - the word SHUFFL appears on the display - and then KIM will ask how much you want to bet. You'll start with an initial amount of $20. Your balance is always shown to the right of the BET? question, so on the first hand, you'll see BET? 20 on the display. You may bet from $1 to $9, which is the house limit. The instant you hit key 1 to 9 to signal your bet, KIM will deal. Of course, you can't bet more money than you have ... and KIM ignores freeloaders who try to bet a zero amount. After the deal, you'll see both your cards on the left of the display, and one of KIM's cards on the right. (KIM's other card is a 'hole card, and you won't see it until it's KIM's turn to play). Aces are shown as letter A, face cards and tens as letter F, and other cards as their value, two to nine. As always, Aces count value 1 or 11 and face cards count 10. You can call for a third card by hitting the 3 button .. then the fourth card with the 4 button, and so on. If your total goes over 21 points, KIM will ungrammatically say BUSTED, and you'll lose. If you get five cards without exceeding 21 points, you'll win automatically. If you don't want any more cards, hit key 0. KIM will report your point total, and then will show and play its own hand. KIM, too, might go BUSTED or win on a five-card hand. Otherwise, the most points wins. >From time to time, KIM will advise SHUFFL when the cards start to run low. Remember that you have a good chance to beat KIM at this game. Keep track of the cards that have been dealt (especially aces and face cards), and you're likely to be a winner.' 0200 A2 33 START LDX #51 52 cards in deck 0202 8A DK1 TXA Create deck 0205 95 40 STA DECK,X by inserting cards 0205 CA DEX into deck 0206 10 FA BPL DK1 in sequence 0208 A2 02 LDX #2 Set up 5 locations 020A BD BB 03 INLOP LDA INIT,X ..into.. 020D 95 75 STA PARAM zero page 020F CA DEX addresshi/ dpt/ amt
40
41
42
43
44
45
46
47
0000 A2 06 INIT LDX #$06 CLEAR DISPLAY 0002 A0 00 LDY #$00 (8C-91)=0 0004 94 8B INIT 1 STY 008B,X 0006 CA DEX 0007 D0 FB BNE INIT 1 0009 D8 CLD 000A A2 34 LDX #$34 FILL DECK 000C 86 92 STX 0092 STORE CARDS LEFT (52) 000E C8 INY (93-C6)=1 000F 94 92 INIT 2 STY 0092,X 0011 CA DEX 0012 D0 FB BNE INIT 2 0014 A5 92 NEWCRD LDA 0092 DECK FINISHED? 0016 D0 03 BNE RANDOM 0018 4C 4F 1C JMP START YES, STOP 0018 AD 04 17 RANDOM LDA 1704 GET RANDOM # (1-FF) 001E D0 0B BNE FASTER 0020 AD 44 17 LDA 1744 0023 D0 06 BNE FASTER 0025 A5 92 LDA 0092 BOTH CLOCKS OUT OF RANGE 0027 4A LSR # APPROX. MIDDECK 0028 18 CLC 0029 69 01 ADC #$01 002B C5 92 FASTER CMP 0092 GET NUMBER 1-34 002D 90 07 BCC FIND 002F F0 05 BEQ FIND 0031 E5 92 SBC 0092 0033 4C 2B 90 JMP FASTER 0036 A2 33 FIND LDX #$33 FIND ThE CARD 0038 38 FIND 1 SEC KEEP SUBTRACTING CARD 0039 F5 93 SBC 0093,X CARD=0 MEANS PICKED 003B F0 93 BEQ UPDATE CARD=1 MEANS IN DECK 003D CA DEX X=CARD POSITION 003E 10 F8 BPL FIND 1 0040 95 93 UPDATE STA 0093,X CARD=0 0042 C6 92 DEC 0092 1 LESS CARD LEFT 0044 8A TXA GET FIRST 6 BITS OF X 0045 4A LSR Y=(0-C) 0046 4A LSR 0047 A8 TAY
48
49
DESCRIPTION - THE PROGRAM STARTS AT LOCATION 0200. TWO INDEPENDENT CLOCKS ARE OPERATED BY THE TWO PLAYERS BY DEPRESSING KEYS 1 OR 2 RESPECTIVELY. THE RIGHT TWO DIGITS SHOW THE MOVE NUMBER, THE LEFT FOUR DIGITS SHOW MINUTES AND SECONDS. MAXIMUM TIME IS 99 MINUTES 59 SEC. THE CLOCK PROGRAM CAN BE FINELY TUNE BY CHANGING THE VALUE OF WORD 027F, INCREASE BY 1 SLOWS THE CLOCK BY APPROXIMATELY 6 SEC/24 HOURS AND VICE VERSA. 0200 A9 00 LDA #$00 ZERO ALL OF PAGE ZERO 0202 AA TAX 0203 9D 00 00 ZERO STA 0000,X 0206 E8 INX 0207 D0 FA BNE ZERO 0209 20 1F 1F DISF JSR SCANDS DISPLAY ZEROS 020C 20 6A 1F JSR GETKEY KEY PRESSED? 020F C9 02 CMP #$02 KEY # 2? 0211 D0 F6 BNE DISP NO, WAIT TILL 2 DOWN 0213 A9 01 LOOP LDA #$01 FLAG TO 1 0215 85 D4 STA 00D4 (CLOCK *1 TO RUN) 0217 20 60 02 JSR TIME GET CLOCK RUNNING 021A 20 31 02 JSR SAVE SAVE TIME ON DISPLAY 021D A9 02 LDA #$02 FLAG TO 2 021F 85 D4 STA 00D4 (CLOCK *2 TO RUN) 0221 20 60 02 JSR TIME GET OTHER CLOCK RUNNING 0224 18 CLC ... INCREMENT MOVE 0225 A5 F9 LDA 00F9 NUMBER... 0227 69 01 ADC #$01 0229 85 F9 STA 00F9 022B 20 31 02 JSR SAVE SAVE CLOCK 2 TINE 022E 4C 13 02 JMP LOOP BACK TO CLOCK ~ 1 XXXX SAVE TIME INDICATED SUBROUTINE XXXX 0231 A9 02 SAVE LDA #$02 CLOCK * 2? 0233 C5 D4 CMP 00D4 0235 D0 11 BNE CLK1 NO, STORE FOR CLOCK # 1 0237 A5 FB LDA 00FB . .. STORE VALUES FOR 0239 85 D2 STA 00D2 CLOCK * 2 IN 0002 023B A5 FA LDA 00FA AND 0003 023D 85 D3 STA 00D3 023F A5 D0 LDA 00D0 .. LOAD DISPLAY WITH 0241 85 FB STA 00FB VALUES FOR CLOCK # 1 0243 A5 D1 LDA 00D1 0245 85 FA STA 00FA 0247 60 RTS 0248 A5 FB CLK1 LDA 00FB ... STORE VALUES FOR 024A 85 D0 STA 00D0 CLOCK * 1 IN 00D0 024C A5 FA LDA 00FA AND 0001 024E 85 D1 STA 00D1 0250 A5 D2 LDA 00D2 ... LOAD DISPLAY WITH 0252 85 FB STA 00FB VALUES FOR CLOCK * 2 0254 A5 D3 LDA 00D3 0256 85 FA STA 00FA 0258 60 RTS
50
51
This clock routine uses KIM's built in interval timer with the interrupt option. It works by loading $F4 into the timer (/1024) each time the Non-Maskable Interrupt (NMI) occurs. This theoretically pro- duce a time of 249,856 microseconds or just under 1\4 second. The adjust- ment to 1\4 second is done with the timer (/1) in the interrupt routine. A fine adjustment of the clock can be made by modifying the value in location $0366. Only two subroutines will be documented here (ESCAPE TO KIM & HOUR CHIME) but many more can be added by simply replacing the NOP codes starting at $03DE with jumps to your own subroutines. For instance, a home control system could be set up using the clock program. The escape to KIM allows KIM to run without stopping the clock. This means that you can run other programs simultaneously with the clock program unless your program also needs to use the NMI (such as single step operation) or if there could be a timing problem (such as with the audio tape operation). Pressing the KIM GO button will get you out of the KIM loop. To start the clock: 1. Connect PB7 (A-15) to NMI (E-6). 2. Initialize NMI pointer (17FA, 17FB) with 60 and 03. 3. Set up the time and AM-PM counter locations in page zero. 4. Go to address $03C0 and press GO. To get back into the clock display mode if the clock is run- ning - start at location $03C9. NOTE: These routines are not listed in any particular order so be watchful of the addresses when you load them. PAGE ZERO LOCATIONS 0070 NOTE Sets frequency of note 0080 QSEC 1\4 second counter 0081 SEC second counter 0082 MIN minute counter 0083 HR hour counter 0084 DAY day counter for AM-PM
52
53
54
55
DESCRIPTION - THIS PROGRAM REQUIRES THAT A SPEAKER BE HOOKED TO PA0 AS IN FIGURE 5.1 OF THE KIM MANUAL. WHEN STARTED AT 0200, THE PROGRAM WILL SEND 5 LETTER CODE GROUPS, (INTERNATIONAL MORSE), OVER THE SPEAKER. THE CODE GROUPS WILL CONSIST OF RANDOM CHARACTERS INCLUDING A-Z, 0-9, A PERIOD, COMMA, QUESTION MARK AND EQUAL SIGN. AFTER THIS TRANSMISSION, YOUR RECEPTION CAN BE CHECKED BECAUSE THE GROUPS SENT WILL BE SHOWN ON THE DISPLAY. PRESSING ANY KEY WILL CAUSE THE NEXT GROUP TO BE DISPLAYED. LIMITATIONS IMPOSED BY THE 7 SEGMENT DISPLAYS MAKE SOME CHARACTERS PRETTY STRANGE AND THERE IS SOME REDUNDANCY; BUT BY SLOWING THE TRANSMISSION YOU SHOULD BE ABLE TO FIGURE OUT WHAT EACH CHARACTER IS. 0200 A2 0C LDX #$0C ... INITIALIZATION 0202 BD DF 02 INIT LDA 02DF,X .. 12 VALUES ARE LOADED 0205 95 E2 STA 00E2,X FROM 00E2 ON UP .. 0207 CA DEX 0208 10 F8 BPL INIT 020A A2 04 GRUP LDX #$04 (SPACE LENGTH) 020C 20 A0 02 JSR SPACE SPACE FOR ANOTHER GROUP 020F A9 06 LDA #$06 GROUP SIZE, 5 CHAR. 0211 85 E0 STA 00E0 0213 C6 E0 CHAR DEC 00E0 NEXT CHAR. IN GROUP 0215 F0 F3 BEQ GRUP FINISHED, GET NEW GROUP 0217 A2 03 LDX #$03 (SPACE LENGTH) 0219 20 A0 02 JSR SPACE SPACE BETWEEN CHAR. 021C 20 CB 02 NUMB JSR RAND GET A RANDOM it 021F 29 3F AND #$3F MAKE SURE POSITIVE 0221 C9 28 CMP #$28 LESS THAN 41 (DECIMAL)? 0223 10 F7 BPL NUMB NO, GET ANOTHER 0225 AA TAX USE AS INDEX 0226 BD 13 03 LDA 0313,X GET DISPLAY CONVERSION 0229 A4 E2 LDY 00E2 CHAR. INDEX IN Y 022B 99 3B 03 STA 033B,Y STORE CONVERSION 022E E6 E2 INC 00E2 INDEX UP ONE 0230 A5 E2 LDA 00E2 LAST CHARACTER? 0232 C9 1A CMP #$1A 0234 F0 20 BEQ DEBO YES, GO READOUT 0236 BD EB 02 LDA 02EB,X GET CODE CHARACTER 0239 85 DF STA 00DF TEMPORARY STORE 023B 06 DF BITS ASL 00DF SHIFT 023D F0 D4 BEQ CHAR EMPTY, GET NEXT CHAR. 023F B0 0D BCS DASH IF CARRY SET, SEND DASH 0241 A2 01 LDX #$01 . ELSE SEND DOT 0243 20 82 02 JSR MARK 0246 A2 01 SPAC LDX #$01 THEN SPACE
56
57
58
DESCRIPTION - SET ADDRESS 0200, THEN HOLD "GO" DOWN .. YOU'LL SEE: - 2 DICE "ROLLING" ON THE LEFT - $10 BALANCE ON THE RIGHT LET "GO" ... THE DICE WILL STOP ROLLING, AND YOU'LL GET: - A WIN ON A TOTAL OF 7 OR 11; YOU'LL SEE YOUR DOLLAR BALANCE RISE; OR - A LOSS ON TOTALS OF 2,3, OR 12; YOUR DOLLAR BALANCE WILL DROP; OR - A "POINT" - THE CENTER SEGMENTS WILL LIGHT WITH THE ROLL AND YOU MUST TRY TO ROLL THIS TOTAL AGAIN BEFORE YOU ROLL 7 - PUSH THE "GO" BUTTON ONLY ON THE FIRST ROLL. FOR SUBSEQUENT ROLLS, PUSH ANOTHER BUTTON. 0200 D8 START CLD 0201 20 40 1F JSR KEYIN 0204 20 CA 1F JSR GETKEY 0207 C5 40 CMP LAST 0209 F0 79 BEQ LIGHT same key as before? 020B 85 40 STA LAST 020D 49 15 EOR #$15 no-key test 020F 85 41 STA FLAG into flag 0211 C9 06 CMP #6 GO key? 0213 D0 05 BNE NOGO nope.. 0215 A9 10 LDA #$10 yes, $10 0217 20 A9 02 JSR DOBUX put in window 021A AD 04 17 NOGO LDA TIMER random value 021D A2 C0 LDX #$C0 divide by 6 021F 86 4E STX DIVR 0221 A2 05 LDX #5 0223 C5 4E RNDLP CMP DIVR divide.. 0225 90 02 BCC RNDOV ..a.. 0227 E5 4E SBC DIVR ..digit 0229 46 4E RNDOV LSR DIVR 022B CA DEX 0220 10 F5 BPL RNDLP 022E AA TAX die 0-5 022F E8 INX die 1-6 0230 BD E7 1F LDA TABLE,X segment 0233 A4 41 LDY FLAG which die? 0235 F0 06 BEQ PLAY second? 0237 86 42 STX DIE first, save it.. 0239 85 43 STA WINDX ..& segment 023B D0 47 BNE LIGHT unconditional 023D 85 47 PLAY STA WINDOW+1 show die.. 023F A5 43 LDA WINDX ..and other 0241 85 46 STA WINDOW one 0243 A5 44 LDA BUX out of dough?
59
60
61
DESCRIPTION - THIS IS A GAME FOR TWO PLAYERS. WHEN THE PROGRAM IS STARTED AT 0200, EACH PLAYER IS GIVEN TEN POINTS AS INDICATED ON OPPOSITE SIDES OF THE DISPLAY. THE CENTER DIGITS WILL BE BLANK. AFTER A RANDOM DELAY, THE CENTER DIGITS WILL LIGHT. THE FIRST PLAYER TO PRESS HIS KEY WILL INCREASE HIS SCORE BY ONE AND DECREASE HIS OPPONENT'S BY ONE. THE CENTER DIGITS WILL THEN BLANK FOR ANOTHER RANDOM DELAY. IF A FLAYER PRESSES HIS KEY WHILE THE CENTER DIGITS ARE BLANK, HIS SCORE WILL BE DECREASED BY ONE. WHEN ONE PLAYER REACHES ZERO THE GAME IS OVER AND MUST BE RESTARTED AT 0200. THE PLAYER TO THE LEFT USES KEY ZERO AND THE ONE ON THE RIGHT USES KEY SEVEN. 0200 A9 10 LDA #$10 INITIALIZE DIGITS 0202 85 F9 STA 00F9 0204 85 FB STA 00FB 0206 AD 44 17 RAND LDA 1744 GET "RANDOM" # 0209 29 1F AND #$1F NOT TOO BIG 020B 09 01 ORA #$01 NOT TOO SMALL 020D 85 EE STA 00EE PUT IN DECREMENT LOC. 020F A9 00 LDA #$00 BLANK CENTER DIGITS 0211 85 FA STA 00FA 0213 20 71 02 DISP JSR LITE DISPLAY DIGITS 0216 AD 07 17 LDA 1707 TIME UP? 0219 F0 0D BEQ MORE NO 021B A9 FF LDA #$FF 021D 8D 07 17 STA 1707 START TIMER 0220 C6 EE DEC 00EE FULL TIME UP? 0222 10 04 BPL MORE NO, SKIP 0224 A9 36 LDA #$36 YES, CHANGE 0226 85 FA STA 00FA CENTER DIGITS 0228 D8 MORE CLD CLEAR FOR KEYBOARD 0229 20 40 1F JSR KEYIN INIT. KEYBOARD 022C 20 6A 1F JSR GET KEY KEY DEPRESSED? 022F CS 15 CMP #$15 VALID KEY? 0231 10 E0 BPL DISP NO 0233 C9 07 CMP #$07 RIGHT KEY? 0235 F0 0E BEQ RITE YES 0237 C9 00 CMP #$00 LEFT KEY? 0239 F0 02 BEQ LEFT YES 023B D0 D6 BNE DISP NOT A 0 OR A 7 023D A2 02 LEFT LDX #$02 INDEX FOR LEFT 023F A5 EE LDA 00EE TIME UP? 0241 10 14 BPL LOS1 NO DECREASE LEFT ONE 0243 30 06 BMI ADD1 YES, INCREASE LEFT 0245 A2 00 RITE LDX #$00 INDEX FOR RIGHT 0247 A5 EE LDA 00EE CHECK TIME 0249 10 0C BPL LOS1 NOPE, NOT YET
62
63
FARMER BROWN
You are farmer Brown. You are growing a beautiful crop of corn But the following animals try to come and steal your corn:

As soon as you see one of these animals coming for your corn,
you can scare it away by calling its name. Press the button
with the first letter of the animal's name. So you would
press A to shoo away an ant, B to shoo away a bird, and so on.
If you press the right button, the animal will go back. if you
press the wrong button, it will think you mean somebody else
and keep coming for your corn. And when all your corn is gone,
KIM will show 000 and the game is over.
The animal won't "shoo" unless it has completely entered the
display. Speed of the animals can be adjusted by changing the
contents of location 02EA.
0200 A2 0D START LDX #$13
0202 86 6E STX CORN bushels of corn to start
0204 A9 00 LDA #0 clear the window
0206 95 60 SLOOP STA WINDOW,X
0208 CA DEX
0209 10 FE BPL SLOOP
020B A2 0B TEST LDX #11 is window enipty?
020D B5 60 TLOOP LDA WINDOW,X
020F D0 3B BNE CONTIN no. keep going
0211 CA DEX
0212 10 F9 BPL TLOOP
0214 E6 6D INC GOT yes. make new animal
0216 A5 6C LDA FLAG
0218 F0 09 BEQ MORE did last animal get in?
021A C6 6D DEC GOT
021C C6 6E DEC CORN take away some corn
021E D0 03 BNE MORE any left?
0220 4C 25 19 JMP DONE no, end of game
0223 AD 04 17 MORE LDA TIMER random value..
0226 4A 4A 4A LSRA LSRA LSRA ..to generate..
0229 4A 4A LSRA LSRA ..new random animal
022B C9 06 CMP #6 6 types of animal
022D 90 02 BCC MAKE
022F 29 93 AND #$03
0231 18 MAKE CLC
0232 AA TAX animal type to X
0233 69 0A ADC #$0A key type A to F
64
65
Exercises: 1. You can see that each animal occupies 6 memory locations, starting at 02AA (the Ant) - and the last location must always be zero. Can you make up your own animals? The letters may not fit exactly, but you can always invent names or use odd ones (you could make an Aardvark, a Burfle, a Cobra, and so on). 2. The game might be more fun if the animals went faster after a while, so that sooner or later they would just zip by. The location that controls speed is at address 026A; the lower the number, the faster the animals will go. So if you could arrange to have the program decrease this number automatically once in a while, you1d get a nice speed-up feature. 3. You can't "shoo" the animal until it's completely entered the display; but you can still catch it after it's partly left. The game would be harder - and maybe more fun - if you could only shoo it while it was completely in the display. Hint - testing location 005F (window-1) would tell you if an animal was on its way out. 4. You'd have a "Target Practice" game if you made the animal disappear (instead of backing up) when you pressed the right button. With a little planning, you'll find that this is quite easy to do. ***** HEX DUMP - FARMER BROWN ***** 0200- A2 0D 86 6E A9 00 95 60 CA 10 FB A2 0B B5 60 D0 0210- 3B CA 10 F9 E6 6D A5 6C F0 09 C6 6D C6 6E D0 03 0220 4C 25 19 AD 04 17 4A 4A 4A 4A 4A C9 06 90 02 29 0230- 03 18 AA 69 0A 85 6F BD A4 02 85 70 A9 02 85 71 0240- A0 05 B1 70 99 66 00 88 10 F8 84 6C A2 05 B5 66 0250- D0 13 CA 10 F9 20 40 1F 20 6A 1F C5 6F D0 06 A5 0260- 6C 10 02 E6 6C C6 72 D0 1E A9 20 85 72 A5 6C 30 0270- 0D A5 0A B5 5A 95 5B CA D0 F9 86 5A F0 09 A2 F0 0280- B5 6C 95 6B E8 30 F9 A9 7F 8D 41 17 A0 13 A2 05 0290- B5 60 8D 40 17 8C 42 17 E6 73 D0 FC 88 88 CA 10 02A0- EF 4C 0B 02 AA B0 B6 BC C2 C8 08 00 00 00 00 00 02B0- 01 61 61 40 00 00 61 51 47 01 00 00 63 58 4E 00 02C0- 00 00 71 1D 41 1F 01 00 63 58 4C 40 00 00
66
DESCRIPTION -
AN EASY GAME FOR ONE OR MORE PLAYERS. KIM CHOOSES A SECRET NUMBER FROM 0l TO 98. AT THE START, THE FIRST FOUR DIGITS SHOW THE HIGH AND LOW BOUNDS OF THE NUMBER - 99 HIGH AND 00 LOW. AS GUESSES ARE ENTERED - ENTER THE GUESS AND PRESS A FOR ATTEMPT - THE BOUNDS CHANGE AS YOU ARE NARROWING DOWN THE POSSIBILITIES. FOR EXAMPLE, GUESS 32 AND THE DISPLAY MIGHT CHANGE TO 32 00, MEANING THAT THE COMPUTER'S SECRET NUMBER IS BETWEEN THESE VALUES. AFTER EACH LEGAL GUESS, THE COMPUTER SHOWS THE NUMBER OF ATTEMPTS MADE SO FAR. ONE PLAYER GAME: TRY TO GET THE MYSTERY NUMBER IN SIX ATTEMPTS. MULTI PLAYER GAME: EACH PLAYER TRIES TO AVOID GUESSING THE MYSTERY NUMBER - THE CORRECT GUESSER LOSES AND IS "OUT". 0200 F8 START SED 0201 A5 E0 TOP LDA RND generate random # 0203 38 SEC 01 to 98 0204 69 00 ADC #0 0206 A2 01 LDX #1 overflow at 99 0208 C9 99 CMP #$99 020A D0 01 BNE OVR0 020C 8A TXA 020D 85 E0 OVR0 STA RND 020F 20 40 1F JSR KEYIN 0212 D0 ED BNE TOP 0214 D8 CLD initialize: 0215 A9 99 LDA #$99 hi 0217 85 FB STA POINTH 0219 A9 00 LDA #0 021B 85 FA STA POINTL and lo 021D A2 A0 RSET LDX #$A0 guess counter 021F 86 F9 NSET STX INH 0221 86 E1 STX NGUESS 0223 20 1F 1F GUESS JSR SCANDS light display 0226 20 6A 1F JSR GETKEY test key 0229 C9 13 CMP #$13 go key? 022B F0 D3 BEQ START 022D C5 E2 CMP LAST 022F F0 F2 BEQ GUESS same key? 0231 85 E2 STA LAST
67
68
DESCRIPTION -
THIS IS AN EIGHT LAP HORSE RACE AND YOU CAN BE THE JOCKEY AND WHIP YOUR HORSE TO GO FASTER. WARNING ...WHIP THE HORSE TOO MUCH AND HE PROBABLY POOPS OUT. THE PROGRAM STARTS AT 0200. HORSE TRACK WHIPPING BUTTON PRINCE CHARMING TOP PC COLORADO COWBOY MIDDLE C IRISH RAIR BOTTOM 4 0200 D8 CLD ...INITIALIZATION... 0201 A2 13 LDX #$13 0203 BD D9 02 INIT LDA 02D9,X HORSES TO STARTING GATE 0206 95 7C STA 007C,X 0208 CA DEX 0209 10 F8 BPL INIT 020B A9 7F DISP LDA #$7F ...LIGHT DISPLAY... 020D 8D 41 17 STA 1741 0210 A0 00 LDY #$00 0212 A2 09 LDX #$09 0214 B9 7C 00 LITE LDA 007C,Y 0217 84 FC STY 00FC 0219 20 4E 1F JSR 1F4E OUTPUT DIGIT 021C C8 INY 021D C0 06 CPY #$06 SIX DIGITS DISPLAYED? 021F 90 F3 BCC LITE NOT YET 0221 20 3D 1F JSR 1F3D TURN OFF DIGITS 0224 A5 8F LDA LAP CNT.FINISHED TOTAL LAPS? 0226 30 E3 BMI DISP YES, FREEZE DISPLAY 0228 A2 03 LDX #$03 022A CA NEXT DEX NEXT HORSE 022B 30 DE BMI DISP FINISHED 3 HORSES 022D D6 86 DEC 0086,X DEC. CNT., HORSE X 022F D0 F9 BNE NEXT NOT ZERO, NEXT HORSE 0231 86 99 STX 0099 SAVE HORE INDEX 0233 A4 99 LDY 0099 AND PUT IN Y AS INDEX 0235 B6 83 LDX 0083,Y DIGIT P05. OF HORSE IN X 0237 B9 ED 02 LDA 02ED,Y MASK TO REMOVE HORSE 023A 35 7C AND 007C,X GET RID OF HORSE 023C 95 7C STA 007C,X RETURN REMAINING HORSES 023E E8 INX GO TO NEXT DIGIT RIGHT 023F 96 83 STX 0083,Y UPDATE HORSE DIGIT POS. 0241 B9 ED 02 LDA 02ED,Y GET MASK 0244 49 FF EOR #$FF CHANGE TO AN INSERT MASK 0246 15 7C ORA 007C,X PUT HORSE IN NEXT 0248 95 7C STA 007C,X DIGIT RIGHT 024A E0 05 CPX #$05 REACHED RIGHT SIDE? 024C 30 2B BMI POOP NOT YET 024E D0 06 BNE NLAP OFF RIGHT SIDE, CHANGE LAP 0250 A5 8F LDA 008F CHECK LAP COUNTER 0252 F0 1B BEQ LAST IF ZERO, LAST LAP 0254 D0 23 BNE POOP
69
70
71
Ever wish you could touch-type your KIM keypad like some people can type? It's not hard; all you need is practice. And what better teacher to drill you on key entry than the KIM system itself? Load this fully relocatable program anywhere. Start it up, and the display will show a random hexadecimal digit, from 0 to F. Hit the corresponding key, and the display will blank, and then present you with another random digit. Hit the wrong key and nothing will happen. The educational principle involved is called positive reinforcement. That is, you're rewarded for doing the right thing, and ignored if you do it wrong. A few minutes of practice a day. and you'll become a speed demon on the keyboard! 0000 20 40 1F START JSR KEYIN 0003 D0 FB BNE START key still depressed - blank 0005 AD 04 17 LDA TIMER random value 0008 4A 4A LSRA LSRA wipe high order bits 000A 4A 4A LSRA LSRA 000C 85 FF STA TEMP save the digit 000E 0A 0A ASLA ASLA move back left 0010 0A 0A ASLA ASLA 0012 05 FF ORA TEMP repeat the digit 0014 85 F9 STA INH put.. 0016 85 FA STA FOINTL ..into.. 0018 85 FB STA P0INTH .. display 001A 20 1F 1F LIGHT JSR SCANDS light display 001D 20 6A 1F JSR GETKEY test keys 0020 C5 FF CMP TEMP right key? 0022 F0 DC BEQ START yes, blank & rpeat 0024 D0 F4 BNE LIGHT The random number used in this program is taken from the KIM timer. This timer runs continuously and might be anywhere between 00 and FF at the instant we push the button. We use the four left hand (high order) bits of the timer to produce the next digit. Be sure that KIM is not in decimal mode when you run this program - set address 00F1 to 00 before starting. If You forget, you might find that the alphabetic keys (A to F) don't work right. Exercises: can you make the program clear decimal mode automatically? How about a counter to record the number of correct keystrokes you have made? That way, you could time yourself to see how many keys you can get right in 60 seconds. The count could be shown in the two right hand digits of the display. Do you think it should be in decimal or hexadecimal?
72
KIM NIM
Here's a jumbo NIM that's good for all skill levels. Why? Because KIM matches wits with you - literally. Play a duffer's game and KIM will make lots of errors, too. Start winning a few - and KIM will move up to the master player level. Hit GO and several digits on the KIM display will light. Each lit digit represents a pile of objects you can pick from. Decide which pile you want, and enter its identity: A for the left-hand pile through to P for the right-hand pile. The pile you have selected will start to flash on and off. Now enter the number of items you want to take from that pile. KIM will take its turn the same way - you'll see the pile selected begin to flash, and then some items will be taken away. After the computer moves, it's your turn again. The winner is the player who takes the last object. When this happens, KIM will identify the winner. A new game can be started at any time by hitting GO. 0200 20 40 1F START JSR KEYIN directional regs 0203 20 6A 1F JSR GETKEY 0206 C9 13 CMP #$13 GO key? 0208 D0 3A BNE NOGO nope, skip 020A AD 04 17 LDA TIMER get random nbr 020D A2 02 LDX #2 split into 3 020F A8 SPLIT TAY save A 0210 29 07 AND #7 extract 3 bits 0212 F0 03 BEQ ZINCH unless zero.. 0214 18 CLC ..add two 0215 69 02 ADC #2 0217 95 04 ZINCH STA VALUE,X store pile val 0219 98 TYA bring back rand 021A 4A 4A 4A LSRA LSRA LSRA 021D CA DEX 021E 10 EF BPL SPLIT 0220 20 40 1F STALL JSR KEYIN wait for.. 0223 D0 FB BNE STALL ..key release 0225 AD 04 17 LDA TIMER new random nbr 0228 A2 02 LDX #2 split 3 ways 022A A8 SPLAT TAY again 022B 29 07 AND #7 3 bits 022D 95 07 STA VALUE+3,X 022F 98 TYA 0230 4A 4A 4A LSRA LSRA LSRA 0233 CA DEX 0234 10 F4 BPL SPLAT 0236 85 01 STA PILE pile zero 0238 85 02 STA MOVE it's your move 023A A2 06 LDX #6 for each pile..
73
74
75
76
(Deleted due to error in copying)
83
Description -
This program starts at 0200. When started, you will find yourself at 4500 feet and falling. The thrust on your machine is set to low; so you will pick up speed due to the force of gravity. You can look at your fuel at any time by pressing the "F" button. Your fuel (initially 800 pounds) will be shown in the first four digits of the KIM display. The first two digits of the KIM display always show your rate of descent or ascent. "A" restores altitude. Set your thrust by pressing buttons 1 through 9. Warning: button 0 turns you motor off, and it will not reignite! A thrust of 1, minimum, burns very little fuel; but gravity will be pulling your craft down faster and faster. A thrust of 9, maximum, overcomes gravity and reduces your rate of descent very sharply A thrust of 5 exactly counterbalances gravity; you will continue to descend (or ascend) at a constant rate. If you run out of fuel, your thrust controls will become inoperative. A safe landing is considered to be one where you land at a descent rate of 5 or less. After you land, your thrust controls will be inoperative, since the motor is automatically turned off; but you can still preff "F" to look at your fuel. Pressing "GO" starts a new flight. Suggestions for a safe flight: (1) Conserve fuel at the beginning by pressing 1. You begin to pick up speed downwards. (2) When your rate of descent gets up to the 90's, you're falling fast enough. Press 5 to steady the rate. (3) When your altitude reaches about 1500 feet, you'll need to slow down. Press 9 and slow down fast. (4) When your rate of descent has dropped to 15 or 20, steady the craft by pressing 5 or 6. Now you're on your own. ; main routine - initialization 0200 A2 0D GO LDX #13 fourteen bytes 0202 BD CC 02 LP1 LDA INIT,X 0205 95 D5 STA ALT,X 0207 CA DEX 0208 10 F8 BPL LP1 ; Update height and velocity 020A A2 05 CALC LDX #5 020C A0 01 RECAL LDY #1 020E F8 SED 020F 18 CLC
84
85
86
87
DESCRIPTION
THIS PROGRAM PLAYS ONE OR SEVERAL TUNES VIA THE "AUDIO OUT" INTERFACE OF KIM-1; USE THE SAME CONNECTION AS THAT FOR RECORDING ON CASSETTE TAPE. IF YOUR TAPE RECORDER HAS A "MONITOR" FEATURE, YOU CAN LISTEN TO THE TUNE AS WELL AS RECORD IT. ALTERNATIVELY, AN AMPLIFIER WILL PLAY THE SIGNAL THROUGH A SPEAKER. HOW TO RUN LOAD THE PROGRAM; LOAD THE TUNE(S) EITHER FROM CASSETTE TAPE, PAPER TAPE, OR KEYBOARD ENTRY. BE SURE TO STORE THE VALUE FA AT THE END OF EACH TUNE, AND BEHIND THE LAST TUNE, STORE: FF 00. STARTING ADDRESS FOR THE PROGRAM IS 200; ENTER AD 0 2 0 0 GO. HOW TO WRITE YOUR OWN TUNE(S) EACH NOTE GOES INTO A BYTE OF STORAGE, STARTING AT LOCATION 0000 OF MEMORY. EACH TUNE SHOULD END WITH THE VALUE FA WHICH STOPS THE PROGRAM UNTIL GO IS PRESSED. SPECIAL CODES ARE INCORPORATED IN THE PROGRAM TO ALLOW CERTAIN EFFECTS - ADJUSTMENT OF SPEED, TONE, ETC. THE CODES ARE FOLLOWED BY A VALUE WHICH SETS THE PARTICULAR EFFECT. CODES ARE LISTED BELOW: CODE EFFECT INITIALLY EXAMPLES FB SETS SPEED OF TUNE $30 18 IS QUICK; 60 IS SLOW FC SETS LENGTH OF 02 2 MEANS, "LONG NOTE LASTS "LONG" NOTES TWICE AS LONG AS SHORT" FD SETS OCTAVE (PITCH) 01 2 IS BASS; 4 IS DEEP BASS. FE SETS INSTRUMENT $FF FF IS PIANO; 00 IS CLARINET FF SETS ADDRESS FOR 00 00 WILL TAKE YOU BACK TO TUNE FIRST TUNE; LIKE A "JUMP" FOR EXAMPLE, AT ANY TIME DURING A TUNE, YOU MAY INSERT THE SEQUENCE FB 18 AND THE TUNE WILL THEN BEGIN TO PLAY AT FAST SPEED. INSERTING FF 45 WILL CAUSE A SWITCH TO THE TUNE AT ADDRESS 45. THE INITIAL VALUES SHOWN CAN BE RESET AT ANY TIME BY STARTING AT ADDRESS 200. NO TUNE SHOULD EXTEND BEYOND ADDRESS DF, SINCE PROGRAM VALUES ARE STORED AT E0 AND UP. THE PROGRAM CAN BE EASILY CONVERTED TO A SUBROUTINE (BY REPLACING THE BRK INSTRUCTION WITH A RTS). THIS ALLOWS THE PROGRAMMER TO PLAY VARIOUS "PHRASES" OF MUSIC TO PRODUCE QUITE COMPLEX TUNES.
88
89
90
91
(Deleted due to error in copying)
94
(Deleted due to error in copying)
99
Description -
Here's a program to test your speed of reaction. Press "GO" and the display will blank for a random period of time. wben it lights, hit any numbered button. The number on the display will tell you how quick you were; the smaller the number, the faster your reaction time. You may play repeatedly, just press "GO" each time you want a new test. 0300 A5 F9 START LDA INH RANDOMIZE DELAY 0302 2A ROL A ..BY MULTIPLYING 0303 65 F9 ADC INH BY 3 AND 0305 29 7F AND #$7F MASKING 0307 85 FB STA POINTH WORK IN DISPLAY AREA 0309 20 40 1F ZIP JSR KEYIN IF YOU CHEAT BY KEYING... 030C D0 fb BNE ZIP PROGRAM WAITS YOU OUT 030E E6 FA INC POINTL 0310 D0 F7 BNE ZIP COUNT DOWN FOR 0312 E6 FB INC POINTH RANDOM DELAY 0314 D0 F3 BNE ZIP 0316 85 F9 STA INH SET TO ZERO 0318 A2 FD RUN LDX #$FD NEGATIVE THREE 031A F8 SED COUNT IN DECIMAL 031B 38 SEC ADD VALUE 1 031C B5 FC DIGIT LDA POINTH+1,X 031E 69 00 ADC #$00 ADD IT IN 0320 95 FC STA POINTH+1,X 0322 E8 INX MOVE ON TO NEXT DIGITS 0323 D0 F7 BNE DIGIT 0325 D8 CLD 0326 20 1F 1F JSR SCANDS LIGHT UP COUNT 0329 F0 ED BEQ RUN AND KEEP COUNTING 032B 20 1F 1F STAND JSR SCANDS 032E 20 6A 1F JSR GETKEY 0331 C9 13 CMP #$13 GO KEY DEPRESSED? 0333 D0 F6 BNE STAND NOPE, HOLD IT 0335 F0 C9 BEQ START YUP, START OVER ***** Hex Dump - Quick ***** 0300- A5 F9 2A 65 F9 29 7F 85 FB 20 40 1F D0 FB E6 FA 0310- D0 F7 E6 FB D0 F3 85 F9 A2 FD F8 38 B5 FC 69 00 0320- 95 FC E8 D0 F7 D8 20 1F 1F F0 ED 20 1F 1F 20 6A 0330- 1F C9 13 D0 F6 F0 C9
100
(Deleted due to error in copying)
105
Description - TIMER turns KIM into a digital stopwatch showing up to 99 minutes and 59.99 seconds. It is designed to be accurate to 50 microseconds per second. The interval timer is used to count 9984 cycles and the instructions between the time out and the reset of the timer make up the other 16 cycles in .01 seconds. The keyboard is used to control the routine as follows: Stop (0), Go (1), Return to KIM {4) , Reset (2). 0200 A9 00 BEGN LDA #$00 0202 85 F9 STA INH ZERO DISPLAY 0204 85 FA STA POINTL 0206 85 FB STA POINTH 0208 20 1F 1F HOLD JSR SCANDS LIGHT DISPLAY 020B 20 6A 1F JSR GETKEY 020E C9 04 CMP #$04 KEY 4? 0210 D0 03 BNE CONT 0212 4C 64 1C JMP 1C64 RETURN TO KIM 0215 C9 02 CONT CMP #$02 KEY 2? 0217 FF E7 BEQ BEGN BACK TO ZERO 0219 C9 0l CMP #$01 KEY 1? 021B D0 EB BNE HOLD 021D A9 9C LDA #$9C 021F 8D 06 17 STA 1706 SET TIMER 0222 20 1F 1F DISP JSR SCANDS DISPLAY VALUE 0225 AD 07 17 CLCK LDA 1707 CHECK TIMER 0228 F0 FB BEQ CLCK 022A 8D 00 1C STA ROM DELAY 4 MrCROSEC. 022D A9 9C LDA #$9C SET TIMER 022F 8D 06 17 STA 1706 0232 18 CLC 0233 F8 SED SET FLAGS 0234 A5 F9 LDA INH 0236 69 0l ADC #$0l rNC. lOOThS 0238 85 F9 STA INH 023A A5 FA LDA POINTL 023C 69 00 ADC #$00 INC. SECONDS 023E 85 FA STA POINTL 0240 C9 60 CMP #$60 STOP AT 60 0242 D0 0B BNE CKEY 0244 A9 00 LDA #$00 0246 85 FA STA POINTL ZERO SECONDS 0248 A5 FB LDA POINTH 024A 18 CLC 024B 69 0l ADC #$01 INC. MINUTES 024D 85 FB STA POINTH 024f D8 CKEY CLO 0250 20 6A 1F JSR GETKEY READ KEYBOARD 0253 C9 00 CMP #$00 KEY 0? 0255 D0 CB BNE DISP 0257 F0 AF BEQ HOLD STOP
106
(Deleted due to error in copying)
113
114
Load this fully relocatable program anywhere. Once it starts, key in the last two digits of a branch instruction address; then the last two digits of the address to which you are branching; and read off the relative branch address. For example, to calculate the branch to ADDR near the end of this program: hit 26 (from 0026); 20 (from 0020) and read F8 on the two right hand digits of the display. The program must be stopped with the RS key. 0000 D8 START CLD 0001 18 CLC 0002 A5 FA LDA POINTL 0004 E5 FB SBC POINTH 0006 85 F9 STA INH 0008 C6 F9 DEC INH 000A 20 1F 1F JSR SCANDS 000D 20 6A 1F JSR GETKEY 0010 C5 F3 CMP LAST 0012 F0 EC BEQ START 0014 85 F3 STA LAST 0016 C9 10 CMP #$10 0018 B0 E6 BOS START 00lA 0A ASL A 001B 0A ASL A 001C 0A ASL A 001D 0A ASL A 00lE A2 04 LDX #4 0020 0A ADD ASL A 0021 26 FA ROL POINTL 0023 26 FB ROL POINTH 0025 0A DEX 0026 D0 F8 BNE ADDR 0028 F0 D6 BEQ START Keep in mind that the maximum "reach" of a branch instruction is 127 locations forward (7F) or 128 locations backward (80). If you want a forward branch, check that the calculated branch is In the range 0l to 7F. Similarly, be sure that a backward branch produces a value from 80 to FE. In either case, a value outside these limits means that your desired branch is out of reach.
115
Load BROWSE anywhere in memory - it's fully relocatable - start it up, and presto! It dcesn't seem to do anything. BROWSE is a mini-Monitor that perrorms most or the functions of the regular KIM monitor; but you'll find it handy for entering and proof-reading programs. Most of the keys work the same as usual; but PC. +. and DA are slightly different. When you hit + you go to the next address as usual .. but then you keep on going! Great for proofreading a rpogram you've just entered. It lets you browse through memory. Hit PC and the program steps backwards, so you can look at a value you've just passed. All other keys instantly freeze the browsing process; you can hit AD or DA to stop on a given address, or just enter a new address if you wish. Key DA operates a little differently from the regular KIM function. To enter data, first set up the address before the one you want to change. As you enter the data, BROWSE will autonatically step forward to the next address - and then the next one, and so on. You never need to hit the + key during entry; and the display will show the last value you have entered. 0110 8 START CLD clear decimal mode 0111 A9 13 LDA #$13 GO key image 0113 85 FE STA CHAR 00l5 A9 00 LDA #$0 value zero.. 0117 85 FA STA POINTL .,to address pointer 0119 85 FB STA POINTH 011B C6 F3 LOOP DEC WAIT main program loop 011D D0 0E BNE LP1 pause 1 second 011F A5 FD LDA TMPX up or down? 0121 F0 0A BEQ LP1 neither 0123 10 69 BPL UP 0125 A5 FA LDA POINTL down, decrement 0127 D0 02 BNE DOWN next page? 0129 C6 FB DEC POINTH 012B C6 FA DOWN DEC POINTL 012D 20 19 1F LPl JSR SCAND light display 0130 20 6A 1F JSR GETKEY check keys 0133 C5 FE CMP CHAR same key as last time? 0135 F0 E4 BEQ LOOP 0137 85 FE STA CHAR note new key input 0139 C9 15 CMP #$15 no key? 013B F0 DE BEQ LOOP yes, skip 013D A2 00 LDX #0 013F 86 FD STX TMPX clear up/down flag
116
117
Ever thought about the best way to organize your programs on tape? I used to call the first program on each tape number 01, the next 02, etc. Mostly I was afraid of forgetting the ID number and having trouble reading it in. Program DIRECTORY (below) fixes up that part of the problem and liberates you to choose a better numbering scheme. You've got 254 program IDs to choose frorn ... enough for most program libraries with some to spare. So every program and data file would carry a unique number ... and if you've forgotten what's on a given tape, just run DIRECTORY and get all the IDs. Another thing that's handy to know is the starting address (SA) of a program, expecially if you want to copy it to another tape. (Ending add- resses are easy ... just load the program, then look at the contents of l7ED and 17EE). Well, DIRECTORY shows starting addresses, too. The program is fully relocatable, so put it anywhere convenient. Start at the first instruction (0000 in the listing). Incidentally, 0001 to 001D of this program are functionally identical to the KIM monitor 188C to 18C1. After you start the program, start your audio tape input. When DI- RECTORY finds a program, it will display the Start Address (first four digits) and the Program ID. Hit any key and it will scan for the next program. 0000 D8 GO CLD 0001 A9 07 LDA #$07 Directional reg 0003 8D 42 17 STA SBD 0006 20 41 1A SYN JSR RDBIT Scan thru bits... 0009 46 F9 LSR INH ..shifting new bit 000B 05 F9 ORA INH ..into left of 000D 85 F9 STA INH ..byte INH 000F C9 16 TST CMP #$16 SYNC character? 0011 D0 F3 BNE SYN no, back to bits 0013 20 24 1A JSR RDCHT get a character 0016 C6 F9 DEC INH count 22 SYNC's 0018 10 F5 BPL TST 001A C9 2A CMP #$2A then test astk 001C D0 F1 BNE TST ..or SYNC 001E A2 FD LDX #$FD if asterisk, 0020 20 F3 19 RD JSR RDBYT stack 3 bytes 0023 95 FC STA POINTH+1,x into display 0025 E8 INX area 0026 30 F8 BMI RD 0028 20 1F 1F Show JSR SCANDS ...and shine 002B D0 D3 BNE Go until keyed 002D F0 F9 BEQ SHOW at's all folks
118
HYPERTAPE
How long does it take you to load a full lK of KIM-1 memory? Over two minutes? And if you're going for memory expansion, how long will It take you to load your 8K? Twenty minutes? Hold onto your hats. Program HYPERTAPE! will write fully compatible tapes in a fraction of the time. You can load a full 1K in 21 seconds. Fully compatible means this: once you've written a tape using HYPERTAPE! you can read it back in using the normal KIM-1 program (starting at 1873 as usual). And the utilities and diagnostic programs work on this super-compressed data (e.g., DIRECTORY and VUTAPE). You'll need some memory space for the program, of course. If you have memory expansion, there'll be no problem finding space, of course. But if you're on the basic KIM-1, as I am, you'll have to "squeeze in" HYPERTAPE! along with the programs you're dumping to tape. I try to leave page 1 alone usually (the stack can overwrite your program due to bugs), so I stage HYPERTAPE! in that area. For the convenience of relocation, the listing underlines those addresses that will need changing. There are also four values needed in page zero which you may change to any convenient location. For those Interested in the theory of the thing, I should mention: HYPERTAPE! is not the limit. If you wished to abandon KIM-1 monitor compatibility, you could continue to speed up tape by a factor of 4 or 5 times more. Can you imagine reading 1K in four seconds? For the moment, however, HYPERTAPE! is plenty fast for me. ; this program also included in Super-dupe 0100 A9 AD DUMP LDA #$AD 0102 8D EC 17 STA VEB 0105 20 32 19 JSR INTVEB set up sub 0108 A9 27 LDA #$27 010A 85 F5 STA GANG flag for SBD 010C A9 BF LDA #$BF 010E 8D 43 17 STA PBDD 0111 A2 64 LDX #$64 0113 A9 16 LDA #$16 0115 20 61 01 JSR HIC 0118 A9 2A LDA #$2A 011A 20 88 01 JSR OUTCHT 011D AD F9 17 LDA ID 0120 20 70 01 JSR OUTST 0123 AD F5 17 LDA SAL
119
120
121
Testing RAM isn't just a question of storing a value and then checking it. It'S a important to test for interference between locations. Such tests often involve writing to one location and then checking all other locations to see they haven't been disturbed; this can be time consuming. This program checks memory thoroughly and runs exceptionally fast. It is adapted from an algorithm by Knaizuk and Hartmann published in 'IFEE. Transactions on Computers', April 1977. The program first puts value FF in every location under test. Then it puts 00 in every third location, after which it tests all locations for correctness. The test is repeated twice more with the positions of the 00's changed each time. Finally, the whole thing is repeated with the FF and 00 values interchanged. To run: Set the addresses of the first and last memory pages you wish to test into locations 0000 and 0001 respectively. Start the program at address 0002; it will halt with a memory address on the display. If no faults were round, the address will be one location past the last address tested. If a fau1t is found, its address will be displayed. Example: To test 0100 to 02FF (pages 0l and 02) in KIM: Set 0000 to 01, 0001 to 02, start program at 0002. If memory is good, see 0300 (=02FF + 1). Now if you try testing 0100 to 2000 (0000=0l,000l=20) the program will halt at the first bad location - this will be 0400 if you haven't added memory. 0000 xx BEGIN xx starting page for test 0001 xx END xx ending page for test 0002 A9 00 START LDA #0 zero pointers 0004 A8 TAY for low-order 0005 85 FA STA P0INTL addresses; 0007 85 70 BIGLP STA FLAG =00 first pass, =FF second pass 0009 A2 02 LDX #2 000B 86 72 STX MOD set 3 tests each pass 000D A5 00 PASS LDA BEGIN set pointer to.. 000F 85 FB STA POINTH ..start of test area 0011 A6 01 LDX END 0013 A5 70 LDA FLAG 0015 49 FF EOR #$FF reverse FLAG 0017 85 71 STA FLIP ..FF first pass. =00 second pass 0019 91 FA CLEAR STA (POINTL).Y write above FLIP value.. 001B C8 INY ..into all locations 001C D0 FB BNE CLEAR 001E E6 FB INC POINTH 0020 E4 FB CPX POINTH 0022 B0 F5 BCS CLEAR
122
123
One day I was single-stepping through a program and not being too alert, I kept going after the program ended. Then I noticed I was going through instructions not in any OP-code table. What was being executed? With a little luck I found that many nonexistent codes would duplicate others with only one bit changed. I haven't looked into it very deeply, but here are two examples: 17 is the same as 16 (ASL-Z, PAGE) and FF is the same as FE (INC ABS,X). By single-stepping I could determine the number of bytes in all instructions. This worked for all instructions except for 02,12,22,32,42,52,62,72,92,B2,D2 and F2, which blank the display. After filling in the Bytes per Instruction table many patterns became obvious. For example, the op-code ending with digits 8 and A could be summarized as having a bit pattern of xxxxl0x0, where "x" means don't care. This covers all possibilities and when a number of this form is ANDed with 00001101 (mask all the x bits) the result will be 00001000. By doing this for all 0 (illegal), 1 and 3 byte instructions and having the 2 byte instructions "whatever's left over" I had the basis of my semi-disassembler. The only odd byte length is that of 20 (JSR) which "should" be only 1 byte long. Though this is not a full disassembler, it has helped me to write several nrograms, including itself. To relocate the program change locations 374-6, 379-B and 38E-390 to jump to the appropriate locations. If you have a program in page 1 or don't want to write on the stack, change 397 and 39A to EA (NOP). To run the program, store 00 in 17FA and 03 in 17FB. Go to the beginning of your program and press "ST". You will then see the first instruction displayed. If it is illegal, the location and opcode will flash on and off. In that case, press "RS". To display the next instruction press "+". To display the current address and opcode press "PC", at any time. To backstep press "B". When you have backstepped to the beginning of your program, or changed locations 397 and 39A, pressing "B" acts like "PC". 0300 D8 START SED 0301 A2 FF LDX #$FF INITIALIZE STACK 0303 9A TXS POINTER 0304 A0 00 INIT LDY #$00 (E6-EE)=0 0306 A2 09 LDX #$09 0308 94 E5 INIT1 STY 0055,X 030A CA DEX 030B D0 FB BNE INITl 030D E8 INX X=1
124
125
126
ANOTHER move program? This one moves anything anywhere! No limit to number of bytes, or locations in memory, or overlapping of source and destination. Use it to lift sections of code from other programs, close in or open up gaps for altering programs, moving programs to another location (use Butterfield's RELOCATE to take care of the branch and address correction). Locate it wherever you have the room. Use is straight forward. Old start address goes in D0,1 ; old end address in D2,3; new start address in D4,D5 before running the program which starts at 1780, or wherever you want to have it in your system. Program uses zero page locations D0 thru P9 to do the job. 1780 D8 START CLD 1781 A0 FF LDY #$FF STORE TEST VALUE 1783 58 SEC 1784 A5 D2 LDA OEAL HOW MANY BYTES? 1786 E5 D0 SBC OSAL TO MOVE? 1788 85 D8 STA BCL 178A A5 D5 LDA OEAH 178C E5 D1 SBC OSAH 178E 85 D9 STA BCH 1790 18 CLC 1791 A5 D8 LDA BCL ADD THE COUNT TO 1793 65 D4 ADC NSAL THE NEW START TO 1795 85 D6 STA NEAL GET A NEW END 1797 A5 D9 LDA BCH 1799 65 D5 ADC NSAH 179B 85 D7 STA NEAH 179D E6 D8 INC BCL ADJUST THE BYTE COUNT 179F E6 D9 INC BCH TO PERMIT ZERO TESTING 17A1 38 SEC 17A2 A5 D4 LDA NSAL IF NEW LOCATION 17A4 E5 D0 SBC OSAL HIGHER THAN OLD 17A6 A5 D5 LDA NSAH CARRY FLAG IS SET 17A8 E5 D1 SBC OSAH 17AA A2 00 LOOP LDX #$00 HIGH POINTER INDEX 17AC 90 02 BCC MOVE 17AE A2 02 LDX #$02 LOW POINTER INDEX 17B0 A1 D0 MOVE LDA OSAL,X MOVE OLD 17B2 81 D4 STA NSAL,X TO NEW 17B4 90 14 BCC DOWN 17B6 C6 D2 DEC OEAL ADJUST UP POINTER, (OLD) 17B8 98 TYA BELOW ZERO? 17B9 45 D2 FOR OEAL 17BB D0 02 BNE NO NO, ENOUGH
127
128
Having trouble loading from tape, especially on "SUPERTAPE"? Suspect the PLL adjustment might be off, but were afraid to adjust it, or didn't have a meter or scope handy? Use this program and KIM's built in hardware to make the adjustment. Hold the tip of the plug you plug into the tape recorder's earphone jack to applications pin #14 and adjust the control for 0's or combinations of 7'S and L's on the display. "L" means the PLL TEST line is low and "7" means it's high. The program generates a signal that alternates slightly below and slightly above theone generated by KIM at 1A6B. The regular tape input channel is utilized and decoded to con- trol the display. 1780 A9 07 BEGN LDA #07 Set the input 1782 8D 42 17 STA SBD 1785 A9 01 LDA #01 and output ports 1787 8D 01 17 STA PA0 178A 85 E1 STA E1 Initialize the toggle 178C A9 7F LDA #7F 178E 8D 41 17 STA PADD Open display channels 1791 A2 09 MORE LDX #09 Start with the first 1793 A0 07 LDY #07 digit Light top & right 1795 2C 42 17 BIT SBD if PLL output 1798 50 02 BMI SEGS is high 179A A0 58 LDY #58 otherwise left & bottom 179C 8C 40 17 SEGS STY SAD Turn on the segments 179F 8E 42 17 STX SBD and the digit 17A2 2C 47 17 DELA BIT CLKRDI Half cycle done? 17A5 10 FB BPL DELA No, wait for time up 17A7 E6 E2 INC E2 Count the cycles 17A9 50 04 BMI LOTO 128 ^ cycles, send low tone 17AB A9 91 HITO LDA #91 128 Vz cycles, send hi tone 17AD D0 05 BNE CLK1 17AF A9 95 LOTO LDA #95 17B1 EA NOP Equalize the branches 17B2 8D 44 17 CLK1 STA CLK1T Set the clock 17B5 A9 01 LDA #01 17B7 45 E1 BOR E1 Flip the toggle register 17B9 85 E1 STA E1 17BB 8D 00 17 STA PA0 Toggle the output port 17BE E8 INX 17BF E8 INX Next display digit 17C0 E0 15 CPX #15 Last one? 17C2 D0 CF BNE NEXT No, do next 17C4 F0 CB BEQ MORE Yes, do more 1780 A9 07 8D 42 17 A9 01 8D 01 17 85 E1 A9 7F 8D 41 1790 17 A2 09 A0 07 2C 42 17 30 02 A0 58 8C 40 17 8E 17A0 42 17 2C 47 17 10 FB E6 E2 50 04 A9 91 D0 05 A9 17B0 95 EA 8D 44 17 A9 01 45 E1 85 E1 8D 00 17 E8 E8 17C0 E0 15 D0 CF F0 CB
129
Ever long for an assembler? Remember when you wrote that 300 byte program - and discovered that you'd forgotten one vital instruction in the middle? And to make room, you'd have to change all those branches, all those address... Or the program with that neat piece of coding in it, that you suddenly need to remove (say, to change it to a subroutine)...but if you do, you'll have to fill all that empty space with NOPs? It's enough to make a grown programmer cry... Dry those tears. Program RELOCATE will fix up all those addresses and branches for you, whether you're opening out a program to fit in an extra instruction, closing up space you don't need, or just moving the whole thing someplace else. RELOCATE doesn't move the data. It just fixes up the addresses before you make the move. It won't touch zero page addresses; you'll want them to stay the same. And be careful: it won't warn you if a branch instruc- tion goes out of range. You'll have to give RELOCATE a lot of information about your program: (1) Where your program starts. This is the first instruction in your whole program (including the part that doesn't move). RELOCATE has to look through your whole program, instruction by instruction, correcting addresses and branches where neces- sary. Be sure your program is a continuous series of instruc- tions (don't mix data in; RELOCATE will take a data value of 10 as a BEL instruction and try to correct the branch address), and place a dud instruction (FF) behind your last program in- struction. This tells RELOCATE where to stop. Place the program start address in locations EA and EB, low order first as usual. Don't forget the FF behind the last instruction; it doesn't matter if you temporarily wipe out a byte of data - you can always put it back later. (2) Where relocation starts, this is the first address in your program that you want to move. If you're moving the whole program, it will be the same as the program start address, above. This address is called the boundary. Place the boundary address in locations EC and ED, low order first. (3) How far you will want to relocate information above the bound- ary. This value is called the increment. For example, if you want to open up three more locations in your program, the in- crement will be 0003. If you want to close up four addresses, the increment will be FFFC (effectively, a negative number). Place the increment value in locations E8 and E9, low order first.
130
131
132
133
134
134
SORT
This program will take any given block of data and arrange it in numerical sequence, whether the data is hex or BCD, or both. Since the program uses relative branch addressing, it can be located anywhere in memory without modification. The instruction that determines whether data is arranged in ascending or descending order is O11F, ( B0 - descending order, 90 - ascending order). This is a bubble sort. The top item is compared with succeeding items and if a larger number is found, they are swapped. The larger item (now at the top) is then used for comparisons as the process continues through the list. After one complete pass, the largest number will have "bubbled": to the top. The whole process is repeated using the second item to start, then again starting with the third item. Eventually the whole list will be sorted in sequence. 17F5 START LO 17F6 START HIGH 17F7 END LO 17F8 END HI (NOTE: ENDING ADDRESS IS ONE PAST LAST ITEM) 0200 AD F5 17 SORT LDA,17F5 TRANSFER START POINTER 0203 85 E8 STA 00E8 TO ZERO PAGE 0205 85 EA STA 00EA 0207 AD F6 17 LDA 17F6 020A 85 E9 STA 00E9 020C 85 EB STA 00EB 020E AD F7 17 LAD 17F7 TRANSFER END POINTER 0211 85 EC STA 00EC 0213 AD F8 17 LDA 17F8 0216 85 ED STA 00ED 0218 A2 00 LDX tt$00 INDEX TO ZERO (STAYS THERE) 021A D8 CLD 021B A1 E8 GET LDA C00E8/X) GET DATA INDIRECT 00E8 021D C1 EA CMP C00EA/X) GREATER THAN INDIR. 00EA 021F B0 0C BCS INCN NO, INCR. POINTER 00EA 0221 A1 E8 SWAP LDA C00E8,X) SWAP DATA IN POINTER 0223 85 E7 STA 00E7 LOCATIONS
136
137
SUPER-DUPE
SUPER-DUPE is handy: it lets you duplicate a complete tape containing many programs in jig time. SUPER-DUPE is versatile: it will write various tape densities, from regular to Hypertape . SUPER-DUPE is multi-purpose: if you don't want to duplicate programs, you can use it for cataloguing tapes, or for writing Hypertape. The maximum size program that SUPER-DUPE can copy is dependent on the amount of memory of the KIM system. The basic 1K system can copy programs up to 512 bytes long. For duplicating tape, it's useful to have two tape recorders: one for reading the old tape, one for writing the new. They are connected in the usual way, at TAPE IN and TAPE OUT. Pause controls are handy. SUPER-DUPE starts at address 0000. Hit GO and start the input tape. When a program has been read from the input tape, the display will liight, showing the start address of the program and its ID. If you don't want to copy this program, hit 0. Otherwise, stop the input tape; start the output tape (on RECORD) ; then hit 1 for Hypertape , 6 for regular tape, or any intermediate number. The output tape will be written; upon completion, the disp]ay will light showing 0000 A2. Stop the output tape. Now bit GO to copy the next program. SUPER-DUPE contains a Hypertape writing program which can be used independently; this starts at address 0100. Basically, SUPER-DUPE saves you the work of setting up the SA, EA, and ID for each program, and the trouble of arranging the Hypertape writer into a part of memory suitable for each program. 0000 A2 03 START LDX #3 0002 B5 E2 LOOP LDA POINT2.X 0004 95 E0 STA POINT,X 0006 CA DEX 0007 10 F9 BPL LOOP 0009 A9 00 LDA #0 000B 85 F6 STA CHKSUM 000D 85 F7 STA CHKHI 000F D8 CLD 0010 A9 07 LDA #7 0012 8D 42 17 STA SBD 0035 20 41 1A SYN JSR RDBIT 0018 46 F9 LSR INH 001A 05 F9 ORA INH
138
139
140
Do you want to verify the cassette tape you just recorded before the information is lost? Then follow this simple procedure: 1. Manually verify that the starting address ($17F3, $17F6), the ending address ($17F7, $17F8) and the block identification ($l7F9) locations are correct in memory. 2. Enter zeros ($00) into CHKL ($17E7) and CHKH ($l7E8). 3. Enter the following routine: 17EC CD 00 00 VEB cmp START 17EF D0 03 bne failed l7F1 4C 0F 19 jmp LOAD12 l7F4 4C 29 19 failed jmp LOADT9 4. Rewind the tape, enter address $188C, press GO and playback the tape. If the tape compares, the LEDs will come back on with address $0000. If there is a discrepancy between memory and the tape, the LEDs will come on with address $FFFF.
Program VUTAPE lets you actually see the contents of a KIM format tape as it's going by. It shows the data going by very quickly, because of the tape speed..but you can at least "sense" the kind of material on the tape. In case of tape troubles, this should give you a hint as to the area of your problem: nothing? noise? dropouts? And you can prepare a test tape (see below) to check out the tape quality and your recorder. The test tape will also help you establish the best settings for your volume and tone controls. Perhaps VUTAPE's most useful function, though, is to give you a "feeling" for how data is stored on tape. You can actually watch the processor trying to synchronize into the bit stream. Once it's synched, you'll see the characters rolling off the tape...until an END or illegal character drops you back into the sync mode again. It's educational to watch. And since the program is fairly short, you should be able to trace out just how the processor tracks the input tape. VUTAPE starts at location 0000 and is fully relocatable (so you can load it anyplace it fits).
141
142

143
144
145
146
147
148
149
150
151
152
153
154

155
156
157
158
159


160

161
162
163
164
165

166
167
168
169
170
171
172
173
174
*****************************************************
6502 SOFTWARE SOURCES (as of summer 1977) ARESCO Focal, 2 1/2K assembler 314 Second Ave. 6K assembler/text editor Haddon Hts., New Jersey (send S.A.S.E. for info) 08035 The Computerist Please Package, Help, P.O. Box 3 editor and mailing list S. Chelmsford MA packages 01824 (send S.A.S.E. for info) Itty Bitty Computers Tom Pittman's P.O. Box 23189 Tiny Basic San Jose, Calif. (send S.A.S.E. for info) 95153 MICROWARE MICROCHESS, (Chess in 27 rirstbrooke Rd. 1k), assembler Toronto, Ontario (send S.A.S.E. for info) CANADA M4E 2L2 MICRO-SOFTWARE SPECIALISTS 2K assembler/editor P.O. Box 3292 (send S.A.S.E. for info) E. T. Station Commerce, Texas 75428 6502 Program Exchange Focal, Focal programs, 2920 Moans Lane Kim and TIM programs Reno, Nevada 89509 (send 50c for program list) Pyramid Data Systems 1K monitor system. 6 Terrace Ave. (send S.A.S.E. for info) New Egypt, New Jersey 08533 Julien Dubé Baudot Monitor 3174 Rue Dousi (send S.A.S.E.) Ste-Foy, Quebec G1W 2X2 Canada
175
*****************************************************
Here are the folks responsible. They eagerly await your praise, comments, criticism, indignation - whatever... Please do the courtesy of enclosing a S.A.S.E. if you wish a reply.
176
Program corrections: BANDIT, page 35: change 0252 from 08 to 0B CODE TEST, page 58: addresses 02CE through 02DA should be changed to: D1 65 D4 65 D5 85 D0 A2 04 B5 D0 95 D1 Operating instructions: LUNAR LANDER. page 84: After viewing fuel, return to altitude display by pressing button A. WUMPUS, page 107: If Wumpus moves to a room containing a pit or superbats, he will be hidden and you won't be told when you are near him. You must either guess his location or make him move again by pitching a can.
Titles: MUTI*MAZE, Page 92, should be MULTI-MAZE: so named because it does generate a new maze each time it is restarted. BLACK MATCH: I.Q. does not automatically vary (change 0254)