Questdata Volume 2, Issue 2
Total Page:16
File Type:pdf, Size:1020Kb
tdatQ ___ _ Issue #2 THE TALKING ELF 6. Non Super Elf owners can connect the Q output to a speaker via a transistor driver or de cassette out line (Q) can be fed into the plxmo i.rJiut of a audio amplifier for optimum results. The program can be tested without the amplifier by playing a normal music cassette into the input line while the program is This will still allow reproduction am output of the information on the tape. You oou1d also record you own voice m a tape am play it through the cassette input line. · The following changes must be made to the program for use on an Elf II. location· Contents 0016 61 001D 35 by OO!F 3D Bobby R. lewis 0027 35 0029 3D OOSD 61 The following program will allow OCA-1802 users In addition, a speaker and amplifier must be to digitize voice information from a microphone connected to the Q output line. display the information graphically, ani reproduce it for output via a speaker. 'Ire only additional hardware required is a micropb:me ani mini-speaker amplifier. The program, as written. will nm on systems configured as follows: 1. EF3 - cassette input 2. Q - speaker output 3. EF4 - input switch 4. Continuous RAM memory from address <XXX> to OFFF. 5. The amplifier will be attached as f ollO'NS: a. Microphone to input b. Ext speaker output attached to the cassette inp..lt. C[B:VlC ClUB C£lSr:1ftC ClUB ClUB CDSr:lftC ClUB Page 2 OI'ERAI'OC JNSIRUCITOOS ADDR CODE LABEL OPCODE OPERAND COMMENT 1. Load tre program into tre require:i address 0000 j ffiG 0 0031 space. 0000 F800; STRT: LDI A. 1 ( STRTl 0032 0002 B1; PHI INT 0033 0003 82; PHI SP 0034 2. Place the comruter in the n.m mode. 0004 B3; PHI PC 0035 0005 B4; PHI BPTR 0036 3. TI-e graphics display will soow pages zero 0006 F896; LDI A.O( INTPl0037 through three on the screen with the program 0008 A1; PLO INT 0038 at the top of the display. 0009 F8FF; LDI #FF 0039 OOOB A2; PLO SP 0040 OOOC F811; LDI and A.O(GRFXl0041 4. Press infUt imme:iiately start talking OOOE A3; PLO PC 0042 into the microphone. You can usually say OOOF E2; SEX SP 0043 from 7 to 12 words. The screen will go 0010 03; SEP PC 0044 blank while tre computer is inputting the 0011 69; GRFX: INP TVON 0045 voice information. 0012 3712; B4 * 0046 0014 3F14; BN4 * 0047 0016 62; OUT TVOF 0048 5. The display oock en signals the eOO 0017 F80F; LDI #OF 0049 of the voice input cycle, and will be 0019 BF; PHI VIN 0050 displaying rages OC, OD, OE, and OF. 001A F8FF; LDI #FF 0051 001C AF; PLO VIN 0052 6. Press input ani rages 08, 09, OA and OB will 0010 3610; B3 * 0053 be displayed. 001F 3E1F; BN3 * 0054 0021 F800; LOP1: LDI #00 0055 0023 BE; PHI TMP2 0056 7. Press input and pages 04, 05, 06 and 07 will 0024 F808; LDI #08 0057 be displayed. 0026 AE; PLO TMP2 0058 0027 362B; LOP: B3 ZERO 0059 8. Press inrut and rages 00, 01, 02 and 03 will 0029 3E30; BN3 ONE 0060 be displayed. 002B F800; ZERO: LDI #00 0061 0020 FE; SHL 0062 002E 3033; BR DISP 0063 9. At this point, press input again and the 0030 F880; ONE: LDI #80 0064 information will be rutrut to the Q line. 0032 FE; SHL 0065 0033 OF; DISP: LDN VIN 0066 10. input again restarts the sequence 0034 76; SHRC 0067 at step 4 above. 0035 5F; STR VIN 0068 0036 2E; DE"C TMP2 0069 0037 BE; GLO TMP2 0070 uooo 0038 3A27; 8NZ LOP 0071 0001 •• 003A 2F; 0000 0002 •• DEC VIN 0072 0000 003B 9F; GHI VIN 0073 0003 •• 003C F800; 0000 0004 •• VOICE INPUT XRI #00 0074 0000 003E 3A21; BNZ LOP1 0075 0005 •• GRAPHICS 0040 F80C; LDI 0000 0006 •• AND VOICE A.1 (BLOC1 )0076 0000 0042 84; PHI 8PTR 0077 0007 •• OUTPUT 0043 69; INP 0000 0008 •• TVON 0078 0000 0044 3744; B4 * 0079 0009 •• BY: BOBBY 0046 3F46; BN4 0000 0010 •• R. LEWIS * 0080 0000 0048 F808; LDI A.1 (8LOC2)0081 0011 •• 004A B4; PHI BPTR 0082 0000 0012 •• 1980 0000 004B 3748; B4 * 0083 0013 •• 0040 3F4D; BN4 0000 0014 •• REGISTER * 0084 0000 004F F804; LDI A.1 (BLOC3l0085 0015 •• EQUATES 0051 B4; PHI 0000 0016 •• BPTR 0086 0000 0052 3752; B4 * 0087 0017 DMA=O 0054 3F54; 0000 0018 INT=1 BN4 * 0088 0000 0056 F800; LDI A. 1 (8LOC4 )0089 0019 SP=2 0058 R4; PHI 0000 0020 PC=3 8PTR 0090 0000 0059 3759; B4 * 0091 0021 BPTR=4 005B 3F58; 0000 0022 TMP2=#0E BN4 * 0092 0000 0023 TMP3=#0C 0050 62; OUT TVOF 0093 0000 005E F800; LDI A. 1 (TMPl0094 0024 VIN=#OF 0060 BC; 0000 0025 TVON=1 PHI TMP3 0095 0000 0061 F8A4; LDI A.O (TMP)0096 0026 TVOF=2 0063 AC; PLO 0000 0027 8LOC1=#0COO TW3 0097 0000 0064 F80F; LDI #OF 0098 0028 8LOC2=#0800 0066 BF; PHI 0000 0029 8LOC3=#0400 VIN 0099 0000 0067 F8FF; LDI #FF 0100 0030 BLOC4=#0000 0069 AF; PLO VIN 0101 QUESTDAT A COSMAC CLUB P.O. Box 4430, Santa Clara, CA 95054 Page 3 ----ADDR CODE LABEL OPCODE OPERAND COMMENT 006A F807; AGN: LDI #07 0102 006C AE; PLO TMP2 0103 0060 F800; LDI #00 0104 ..____/ 006F 76; SHRC 0105 ACOOL DISPLAY 0070 OF; LON VIN 0106 0071 5C; STR TMP3 0107 0072 OC; LOPV: LON TMP3 0108 0073 76; SHRC 0109 By William Carres 0074 3378; BDF ONES 0110 0076 3886; 8NF ZERS 0111 This is a short program that uses Super 0078 78; ONES: SEQ 0112 Basic. TI-e program generates a screen full of 0079 5C; STR TMP3 0113 asterisks, with ooe randomly located on each 007A 2E; DEC TMP2 0114 lim. After four passes, too program lists an:l 0078 8E; GLO TMP2 0115 names itself refore restarting. The program is 007C 3A72; 8NZ LOPV 0116 007E 2F; DEC VIN 0117 unique in that no <lJICS are used in too loops. 007F 9F; GHI VIN 0118 The RlN statement takes care of jlUllps. 0080 FBOO; XRI #00 0119 0082 3A6A; BNZ AGN 0120 IDI'E: Before typing this in, type IMODE: DEFINT 0084 3011; 8R GRFX 0121 Z to avoid floating point errors. 0086 7A; ZERS: REQ 0122 0087 5C; STR TMP3 0123 0088 2E; DEC TMP2 0124 10 IMODE: REM This is a COOL display 0089 BE; GLO TMP2 0125 20 FCR J=1 'ID 4 008A 3A72; BNZ LOPV 0126 30 CLS: FCR N=1 'ID 15 ooac 2F; DEC VIN 0127 40 PR TAB (RND( 62)); "*" 0080 9F; GHI VIN 0128 50 NEXT OOBE FBOO; XRI #00 0129 60 WAIT(450): NEXT 0090 3A6A; 8NZ AGN 0130 0092 3011; BR GRFX 0131 70 CLS:LIST 0094 42; EXIT: LOA SP 0132 00 WAIT (1500): RUN 0095 70; RET 0133 0096 C4; INTP: NOP 0134 0097 22; DEC SP 0135 0098 78; SAV 0136 0099 22; DEC SP 0137 009A 52; STR SP 0138 "-.____/ 0098 E2; SEX SP 0139 009C E2; SEX SP 0140 0090 94; GHI BPTR 0141 QUESTDATA 009E BO; PHI DMA 0142 P.O. Box 4430 009F FBOO; LDI 1100 0143 Santa Clara, CA 95054 OOA 1 AO; PLO DMA 0144 OOA2 3094; BR EXIT 0145 Pub! isher •••••••••••• Quest Electronics OOA4 00; TMP: ,0 0146 Editor ••••••••••••••••••Paul Messinger OOA5 END 0147 Assistant to Editor ••• Jeanette Johnson 0000 Associate Editor ••••••• AI ian Armstrong Contributing Editors Ron Canker Van Baker Art and Graphics •••••••••••Holly Olson Proof Reading ••••••••••••••Judy Pitkin Production ••••••••••••••••John Larimer 0000 F800 8182 8384 F896 A1F8 FFA2 F811 A3E2 . Circulation ••••••••••••••••••••Sue Orr 0010 0369 3712 3F14 62F8 OF8F F8FF AF36 1D3E 0020 1FF8 008E F808 AE36 283E 30F8 OOFE 3033 The contents of this pub I i cation are 0030 F880 FEOF 765F 2E8E 3A27 2F9F F800 3A21 copyright and sha I I not be reproduced without 0040 F80C B469 3744 3F46 F808 8437 483F 4DF8 permission of QUESTDATA. Permission is granted 0050 0484 3752 3F54 F800 8437 593F 5862 F800 to quote short sections of articles when used in 0060 8CF8 A4AC FSOF BFF8 FFAF F807 AEF8 0076 reviews of this publ !cation. QUESTDATA welcomes 0070 OF5C OC76 3378 3886 785C 2E8E 3A72 2F9F contributions from its readers. Manuscripts 0080 FBOO 3A6A 3011 7A5C 2E8E 3A72 2F9F FBOO wi II be returned on I y when accompanied by a se If 0090 3A6A 3011 4270 C422 7822 52E2 E294 BOF8 addressed stamped envelope. Articles or OOAO OOAO 3094 programs submitted wl II appear with the authors name un I ess the contributor wishes otherwise. Payment is at the rate of $15 per published page. QUESTDATA exists for the purpose of exchanging information about the RCA 1802 microcomput er. QUESTDATA COSMAC CLUB P.O. Box 4430, Santa Clara, CA 95054 Page 4 Set R2 and RA THE SIEVE OF for page one R2.0 = 102 ERATOSTHENES RA.O = 100 by Phillip B. Li.escreski III M(R2) = R2.0 Bump R2 Sieve of Eratosthenes is a meth<xi for obtaining a sequence of prime numbers. This algoritlnn is simple ani ore of tre best methods for generating this sequence. There are other NO methcrls arrl formulas for this task, but they are more complex and do rot produce a complete. list, in other words, some prime mnnrers are left oot.