Home
T H E 6 5 0 2
Contents
1. WOHd3 5 51 AddOTJ INIW 10 1 s 001 S uouo 10 51015 uorsuedx Jayo sulaysig 13 WIN s1ajnq ucjsuedxa uiajs is pue WOHd3 38 WVU sang DWN 1 au pieoquaqioW WIN 23jDjpauiuij 40 240185 001 9 02 asn 2128802 1 241 adpj 23328802 40 WOUdF u 1VOOd 40 DIS Vg fo 22104 WOHd3 M8 pu 8 02 uols updx smojjD u31um anbiun y senimiqedeo uoisuedxo s19JjJO VI dH U L 9089 899 DOTS oqiy uuy jaa1js 21215 1092 9103 euoissajo1g uorneiodio SWA SASOIDIP paun a qe reA suoneoi dde Auew pue Onuoo 2113 1 2521 20 qe inS suiapoui 3ajurid Burpn our urajs AgS 1 nduioO Jo LYWAH U 1 VLAd WIN 241 4 s 03 ojBuis 1e jndod jsoui ay jo uorisuedxo 545 e WIM 29 Buronponu BROWN AND WHITE AND COLORED ALL OVER Richard F Suitor 166 Tremont Street Newton MA 02158 This article consists
2. 183nduo 1 14 uor38e13suouag 10 9 M TA JO 4UIOd 40 ETIOjTDj 3 Ve wesboig 215 8 8 2069 3 10 uor3eor ddy 4 12771194 any3ay 9 jO add 2069 943 pue 3 w 1940 I QunN S T H TOY I ATIO 0059 943 10 WIL 103190 1V83N 39 0 X3GNI 9313155013 APPLE INTEGER BASIC SUBROUTINE PACK AND LOAD Richard F Suitor 166 Tremont Street Newton MA 02158 Although this article is Copyrighted by The COMPUTERIST Inc at the authors request premission is hereby given to use the subroutine and to distribute it as part of other programs The first issue of CONTACT the Apple Newslet ter gave a suggestion for loading assembly language routines with a BASIC program Simply summarized one drops the pointer of the BASIC beginning below the assembly language portion adds a BASIC instruction that will restore the pointer and SAVEs The procedure is simple and effective but has two limitations First it is inconvenient if BASIC and the routines are wide ly separated and is very tricky if the routines start at 800 just above the display portion of memory Second a program so saved cannot be used with another HIMEM and is thus inconven ient to share or to submi
3. LDA eBBSLsX STR eBPR2sX STR eBPRG6 X LDA e JSRL X STR eTRBLsX LDA eHIMLs STR eHIMSsX DEX 2 PACK RESTORE LP JER 2916 5 248939 5 118000 MkKUP BASO lt 228131 105201 PLTP BASO HS 81232181800 ST16 PTLP lt H 1 5000 C42 52 22 00 LDA LIMITS PACK PROGS STR LDA STR MODE JSR GTLM STX LDY 00 LDR RUFF Y CMP 0D3 S BEQ Mk10 JSR GTNM CMP OR 7 73 BEQ JSR PBL2 ERROR INDICATOR LDA 77 JSR COUT JSR BELL MK 05 CLC 01 MKO2 INC MODE JSR GTNM 6 47 WISR 08E6 naE9 NSEE 08 1 08 5 NSFE 0310 0903 nana 0909 090 09 0910 0912 0914 0916 1918 091 31E 0920 0924 0926 0928 Nace 0930 0952 095 0958 095A 095D 0960 0962 0965 0966 096A 2089 6 011 183C 00 683268 33 Be38E3 839623 D207FA 283318 0800 889688 968896 8896 B90n02 C416 COAL F F4 C9n3 2004 C631 098 e asrFe 2132 185201 A832725 reor 2177 089 6 613361 3800 089 6 4153F8 04F B 210605 1180 1190 1200 1210 1220 1230 1240 1250 1260 1270 1 amp 25 UP MOVE TD JUST BELOW lt 512 NOW HAVE 1ST
4. 1013 172 254 03 2 1016 16 243 KTS 1018 COUNT 1019 CHAR 1020 CTMPX 1021 TIMH 1022 PCHAR 1025 MEMORY PLUS MEMORY PLUS is a KIM 1 shaped and sized board for extending the capabilities of the KIM 1 It con tains 8K RAM low power 2102 static provision for up to 8K EPROM Intel type 2716 2K by 8 16 Versatile Interface Adapter with two 8 bit 1 0 ports two timers and a serial to parallel shift register MOS Technology 6522 and an on board EPROM Programmer RAM and ROM are each address able at any 8K 2K hex boundary and may both be used simultaneously this is really a 16K board Other features are on board regulators for 5V and 25V EPROM Programming Program and Memory Test Program on cassette tape all IC chips are socketted the board is fully assembled and test ed Comes with connectors mounting hardware 60 page manual schematics etc A set of cables is available at no extra charge if specified when ordering the MEMORY PLUS One cable goes between the KIM 1 VIM 1 AIM 65 and the MEMORY PLUS expansion connector The other cable connects to the existing application con nector The easy way to assemble your system Although MEMORY PLUS was designed for the KIM 1 it will work equally well with the Synertek VIM 1 and the Rockwell AIM 65 So when you want to expand one of these systems beyond its HK RAM capability and or want to program some EPROMs to fill the available slots on th
5. WHY gaquadie M 2 II erddy Burqurad 8 6 WO jajuadie W 3 ull Tddy uoa 1 ur 61 4 9 ZJIBMYIG II erddy 621 d 22 1 84 Iny ty II erddy ayy 3 ddV 35 paztun 21035 XB 10 56 8 5 217 22 2 1 21 8 8 2 02 1 pruel g 20 39 125 5 1 1 05 0 5 134 27 9 1 3 305 18005184 12 65 1 12 9 12 9 02 11 81 19jnduoooIOIg glee 02 1 ser ddng 1 02 2 Sjonpoly 1 3 9 LZ 8 14 3ubnoujeio 4 2 2 S9jBI2O0SSV 0 Y j 2 9 J8I 6 241 241 23151 dnoij 110 01543 9 9 asnoy alIe4e ddy 5 22 9 3 3n3r328Uu0j 01 9 92 9 231 9 21 2 4 2 1 35112 3 9 0 au 38 5 2 9 54201 JOSPUTM 21035 1e3nduo 31 9 7 6 7 92 2 82 1 dous 9 727 2 103004 1e3nduoj aul 91 9 2431 5 abueig 659 91 27 jo 83 123 1 9 Al 4991 1010 416 8 2 qQ9831012TW 5493 21 9 06 7 2 6 02 1 s1I9jnduo gy S IN3W3SILH3AGV CHDI hh 9 66 9 y 198us
6. J FIISNUEW Qu3IW ONJIM 10 6 9 lt 33 sawer 193504 2 403 683 Aq 2069 14 7 3 Jayndwoj o13ty OHJIN ATquassy 2069 piepuejs 82 5 a31eu g 7 9 III 3384 i 8 39319U S Z II 3184 61 6 1943204 M 6 9MOM 01838 918M3JjO poog 33 14 ST WIV 8 aa TOS 71 5 3 Bes H 19381 1 Arey sng 0015 94 sq 1 00594 3 8399 WIL 62 9 II 1 6Ut WSV x ddrul 479904 wa js 61 6 I 38 5 2059 uo nuog ag 71 UTAIeW WS 19381 1 s1euurbeg 930 7069 8380 3841 _ d d WIX 30 3008 16171 Qy3IN 3 ddri W sebueJg pue setddy S 20 9 3184 1184 III 3 4 38 8118384 8110jn uOTj8UlOjUJ 9163106 I M9d 4 41710 1 100 1478 2069 14 d diran eg abenbue ATquassy 10 urIu38N W H 11 3196409 UOTJeWIOJUT H
7. XXX XXX XXX I ap Sun REM CET A SIME VALUE IHW OOO 000 XIX XXX XXX XXX XXX XXX UA 1 4 510 INPUT 2060 026 000 DOO XXX XXX XXX XXX XXX EP M 520 5 laoa O00 000 XXX XXX XXX XXX XXX XXX XXX 1 6 1 tome LEN THE SINE OF THE ANGLE 15 S 91000 INK DOO XXX XXX XXX XXX XXX XXX XXX XXX a as T FOO XXX XXX XXX XXX XXX XXX XXX 1016 REM IF THE SIM 15 IN THE RANGE OF I THEW COUPUTE XXX XXX XXN XXX XXX XXX XIX 214 TE HOO XXX XXX XAN FXX XXX XXN XXX 2 3 1 b X XXX XXX XXX XIX XX YYY XXX 2 4 1949 REM THE r L cce 2 5 T 1020 MEM THE RESULT 15 IN KADIANS CONVENT TO DEGREES JAH FEB APR MAY JUN JUL AUG SEP OCT WIV DEC 231 EE 1070 ASvASs BA 2 8 1 2068 REM THE COSINE OF THE ANGLE 15 C 2 5 R 2016 REM THE COSINE 15 THE OF I TO 1 x 1 2 173 179 25 x 5 2011 NEN AND THEN COMPUTE 4 6 3 2 o3 1 2836 AC W0 10010 3008 58 2588 125606 217586 221 830903135 1 719781 1 3 4 t 2040 IF C C 1 THEN 2070 19A APARAI 1919407 50 3 1622276 12 18 3 5 1 2058 aCeGiGNTO 3000 15 22580 3375 um 6861077 26 2 657535 26911 12 247449 3 6 t 2956 REM THE ARCCOS 15 260 Bne oon 6939435 28139299 912 14 14213
8. 0 5 UN CO UN HX SX UN RETURN PRINT CHR 147 INPUT START ADDRESS AD Iz0 IF I 24 GOTO 5050 1 1 1 IB PEEK AD IF MN IB lt gt NULL GOTO 3050 DC IB GOSUB 1000 GOSUB 13000 PRINT AD AD 12 HX AD AD 1 GOTO 3000 ON GOTO 3060 3090 4050 DC IB GOSUB 1000 GOSUB 13000 PRINT AD AD TAB 12 HX TAB 21 MN IB AD AD 1 GOTO 5030 DC IB GOSUB 1000 B1 HX DC PEEK AD 1 GOSUB 1000 B2 HX GOSUB 13000 P DC PRINT AD AD 12 1 B2 TAB 21 MN 1B TAB 27 P AD AD 2 GOTO 5030 DC IB GOSUB 1000 1 DC PEEK AD 1 GOSUB 1000 2 DC PEEK AD 2 GOSUB 1000 6 18 120889 5000 5010 5011 5020 5025 5030 5050 5051 5052 5070 5080 6000 6010 6020 6030 6040 6050 6060 6070 6080 6090 6100 6110 6120 6130 6140 6150 6160 6170 6180 6190 6200 6210 6220 6230 6240 6250 6260 6270 6280 6290 9000 9010 9020 9030 9040 9050 9060 9070 9080 9090 9100 B3 HX AD 1 PEEK AD 2 256 GOSUB 13000 PRINT AD AD TAB 12 B1 2 B3 TAB 21 MN IB TAB 27 OP AD AD 3 GOTO 3000 GET A IF A GOTO 5050 IF A CHR 19 THEN I 0 RETURN IF A lt gt CHR 13 GOTO 5050 0 CHR 147 GOTO 3000 DATA BRK 1 ORAIX 2 NULL 0 NULL 0 NULL 0 ORAZ 2 ASL 2 NULL 0 PHP 1 DATA ORAIM 2 ASLA 1 NULL 0 NULL 0 ORA 3 ASL 3 NULL O BPL 2 ORAIY 2 DATA NULL O NULL O NULL O ORAZX 2 ASLZ2X 2 NULL O 1
9. 1 26 FA ROL POINTL 17AD 26 FB ROL POINTH 1 CA DEX 17B0 DO F6 BNE SHIFT DONE SHIFTING 17B2 85 9 STA YES ADD NEW CHAR TO DISPLAY 17B4 FO D8 BEQ START UNCONDITION RETURN 17B6 38 SEC 17B7 68 PLA IGNORE STATUS 17B8 68 PLA GET FROM ADDRESS 1789 E9 02 SBCIM 02 SUBTRACT 2 17BB 85 FA STAZ POINTL DISPLAY LOW ORDER 17BD 68 PLA 17BE E9 00 SBCIM 00 SUBTRACT CARRY IF ANY 17 0 85 FB STAZ POINTH DISPLAY HI ORDER 17C2 A2 OC LDXIM 0C CHEAT ON RX 17C4 F9 B INC INH COUNT KEY BOUNCES 17C6 AO 00 LDYIM 00 17 8 1 FA LDAIY POINTL GET USER BYTE 17CA 9D DC 17 STAX 17DC STORE IT 17CD BD DB 17 LDAX 17DB GET BRK 1790 91 FA STAIY POINTL STORE IN USER AREA 17D2 A2 OD LDXIM 0D CHEAT ON RX 17D4 AM FA PROCES LDYZ POINTL 17D6 BD D 17 LDAX TBLOFF PREPARE TO GO TO COMMAND LOGIC 17D9 8D DD 17 STA 1700 ALTER INSTRUCTION 17DC DO FF BNE JUMPER JMP TO COMMAND LOGIC 17DE EA NOP FUTURE EXPANSION 17DF E6 TABLE E6 BRANCH 17EO 06 06 BRANCH TO 17E1 A9 49 BRANCH TO 17 2 2 A2 BRANCH TO E 17 3 9 9 BRANCH TO F 1 6 00 JMI 00 OR ADDRESS USED AS 6 27 MISA BRANCH CALCULATION OVERLAY ORG 1780 INH 00F9 POINTL 00FA POINTH 00FB 1780 38 EXEC SEC INITIALIZE SUBTRACT 1781 A5 FA LDAZ POINTL 1783 69 FD ADCIM FD CORRECTION CONSTANT 1785 E5 FB SBCZ POINTH 1787 85 F9 STAZ INH STORE RESULT IN DISPLAY 1789 HC 8E 17 JMP 178E JUMP TO STAR
10. 12 00 All other countries 16 00 Issues 1 2 3 4 and 5 are available while the supply lasts The price is 1 50 per copy USA Canada or Mexico Other countries add 50 per copy surface or 1 25 per copy air mail 4 e s gt 5 5 Kdor Sia I duel de ws SS Les E 274 ola X 5 Sua c State a 2 Go COUNTRYS Amount Back ISSUES s 55 0 Your name and address will be made available to legitimate dealers suppliers and other 6502 interests so that you may be kept informed of new products current developments and so forth unless you specify that you do not wish your name released to these outside sources Send payment to MICRO P O Box 3 S Chelmsford MA 01824 USA READER FEEDBACK With this sixth issue of MICRO we come to the end of MICRO s first year We are quite pleased with the growth of MICRO with the support we have received from authors and advertisers and with the generally positive feedbacx from our readers While it is always nice to read love letters we would like to get some specific information about you and your interests in the 6502 world Please take a few minutes to answer the following questions Your answers will very definitely effect the future course of MICRO 1 Please describe your current 6502 based equipment in detail type amount of memory and so forth 2
11. 3190 RETURN 4888 REM INITIALIZE REGISTERS 4818 FOR PLRCE B TO SIZE 408 PUKE 8 4830 IF PASS 1 THEN RESULT PLACE 8 4858 NEXT PLACE 4458 PUKE 16 855 f 2 IF PASS 1 THEN DIVIDE S IF PASS 2 THEN DIVIDE 2 9 408 POINT PONER GOSUB DIV 4100 EXP 1 SIGN 3 2 PHSS 418 RETURN 9888 COPY POWER INTO TERM 5818 FOR PLACE 6 TO 512E 5828 PEEK PLACE 9850 NEXT PLACE 5848 RETURN THE VALUE OF PI TO 1880 DECIMAL PLACES 3 141522653589279323046264338327950288419 7 1693993751058289 7494459238781 6406256200 3986268348253421170679821458865132823866 4 70958446895 50582231 72535948512848111745 0204182 7O19S 83211 HSS 5964 462294 8954938384 9644255199756659334461284756482337867831 652712019094 45648566923 46024961 A454 32664 82153925072602491412737245687006506315580 1746615209209626292540917153642678925963 GCUWLLS LHS 295468204 66521 384146951941 51164 9423857270365250151953092196117381922611 0531051 1054207446237996 2749567 3518857527 2499122 93819381194912983367336244065664 513836821 394946395224 73719870217 9860943 702 2765392171762931767823846748104676694051 32888565127149263568527 789071342757 78968 2317363 71780 21 46644 091 2249534301 46549585 371682922795892583229420199561121290219 600548 441815981567977477138496 51878 721 1 34999599857 297004 9351059721732816096318 52362 4459455 34695 3826425 2
12. CMPIY 2 NULL O NULL O DATA NULL O CMPZX 2 DECZX 2 NULL O CLD 1 CMPY 3 NULL O NULL O NULL O DATA CMPX 3 DECX 3 NULL 0 CPXIM 2 SBCIX 2 NULL 0 NULL 0 CPX 2 SBCZ 2 DATA INCZ 2 NULL 0 INX 1 SBCIM 2 NOP 1 NULL 0 CPX 3 SBC 3 INC 3 DATA NULL O BEQ 2 SBCIY 2 NULL O NULL O NULL O SBCZX 2 INCZX 2 NULL O SED 1 DATA SBCY 3 NULL O NULL O NULL O SBCX 3 INCX 3 NULL O DATA 0 1 2 3 4 5 6 7 8 9 A B C D E F PRINT CHR 147 INPUT ENTER FILE NAME N OPEN 1 1 0 N INPUT 1 2ZZ INPUT 1 EN FOR AD ZZ TO EN INPUT 1 DAS POKE AD DA NEXT CLOSE 1 RETURN 6 19 121920 10020 10030 11000 11010 11015 11020 11030 11040 11050 11060 13000 13002 13010 13012 13020 13060 13070 13080 13090 13100 13110 13120 14000 14010 14020 14030 14040 14050 14060 14070 14080 14090 14100 14110 14120 14130 14140 14150 14160 14170 14180 14190 14200 14210 14220 14230 14240 14250 14260 14270 14280 14290 14300 14310 14320 14330 PRINT CHR 147 INPUT ENTER ADDRESS IN BASE 10 AD IF AD gt 65535 GOTO 10000 SYS AD RETURN PRINT CHR 147 INPUT ENTER ACCUMULATOR VALUE IF AC lt O OR AC gt 255 GOTO 11010 INPUT ENTER ADDRESS IN 10 AD POKE 2 INT AD 256 POKE 1 AD INT AD 256 256 X USR AC RETURN A AD S3 INT AD 4096 53 4096 52 256 52 256 16 0 53 4096 52 256 5 16 53 0 53 52 0 52 5 0 5 U CO
13. Describe products you would like to purchase in the next year whether or not they currently exist and what you would consider a reasonable price 3 Describe the uses you have or foresee for your 6502 based equipment 6 40 4 What kind of articles do you want to see in MICRO Assuming the size stayed the same would you like to see MICRO published monthly 6 current printing format of MICRO the heavy stock and three hole punching costs more than a standard magazine format It was designed so that readers could take the journal apart and save article of interest in notebooks We will continue this format if enough readers feel strongly about it Please circle one Keep Format Prefer Don t Prefer or Else Current Really Normal Format Care Magazine Format 7 Please rate your skill level in micros Hardware Beginner Intermediate Expert Software Beginner Intermediate Expert 8 What was your favorite MICRO article Thank you for taking the time to MICRO Box 3 S Chelmsford MA 01824 Send this sheet PET COMPOSITE VIDEO OUTPUT Cal Merritt R 1 4 Richfield Lane Danville IN 46122 I used one of the existing PET 5 volt sources The easiest way to steal the video and drives is to carefully scrape clean the foils next to the monitor plug and tack solder a twisted pair to each signal and to the closest ground buss Other variations would work equally well To av
14. Program Description My program to compute the value of Pi is shown in Figure 1 It was written using the Apple II computer s Integer BASIC and requires a 16K system 2K for the program inself 12K for data storage The program is fairly straightforward but a brief discussion may be helpful The main calculation loop consists of lines 100 through 300 the results are printed in lines 400 through 600 The second half of the listing contains the multiple precision arithmetic sub routines The division addition and subtrac tion routines start at lines 1000 2000 and 3000 respectively In order to use memory more efficiently PEEK and POKE statements were used for arrays instead of DIM statements Three such arrays are used by the program POWER TERM and RESULT Each are up to 4K bytes long and start at the memory locations specified in line 50 of the program 6 15 The three arrays mentioned above each store par tial and intermediate results of the calcula tions Each byte of an array contains either one or two digits depending on the value of the variable TEN If the number of requested digits for Pi is less than about 200 it is possible to store two digits per byte other wise each byte must contain no more than one digit The reason for this distinction occurs in line 1070 where an arithmetic overflow can occur when trying to evaluate higher order terms of the series if too many digits are packed into each byte
15. The program evaluates the series expansion for Pi until the next term of the series results in a value less than the requested precision Line 1055 computes the variable ZERO which can be tested to see if an underflow in precision has occurred This value is then passed back to the main program where in line 270 it determines whether or not the next term of the series is needed Results Figure 2 shows the calculated value of Pi to 1000 decimal places Running the program to get these results took longer than it did to write the program The program ran for almost 40 hours before it spit out the answer However it took less than two minutes to produce Pi to 35 decimal places the same accuracy to which Ludolph von Ceulen spent his whole life striving for Since the program is written entirely in BASIC it is understandably slow By rewriting all or part of it in machine language its performance could be vastly improved However I will leave this implementation as an exercise for anyone who is interested in pursuing it Figure 1 Program Listing PLIST 8 APPLE PI WRITTEN BY BOR CALL 936 18 TAB 5 PRINT HOM MANY DIGITS DO YOU WANT 19 INPUT SIZE 15 CALL 936 20 TEM 10 IF 512 7208 THEN 58 38 100 SIZE SIZE 1 2 W 4896 8192 RESUL T 12288 68 DIV 1008 2880 2098 INIT 4888 5888 70 DIM CONSTANT 2 CONSTAN
16. U AD S3 S2 S U RETURN PRINT CHR 147 826 22 826 PRINT MNEMONIC SPACE OPERAND GOSUB 15000 F 0 FOR E 0 TO 255 IF MN MN E THEN 1 1 256 NEXT IF F 0 GOTO 14260 ON GOSUB 14100 14130 14180 GOTO 14020 POKE AD CD AD AD 1 RETURN IF OP gt 255 OR OP O THEN PRINT ERROR RETURN AD CD POKE AD 1 0P AD AD 2 RETURN IF OP gt 65535 OR lt 0 THEN PRINT ERROR RETURN POKE AD CD B2 INT OP 256 1 2 256 AD 1 B1 POKE AD 2 B2 3 RETURN IF MN ORG OR MN END OR MN DC GOTO 14280 PRINT 14020 IF MN ORG GOTO 14300 GOTO 14340 IF FO 1 THEN PRINT ERROR GOTO 14020 0 1 72 GOTO 14020 6 20 1201922 14340 14350 14360 14370 14480 14510 14520 15000 15010 15020 15030 15040 15050 15060 15070 15080 15090 20000 20010 20020 20030 20040 20050 20060 20070 20080 20090 20100 20110 20120 20130 20140 20150 20160 20170 20180 IF MN END GOTO 14360 GOTO 14380 1 RETURN POKE AD OP 1 GOTO 14020 INPUT A IF LEN A 3 THEN PRINT ERROR GOTO 15000 IF LEN A 3 THEN MN A OP 0 RETURN S 0 FOR 1 TO LEN A IF MID A M 1 THEN S M M LEN A NEXT IF 5 0 THEN MN A RETURN MN LEFT A 5 1 OP VAL RIGHT A LEN A S RETURN PRINT CHR 147 SZ 0 INPUT ENTER PROGRAM OPEN
17. a collection of specialized DEBUG programs each customized to provide a particular set of capabilities while residing in minimal memory Using his code as a starting point a program wise reader should be able to construct his own set of DEBUG aids ZERO 0000 LOCATION 0000 ONE 0001 TWO 0002 THREE 0003 FOUR 0004 INH 00F9 DISPLAY POINTERS POINTL 00FA POINTH 00FB RETURN 17B5 INTERNAL ADDRESS TBLOFF 17D4 TABLE OFFSET JUMPER 17DD INTERNAL ADDRESS INITI 1E8C KIM INITIALIZE ROUTINE SCANDS 1F1F KIM SCAN DISPLAY ROUTINE GETKEY 1F6A KIM GET KEYBOARD CHARACTER 1780 B1 02 EXEC LDAIY TWO GET CHAR TO BE MOVED 1782 91 00 STAIY ZERO MOVE IT 1784 88 DEY 1785 DO F9 BNE EXEC CONTINUE UNTIL DONE 1787 98 DANDF TYA GET TO OR FROM ADDRESS 1788 95 F3 STAZX 00F3 STORE IT IS SCRATCH 178A A5 FB LDAZ POINTH 178C 95 STAZX 00Fl 178E 20 8C 1E START JSR INITI SET FLAGS AND INIT 1791 20 1F 1F JSR SCANDS DISPLAY BUFFER 1794 DO F8 BNE START 1796 20 1F 1F KEY JSR SCANDS NEW CHARACTER INPUT 1799 FO FB BEQ NO CONTINUE TO DISPLAY 1798 20 6A JSR YES GET THE CHARACTER 179 6 04 LDXZ FOUR PICK UP LAST CHAR INPUT 1740 C9 10 CMPIM 10 IS THE NEW CHAR AD 17 2 FO 30 BEQ PROCES YES PROCESS CURRENT COMMAND 17A4 85 04 STAZ FOUR NO STORE IT 1746 2 LDXIM 04 AND SHIFT IT INTO THE DISPLAY 17A8 OA SHIFT ASLA 17 9 26 F9 ROL INH SHIFT THE DISPLAY LEFT
18. address and TIM or 1 0 independent code Copies Not Specified Price 4 00 Includes Commented source listing operating and modifying instructions and a hex tape Ordering Info Specify the following Char Size 5x5 or 5x8 Starting address 0200 or 1000 System or 1 0 Independent Author Gil House Available from Gil House P O 158 Clarksburg MD 20734 Name HUEY System Any 6502 based system Memory 2 5K Language Hardware Assembly ASC11 1 0 device Description HUEY 65 is a scientific calculator program for the 6502 microprocessors It oper ates from your ASCII keyboard like a calculator will output through your routines to a TV screen or Teletype is preprogrammed to do trig func tions natural and common logs exponential functions and other goodies and is programmable for many other functions financial accounting mathematics engineering etc you would like to call at the press of a single key Copies Not Specified Price Hex Dump at any even page 5 00 Manual and Listings 20 00 Ordering Info Specify starting address Author Don Rindsberg Available from The BIT Stop P O Box 973 Mobile AL 36601 Name Word Processor Program System PET Memory Not Specified Language Not Specified Hardware RS 232 printer addressed via mC printer adapter Description This program permits composing and printing letters flyers advertisements manu scripts articles etc
19. pr or to AD is a legitimate Command character DEBUG still in Execute Mode will process the data which was input prior to the Command code either 2 or 4 characters Note that the Command values D E of if found 6 25 point the data field are processed as standard hex values BREAK This command allows the user to insert a breakpoint anywhere desired in his pro gram When this point is subsequently reached during execution of his program control will be passed to Keyboard Mode of DEBUG and further execution of the user program will effectively be temporarily discontinued Also at this time the user area will be restored to the original configuration existing at the time of the break point insertion Input Sequence Press Keys See on Display 4 Data Characters 4 char 1 4 Data Characters define the Breakpoint location desired The BREAK Command saves the user byte at the Breakpoint and deposits a BRK instruction in place of it Thus that user area should not be altered by the user while DEBUG is in Non Control Mode and a Breakpoint is eminent or the Breakpoint return will not work More than one Breakpoint can be eminent at one time however since DEBUG will store only one byte at a time multiple simultaneous Breakpoints should be apflied only at user loca tions containing the same instruction This way it is immaterial which BRK triggers a return to DEBUG the user area w
20. using the Commodore PET and an RS 232 printer Script directives in 1 line length left margin centering and skip Edit commands allow the user to insert lines delete lines move lines change strings Save onto cassette load from cassette move up move down print and type Copies Not Specified Price 29 50 Ordering Info None Author s Not Specified Available from Connecticut microComputer 150 Pocono Road Brookfield CT 06804 6 23 converter and output buffer attenuator on 2 sq board Directional control 4 connections to computer Description A fast audio cassette data record ing and recovery system Programmable to 4800 baud Loads 8K in less than 15 seconds Fol lows KIM 1 prctocol of open ended record length with start address end address and record ID specified at usual KIM locations Load by ID ignore ID and relocate modes Data recorded in binary form with 2 byte checksum error detec tion Easily relocated can either stand alone or be used as subroutines Requires programm able timer 1 0 Copies About 12 just introduced Price 22 50 1 00 ship amp hand for KIM cassette Includes Assembled and tested interface com mented listings suggested changes to run on TIM and other systems Cassette has software recor ded at HYPERTAPE and standard KIM speeds plus 8K test recording using ZIP TAPE Ordering Info With or Without tape Author Lewis Edwards Jr Available from Lewis Ed
21. 0895 0897 DRIA 089D 0880 08R3 08H6 08R9 0SRB 08 1 0884 08B6 NSBA 08BC OSBF 08 1 08C3 08CA 08 0811 0812 0813 086 0818 08DB 08DE 08DF 08 1 105201 185701 13767 356736 e4B636 181100 6733 00 Re 01 B50R 9548 95 B50C 95CR CR 10F3 6 1400 201 B54R 950R BSCA 9512 950 5 9504 54 9508 CA 10EB 2083 6 248933 118000 228131 105201 13218 1800 R833E3 165000 0C42 00 ASCO 8533 ASDO 8531 2067FD 8616 ROOD B90002 C9D3 F068 e 0R FF 010 98 RA e 04RF9 ASSE cOEDFD 2 03ARFF 18 90D3 E631 eon FF 0520 0530 0540 0550 0560 0520 0580 0590 0600 0610 0620 0630 1640 1650 0660 0620 0680 0690 0200 0710 1720 0730 0740 0750 0760 0220 0780 0790 0800 0810 0820 0830 0840 0850 0860 0870 7880 0890 0900 1910 0920 0930 094 0950 0950 0970 0920 0990 1000 1010 1020 1030 1040 1050 1060 1020 1080 1090 1100 1110 1120 1130 1140 1150 1160 1170 105201 PLTP BASO HS 185701 PLTP 5 BASO HS A13767356736 HS 24 636 HS 181100 ST16 1 PLP1 HS BR3R HS 6733 HS 00 LDX 01 SET LOMEM amp BASIC PROG START 04 LDR STR eLMMLsX STR LMUL X LDA STR eBBSL X DEX BPL 04 JMP lt PTLL gt TO RESTORE LP SUBR TO SET UP PACK MKUP LDX 01 21 LDA LMML X STR
22. 1 25 by Albert Gaspar 6502 Interfacing for Beginners Address Decoding II 29 by Marvin L De Jong Brown and White and Colored All Over 35 by Richard Suitor 6502 Bibliography Part V 37 by William Dial Programming a Micro Computer 6502 by Caxton C Foster 39 Reviewed by James R Witt Jr PET Composite Video Output 41 Cal E Merritt Power From the PET 42 by Karl E quosig Classified Index MICRO 1 6 43 Apple Integer BASIC Subroutine Pack and Load 45 by Richard F Suitor A Partial List of PET Scratch Pad Memory Back Cover by Gary A Creighton Advertisers Index Computer Shop IFC Computer Components 14 The Enclosures Group 2 Micro Psych 21 The Computerist Inc 10 Connecticut microComputer 22 The Tax Store 12 United Microsystems Corp 32 Computers 12 Darrell s Appleware House 36 Color Tech TV 13 Personal Software 42 MICRO 15 PET Shack Software House 42 MICRO is published bi monthly by The COMPUTERIST Inc 56 Central Square Chelmsford MA 01824 Robert M Tripp Editor Publisher Controlled Circulation postage paid at Chelmsford Massachusetts Single Copy 1 50 Annual Subscription 6 00 6 issues in USA Copyright 1978 by The COMPUTERIST Inc 11 Rights Reserved 19522 KEYBOARD WIZARDRY ENGINEERED SPECIFICALLY FOR ATTRACTIVE FUNCTIONAL THE CHERRY PRO KEYBOARD PACKAGE Space Provided for Power Supply e Professional Appearance and Additional Boards Four Color Combinations e Easy
23. 1212 SY JOJTUOW pue I WIM JO 1 11004 62 2 H SOW 9 WSHL ag 71 MI4 243 pue y q Z 91 1 T WIN 243 LiT 12943389514 16 4 paseg w I T T WS 19904 pue Japatsztes uoJ g 243 10 48842 9 I 0 G3IJISSV1 3 61 9 18V doustg Cc 319904 Id atddy I 9 H 518 835 II atddy 9 ino dq 5urdsus 79 5 9 183429183 onuj pue 11 9199 62 5 W 103106 j plIBQOTM 3938141334 ITSM H3AV Idd GG uugj3w C I BUOTN V 133 pue atddy 10 JaTquassestg 2049 JISVG V 12 5 WV jO Japaj Japues qog 215 8 1671 MOTS 81 5 d amoy ay ur 8 JT8H 67 9 SHY aptng II 3I ddy uy 26 7 amoy amp ayy V 12 7 Jajuadie II orddy 7 7 1934 018 3 3184 se qerJeA II erddy 92 5 9 paztstaay Atddng 11 4 au
24. 15 MASTER CHAMGE M C INTERBANK NUMBER tExpiretion date di ee Rs m UD UD UD M um Q 77 71 77777 s am mcum di Uh aes s s mo ee a ee oun opi am um dial ee Gm um m UD UD D s m um di ur HD s s m m d m Credit t ra naber cnam 4D erena a s a pum ee n J AD di A OA s s CO 6828 D um ra s GP S sss ODD m ee ee ee ee ee 1777 ee re w a i um s SIGNATURE ww u w s m G s OS OEE OOS OOS OSS OSE pam x oe D um ue Oe Oe QA WR h UE E ae Q Qu m P G T s s s s Um THE MICRO SOFTWARE CATALOG III Mike Rowe Box 3 S Chelmsford MA 01824 Name LABELER Name ZIP TAPE System TIM based or any 6502 based system System 1 may be easily modified for any Memory 1K other 6502 system with programmable timer 1 0 Language Assembly Memory 3 4 page each for read and write progs Hardware Paper Tape Punch on TTY Hardware Simple single IC audio to logic level Description This program punches legible char acters on a paper tape and is useful for the labeling of punched paper tapes A 64 character sub set of ASCII is used There is limited editing capability on the data There are a number of options for character size starting
25. 335 336 337 340 341 342 343 344 345 346 347 350 351 352 353 354 355 356 357 360 361 362 363 364 365 366 367 370 371 372 373 374 375 376 377 00 31 IM ITICIRIO Let Apple take a bite out of your taxes now KIM 1 219 MEMORY PLUS 8K RAM for KIM 245 with 2716 EPROM sockets and programmer 6522 VIA includes 2 8 bit ports and 2 timers THE Hore has individual and TM 4 small business software programa developed by tax professionals in line with current tex laws Helps you develop your own individualized tax plans SPECIAL includes edge connectors and cable tar connection 10 value PROBLEM SOLVER SYSTEMS KM8B 159 8K low power static RAM completely socketed factory assembled and tested completely compatible with KIM 4 motherboard KIM 4 MOTHERBOARD 119 Power Supply for KL512 34 5V 12V regulated 8V 16V unregulated plenty of power for KIM 1 and 8K memory Basic Program Introductions 4K includes Tax and bookkeeping software and prices audit sur vival quiz and the Tax Store concept Price 4 00 Check or money order Programming a Microcomputer 6502 9 First Book of KIM 9 4 part harmony KIM musicboard 35 converter and amplifier Money Back guarantee or write for Free brochure The Tax Store Inc 7429 Burnet Road No 102 Austin Texas 78757
26. 6 and 7 respectively on the ASR 33 PRINTER RETURN LINE PRINTER o w s s gt T TY UNE PRINTER CR1 TERN GND Parts List 7438 Quad 2 Input NAND Open Collector CR1 184001 1 50V Diode 1 150 ohm 1 2 Watt Resistor Figure 1 A fairly simple circuit for buffering the con trol signal from the PET Computer and converting that signal to a current level capable of driv ing the printer mechanism on an ASR 33 TTY Unit 6 5 Program Design In order to allow the listing program to remain resident in the machine to list other programs under development the program was written in machine language to be stored in Tape Buffer 2 Figure 2 shows a simple memory map of the PET random access memory allocations Without a second tape cassette unit a memory buffer of 198 bytes is available When another program is loaded from tape or the NEW instruction is exe cuted the operating system zeros out memory lo cations 1024 and above However it leaves the memory locations below 1024 undisturbed To ex ecute a machine language program the USR in struction must be called The USR command uses a pair of memory location pointers stored in memory locations 1 and 2 to extablish the first location in machine language code to be process ed Locations 1 and 2 are not modified by the loading of a program from tape or the execution of the NEW inst
27. UUBIOW 13d Pue e ddy JaTquassestg 2069 215 8 V 6 6 WO 217 02 H XU81j 20 134 Ino 20 3411 22 9 d 01014 5911643 134 183 12 7 d vatig g 1 1306 134 Sit vas 03074 5911842 JISV8 9UOG 19A 134 241 03014 8 8390 19A 834 ayy 6 85 LUZ 3d 408 08 591 943 SA 134 9 6 2 03014 18 2 134 243 FAW UT d 03014 5911849 20 Durese g 8 8 887 3331 5 1394 94 13d 1930N tn 9 77 9 OWY 103115 E paeyoty pue 498g 1 315 8 Jebequ erddy 9 891 104116 1 pue 1 pue Jang 2 0 62 9 189599 NI4 943 Joy Durbbnqag 6610 ysy SWeTTITM J C 1 iqrtr3n pue dung xoog Z9 W 2 ledaeg WIJ V 1 7 WSV ag 1 UT IEN 3 19 38 Sly ag 71 1 Aetdstg T WIA 943 3 6 7 62 VWSH Spueqsny 591184 243 atduts WSH aq 71 UTAIEN ejeg Jeurj 58 WIM 3943
28. e system prints READY with the cursor I have included a short machine language gram When run this program will leave a pat tern of small white dots on the upper half of PET s CRT SAMPLE MACHINE LANGUAGE PROGRAM LISTING 826 033A A9 66 LDAIM 102 828 033C 2 00 LDXIM 0 830 033E 9D 00 80 STAX 32768 833 0341 E8 INX 834 0342 FO 03 BEQ 3 836 0344 03 830 839 0347 EA 840 0348 EA NOP 841 0349 9D 00 81 STAX 33024 844 034C E8 INX 845 034D FO 03 BEQ 3 847 49 03 JMP 841 850 0352 00 SAMPLE MACHINE LANGUAGE PROGRAM AS INPUTTED FROM THE KEYBOARD ORG 826 LDAIM 102 LDXIM 0 STAX 32768 INX BEQ 3 JMP 830 NOP NOP STAX 33024 INX BEQ 3 JMP 841 BRK END e 2 42 s 2 s s 99 49 f f 0 2 2 1 REM 6502 ASSEMBLER PROGRAM 2 REM BY MICHAEL J MCCANN 3 REM FOR USE ON THE COMMODORE 10 DIM MN 256 BY 256 CO 16 20 30 FOR E 0 TO 255 READ MN E BY E 40 NEXT FOR E 0 TO 15 READ CO E NEXT PRINT CHR 147 PRINT PRINT 1 INPUT SOURCE CODE AND ASSEMBLE PRINT PRINT 2 SAVE OBJECT CODE ON PRINT PRINT 3 LOAD OBJECT CODE FROM TAPE PRINT PRINT 4 RUN MACHINE LANGUAGE PROGRAM WITH SYS PRINT 5 RUN MACHINE LANGUAGE PROGRAM WITH USR PRINT 6 LIST MACHINE LANGUAGE PROGRAM GET A IF GOTO 180 IF VAL A 0 OR VAL A gt 6 GOTO 180 ON VAL A GOSUB 14000 20000 9000 10000 11000 2900 GOTO 90 SX INT DC 16 UN DC 3 9 16 5
29. first chapter a hypothetical situation is introduced circumstances that one might face in the course of an average day and the microcomputer is sug gested as a solution Initially a simple prob lem is introduced a problem one would not ex pect a computer to solve due to its simplicity Yet this enables the reader to grasp the basic operation of running an uncluttered program suc cessfully Possible reasons as to why a certain program fails are provided to lessen confusion With successful completion of one program the author wastes no time moving on to new situa tions This may seem somewhat fast and confus ing to those who greet micros as a totally new experience Yet the situations do become more interesting and more challenging to solve by computer software Such programs include 6 39 020829 Keybounce Combination Lock and Digital Clock among others Several of these programs are completely legitimate and fully operable AS noted before Foster moves at a swift pace At certain points various instructions and KIM 1 anatomy are condensed into a mere page or two Basic understanding of digital electronics is assumed often and may be required before fully digesting some of this material These two minor weaknesses may tend to boggle the mind of the newcomer and hinder his comprehension of the purpose programming and its make up Suggestio s For those who are newcomers to the sport of computing and digi
30. may not be completely undesireable since 1 normally the user will be interested in expanding an area not in compressing it for example to add instructions and 2 this serves as a useful tool to provide filler bytes in memory when desired BRANCH This Command assists in calculating Branch values Input Sequence 1 Enter the necessary 12 bytes of Branch Over lay either through KIM or by tape overlay These will of course have to be restored to the original configuration when through with BRANCH 1 Put DEBUG into Keyboard Mode Press Keys See on Display 2 char 2 Char E AD 2 char 2 char D VALUE The first 2 characters are the 2 least signifi cant values of the Branch Address The next 2 characters are the 2 least significant values of the Branch to Address The E stands for Evaluate The correct Displacement VALUE will appear in the 5th and 6th display positions The displacement is calculated assuming that the two addresses are in the same page For page overlap entry will have to be done twice We believe that different users will have different preferential methods for doing this so our own method which is somewhat involved is not described If both entries are on the same page but are separated by a distance greater than the standard branch range the value calculated will be incorrect It is the user s responsibility to check for out of range values 6 26 2 Overall Notes 1 Whe
31. secondary Number Store Work area M 192 Length of things in Input Buffer M 10 89 or Length of things in Output Number M 256 other 194 217 Subroutine Point through code one at time RTS with code value in accumulator and Carry Flag Clear if x Q if end of line Ignore Spaces 5 0 9 2 FN IND 201 Code Pointer M 218 222 Number Store Work area RND FN IND 224 Screen Memory Row location M 226 Sereen Column position VC RO FN IND 22T 234 M 238 H 239 M 240 M 241 242 FN IND 253 M 245 FN IND 247 251 M 256 M 256 M 3117 511 M 512 514 M 515 M 516 M 517 518 M 521 or M 594 10 M 523 M 821 M 525 M 526 M 527 536 FN IND 537 IND 539 M 547 M 548 M 549 550 551 553 577 M 578 587 588 597 M 598 607 608 610 611 612 616 M 5354 825 M 826 1023 Move Memory from or to pointer Quote flag 0 end quote 1 begin quote Length of File name after SAVE VERIFY ete File I O Option 0 read 1 write 2 write EOT Device Tape 1 2 Buffer pointer Screen Row 0 24 Load into Verify from Save into pointer Insert Counter INST Minus sign or Space for Output Number Output Number ASC Digits til a Null 0 Tape Read Working Storage Stack area TI clock Only One Value per Keypush flag SHIFT flag 0 no shift 1 shift TI Update Interrupt C
32. struction will be BCC HA Remember that if further DEBUG usage is planned the original 12 bytes starting at 1780 have to be replaced Program Notes The instruction listings 17B4 and 17E4 are NOT errors and must be placed in memory exactly as shown 2 Locations 17E7 and 17E8 are used by the KIM monitor for tape checksum However their usage in DEBUG will not interfere with KIM since the two programs do not of course use them at the same time 020939 6502 INTERFACING FOR BEGINNERS ADDRESS DECODING II Marvin L De Jong Dept of Math Physics The School of the Ozarks Point Lookout MO 65726 I hope you did not turn any expensive integrated circuits into cinders with last month s experi ments We will begin this month by considering the questions raised in the last column You will need to refer to the circuits tables and the program described there The following table describes the activity which takes place on the address bus and the data bus while the program is running It is organized by clock cycles each one microsecond long starting with the op code fetch of the CLC instruction CYCLE ADDRESS BUS 15 A14 A13 DATA BUS COMMENTS 0 0200 0 0 0 CLC op code Pin 1 of LS145 is low because address lines A13 15 are low 1 0201 0 0 0 STA op code LED will glow when connected to pin 1 but not to other pins 2 0201 0 0 0 STA op code All other pins on LS145 are high 3 0202 0 0 0 XX Low order address of s
33. subject Robert Ford Denison RD 5 Teeter Road Ithaca NY 14850 has developed a resident symbolic 6502 assembler which runs in 3K 4K recommended and uses a Qwerty keyboard for input and the KIM display for output To test it he is offering a free sneak preview of the assembler to a small group of 6502 users since he would appreciate comments on any parts of the documen tation that are not perfectly clear Write him for further information General Garbage You might want to write to Robert Elliott Purser at P O Box 466 El Dorado CA 95623 and request a copy of his World s Second Most Incomplete Software List for PET Radio Shack Apple amp Sol MICROBES Applayer Music Interpreter Suitor 5 29 5 30 OA20 82 20 OB 5 31 0400 83 90 OF 83 90 OF FF OF18 1C 1A 18 1A 91 1C 38 18 OF50 81 55 55 55 FF OF58 81 05 05 05 FF OF90 83 58 OF D4 BO 83 50 OF 83 0810 48 02 28 02 08 02 E8 01 These problems are in the music and tone table and were caused by the 8 s on his TTY looking very much like 0 s the changes and the music will probably sound better A BASIC 6502 Disassembler for Apple and PET MeCann 5 25 5 26 3020 5 27 6000 6100 6120 6250 DC IB GOSUB 1000 ASL should be ASLZ CLC should be CLI JMI should be JMPI CPX should be CPXZ D A and A D Conversion Using the KIM 1 De Jong 2 11 IC should be labeled 1408 and pin 14 Should have 1 5K resistor to 5 while pin 13 goes directly to
34. the PET The 6500 1 is a single chip NMOS microcomputer 1 or 2 MHz fully compatible with the 6500 family De Jong Marvin L Apple to PIA s 6502 Interfacing for Beginners installment in a continuing series Rowe Mike Half a Worm in the Apple Address Decoding I The first More on the controversy on interfacing the See also EDN May 20 1978 Sander Cederlof Bob A Slow List for Apple BASIC Program slows down the list process so it can be more easily reviewed Rowe Mike The Micro Software Catalog II series Synertek Inc Synertek s VIM 1 6502 based VIM 1 Suitor Richard F The second part of this continuing A good description of the many features of the Similar to and compatible with KIM 1 with some new features Applayer Music Interpreter A music interpreter written in 6502 assembly language for the Apple but can be used on other 6502 systems Dial William 6502 Bibliography Part IV The fourth part of the continuing bibliography of the 6502 literature of which this is the fifth part Williams J C A Block Hex Dump and Character Map Utility Program for the KIM 1 A fully relocatable utility program which will dump a specified block of memory from a KIM to a terminal in several formats Rockwell International Rockwell s AIM is Pretty Good assembled versatile microcomputer system on one board plus keyboard Rockwell s AIM 65 is an It has a 20 character
35. the routine must be above HIMEM e g in the high resolution display re gion 17A below the start of the BASIC program where N is the number of routines stored and W is the total number of words in all of these routines Also those routines that are highest in memory should be packed first to avoid overwriting during pack or restore Oth erwise it is not necessary to worry about over writing during the restore process only 1A words just below the BASIC program are used WARNING 2 Do not attempt to edit the program after calling MKUP If editing is necessary RUN once to unpack then edit and call MKUP again The routine works as follows It first packs the restore routine just below the BASIC pro gram It then packs other routines as request ed with first address and number of bytes words When S is given it packs itself with the information to restore LOMEM and the begin ning of the BASIC program first 46 words of the routine form a BASIC statement which will initiate the restoration process when RUN is typed If a particular HIMEM is needed by the program e g for high resolution programs it must be entered before LOADing The LOMEM will be reset by the restoration process to the value it had when MKUP was called I do not have a SWEET16 assembler hence all of those op codes are listed as tables of data In the listing comments indicate where constants and relative displacements are
36. the white or black or either gray except possibly on a high resolution monitor 6 34 219229 is Between Brown White This section presents a brief application of the concepts of the relationships in color space of the Apple colors Many of you I suspect are regular readers of Martin Gardner s Mathemati cal Games column in Scientific American I strongly recommend it to those of you who have not already been introduced It publicized Life MICRO 5 5 and motivated Applayer MICRO 5 29 and was the motivation for this program There s a lot of gold in the mine yet In April the column discussed the aesthetic properties of random variations of different kinds To summarize briefly three kinds are WHITE Each separate element is chosen randomly and is independent of every other ele ment Called white because a fre quency spectrum of the result shows all frequencies occur equally a qualitative description of white light BROWN Each separate element is the previous element plus a randomly chosen devia tion Called brown because Brownian montion is an example 1 F So called because of its frequency spectrum intermediate between white and brown The column presented arguments attributed to Richard Voss that 1 f variations are prevalent and aesthetically more satisfying than white not enough coherence or brown not enough variation An algorithm was given for generat ing elements w
37. to a particular address at its input pins is called a device select pulse or an address select pulse The LS145 produces a logic 0 or active low device select pulse some times symbolized by DS This pulse used to select or activate or enable another de vice in the computer system such as a memory chip an 1 0 port a PIA chip or another deco der As mentioned in the last column the de vice select pulse from the LS145 could be used to enable a 74LS138 which would then decode ad dress lines A10 12 dividing an 8K block into 1K blocks Such a scheme is very similar to the expansion circuit suggested in the KIM 1 USER MANUAL page 74 Similar circuits are alsc 6 29 used on memory expansion boards In the present circumstance I have decided to make a trade off between wasting address space and minimizing the number of chips on the breadboard Our purpose here to configure some 1 0 ports as simply as possible The decoding circuit is shown in Figure 1 A total of eight device select pulses are avail able for eight 1 0 ports Note that one of the 8K selects 8K4 from the LS145 enables the LS138 which decodes the three low order address lines All of the 8K4 space is used to get eight I O ports Using a 74LS154 instead of the LS138 and decoding on more address line would give 16 I O ports in the event we need more Or we could take another 8K select to enable anoth er LS138 or LS145 giving us 8 or 32 ports re spe
38. two pass versions of the assembler text editor and disassembler with a 30 page manual and PET machine language programming hints 24 95 MICROCHESS 1 5 by Peter Jennings for Level and TRS 80s In 2 80 machine language easily loaded from cassette using the CLOAD command TBUG is not needed Uses standard algebraic chess notation to describe moves and checks every move for legality Handles castling and en passant captures You can play white or black set up and play from special board situations or even watch the computer play against itself With 3 levels of chess play 19 95 BRIDGE CHALLENGER by George Duisman for 8K PETs and 16K Level TRS 80s You and the dummy play four person Contract Bridge against the computer The computer will deal hands atrandom or according to your criterion for high card points You can review tricks swap sides or replay hands when the cards are known No longer do you need four people to 14 95 ORDERS Check money order or VISA Master Charge accepted programs and cassettes guaranteed Our catalog describes many other great software products including an ASTROLOGY program a FOOTBALL game a GRAPHICS utility package and many others For your free copy send a letter giving your PET or TRS 80 serial number memory size and your most wanted software product a Personal Software ee 136 59 Cambridge MA 02138 VISA MC
39. viewer is usually given final say with a hue or tint control The time relation of the color signal to the standard signal is expressed as a phase angle is measured in angular measures such as degrees or radians and can run from 0 to 360 degrees This phase angle corresponds to position on a color circle with orange at the top and blue at the bottom as shown in Figure 1 The perimeter of the circle represents different colors or hues radial distance from the center represents amount of color or satura tion The former is usually adjusted by the tint control the latter by the color control A color that can be reproduced by a color TV can be related to a point in this circle The angu lar position is coded in the phase of the 3 58 MHz color carrier signal the radial distance from the center is given by the amplitude of the color carrier The numerical coding of the Apple colors can be appreciated using this circle and binary repre sentation of the color numbers The low order bit corresponds to red 1 second bit corresponds to dark blue 2 the third to dark green 4 and the high order bit to brown dark yellow 8 find the color for any color number represent each 1 bit a quarter pie piece centered over its respective color as in dicated in Figure 1 brightness or light ness of the color corresponds to the number of pie pieces and the color corresponds to the point where the whole colle
40. 1 233 48 173 141 52 76 1 00 251 80 18 83 13 255 166 10 255 166 80 252 32 12 252 255 166 122 F2 05 128 05 05 05 128 05 03 05 05 05 ALPHA LDA CHAR 878 175 252 03 CLC 881 24 ADC 40 882 105 64 STA PCHAR 884 141 255 03 JSR PRINT 887 32 166 03 CLNUP INC COUNT 890 238 251 03 LDA COUNT 893 171 251 03 CMP 28 896 201 40 BEQ NEWL 898 240 13 INX 900 232 TAX 901 138 BNE NEXTC 902 208 06 INC 869 904 238 89 03 INC 834 907 238 66 03 NEXTC JMP LOOP 910 76 87 03 NEWL LDA 0 913 169 00 STA COUNT 915 141 251 03 INX 918 232 JMP LOOP1 919 76 64 03 FINDR LDA 80 922 169 128 834 924 141 66 03 STA 860 927 141 89 03 E RTS 930 96 PRINT LDA 934 169 255 e STA PADD 936 141 67 232 LDA PCHAR 939 175 255 03 STA CHAR 942 141 252 03 STX TMPX 945 142 253 03 JSR DELAY 948 32 230 03 LDA SAD 951 169 79 232 AND FE 954 41 254 STA SAD 956 141 79 232 JSR DELAY 959 32 230 03 LDX 08 962 162 08 01771 LDA SAD 964 175 79 232 AND FE 967 41 254 LSR CHAR 969 78 252 03 ADC 00 972 105 00 SAD 974 141 79 232 JSR DELAY 977 32 230 03 DEX 980 202 BNE 0071 981 208 237 LDA SAD 983 173 79 232 ORA 01 986 O9 01 5 SAD 988 141 79 232 JSR DELAY 991 32 230 03 LDX TMPX 994 174 253 03 RTS 997 96 DELAY LDA 02 998 169 02 STA TIMH 1000 141 254 03 LDA 52 1003 169 82 DEQ SEC 1005 56 DE4 SBC 01 1006 233 01 BCS DE3 1008 176 03 DEC TIMH 1010 206 254 03 DE3
41. 1 1 1 N PRINT 1 ZZ DA ZZ GOSUB 20110 PRINT 1 EN DAZ EN GOSUB 20110 FOR AD ZZ TO EN DA PEEK AD PRINT 1 DA GOSUB 20110 NEXT CLOSE 1 RETURN SZ LEN STR DAZ SZ 1 IF SZ lt 192 THEN RETURN POKE 59411 53 TzTI IF TI T 6 GOTO 20150 POKE 59411 61 SZ SZ 191 RETURN 6 21 219906 MICRO PSYCH A bimonthly newsletter for those interested in sharing ideas and experiences about the use of micros and minis in psychiatry and psychology Communications network info about hardware software research book reviews etc 10 year to MICRO PSYCH 26 Trumbull Street New Haven CT 06511 COMMODORE PET HARD COPY OUTPUT USING PET ADA 1200 ees THE FUNCTION PLOTTED 13 m Yee LLE TS een READY 4 TRENCACK Seles Carburetors 1977 t 1 I est Is eee wl f TYPE C 000 0 1 eec 1 OPEN 6 0 611157 eee 220 n hi H b 10 ARCSIN AND ARCCOS FUXCTIONS FOR CQMMOOKE PET I dat 000 000 000 DOO DOO 11 gt 78 REM Listed on GE TermiNet 306 ses 000 000 000 421 5 80 HEM using Cac ADA 1289 D I see 000 000 000 600 000 xxr d 99 REM ees NOD 000 000 000 000 198 REM OUTPUT FILE DEVICE 0 2 000 neo non 000 000 XXX XXX 1 2 1 10 5 0 19 see 000 000 n00 OOO XXX XXX XXX 1 3 1 128 REN F ses 000 000
42. 2 POKE 992 5 230 993 63 994 174 FORMAT LABEL INIT LOOP1 LOOP3 LOOP2 OP 1510 1520 11530 1539 1540 11556 1560 1570 1580 11590 1600 1609 1616 1619 11630 1640 1650 1666 16760 1680 1689 16980 11768 1710 1720 1730 1746 1756 1760 1770 1780 1790 1608 995 253 996 03 997 96 REM DELAY POKE 998 169 999 02 POKEC 100057 141 POKEC1691 254 10020 03 1063 169 POKEC 1064 82 DE2 POKEC1605 56 REM 4 1006 233 1807 01 16068 176 1009 63 POKE 1010 206 1011 254 1012 REM POKE 1 13 172 1014 254 1015 1016 16 1017 243 1018 96 eCOUNTC 1019 CHAR 1020 1021 REM TIMH 1022 1023 END FIELD LOC LDA STA TAX LDA UMP BEQ LDA STA JSR LDA STA JSR LDA STA SEC SBC BMI LDA STA JSR JMP 6 8 0 COUNT 52848 18 FINDR PRINT PRINT 32848 CHAR 20 ALPHA CHAR PCHAR PRINT CLNUP 1229929 826 828 831 832 835 837 839 841 844 847 849 852 855 858 861 862 864 866 869 872 875 OP 169 141 170 189 201 240 169 141 169 141 32 189 14
43. 23 2 25234468 8 352819311881 718190 24378 32752 286587 53328 638142861717 7669147 383598 25 3490428 75468 0 31159 56286 388 2353 7879937 91987 781857 7085 SC 92787661119590921642019 b Figure 2 Pl to 1000 Decimal Places 11339 A SIMPLE 6502 ASSEMBLER FOR THE PET Michael J McCann 28 Ravenswood Terrace Cheektowaga NY 14225 Most computer hobbyists do all or most of their programming in BASIC This is unfortunate since there is much to be gained from machine code level programming On the average machine lan guage programs are 100 times faster than their BASIC equivalents In addition machine lang uage programs are very compact making efficient use of memory I have written a simple 6502 assembler in Commodore BASIC see listing with the following functions Input source code and assemble Save object code on tape Load object code from tape Run machine language program wth SYS Run machine language program with USR List machine language program AN Wh 5 INPUT SOURCE CODE AND ASSEMBLE Symbolic addresses and operands are not per mitted All addresses and operands must supplied in base 10 Each line of source code is assembled after entry Source code is inputted in the following format mnemonic one or more spaces operand Three pseudoinstructions are supported ORG Start with this address NOTE if the user does not specify the origin it will be set at 826 base 10 DC Define constant place th
44. 4 10 GOTO 3000 100 PLOT xs Y PLOT 28 PLOT 6928 7 PLOT 28 1 28 3 PLOT PLOT 3g amp Y 38 X PLOT 38 FLOT 38 Yek 110 RETURN 120 16 125 53 2 130 U RNE 90 147 FOR B 1 11 150 93 5 lt 69 155 IF PEEK 162862 gt 127 THEN GR 160 K K L IF 1 THEN K k 2 165 IF lt 0 THEN 2 0210829 6 35 2 table of color numbers was made DIM 16 in the program so that color numbers near each other would correspond to colors that are near each other The choice given in the program satisfies the following restrictions a Adjacent numbers are from adjacent planes in Figure 2 b No angular change in the color planes is greater than 45 degrees between adjacent numbers 3 The color number is the same for 20 plots and then is changed by an amount chosen randomly from 2 to 2 This is a brown noise genera tion concept However most of the display normally has color patches that have been gene rated long before and hence are less correlated with those currently being plotted I ll claim credit for good intentions and let someone else calculate the power spectrum 4 Each plot is actually eight symmetric plots about the various major axes I can t even claim good intentions here it has nothing to do with 1 f and was put in for a kaleidoscope effect Those who are offended and or curious can alter statement 100 They may wi
45. 47 6502 BIBLIOGRAPHY PART William Dial 438 Roslyn Avenue Akron QH 44320 Smith Stephen P 6502 Disassembler Fix DDJ 3 No 23 Issue 3 Pg 3 March 1978 ROR and ROL instructions were omitted in the previously published disassembler DDJ 3 Issue 1 This offers a simple fix 1 User Notes Issue 9 10 January March 1978 Butterfield Jim Dicey page 17 A program to roll up to six dice Butterfield Jim Teaser page 17 Jumbo version of Bob Albrecht s Shooting Stars Lewart Cass Correction for Lancaster s page 20 Oliver John P Comments and Corrections for SUPERDUMP LOAD pg 21 Quosig Karl and Susan Input Output Personal Computing 2 No 4 pg 8 April 1978 Comments on PET problems Bishop Robert J Rocket Pilot Kilobaud No 13 pg 90 Jan 1978 And interactive game for the Apple II OSI Small Systems Journal 2 No 1 January February 1978 Anon What s a USR Function Via the USR function one can have a 6502 BASIC program which works in conjunction with one or several machine code programs Anon Quickie A 6502 BASIC program for converting decimal to binary numbers Glasser Daniel Chessboard Program 6502 BASIC for a computer chessboard which moves pieces and displays the new board Not a chess progran Anon DOS CNTRL A BASIC program to perform transfers to or from OSI s new hard disk drive Anon Track Zero Writer A Machine language program to modify track ze
46. 50 each including postage in the USA and Canada Add 1 25 per copy for overseas Air Mail postege or 50 per copy for overseas Surface postage Get 11 of MICRO Volume 1 While the supply lasts all six issues of MICRO Volume 1 are available as a press board bound set Now you can get a second set to keep bound while you separate your individual copies into notebook by categories Or get a set for friend who has just bought or is thinking about buying a 6502 based system Or how about a set for your computer club local library where you work price for the com set is 7 50 including postage in the USA ostage to all other countries is 1 00 surface or 4 00 Air Mail If you are interested act now since we will probably not be reprinting these issues again Street City State Issue Number 1 2 5 4 5 6 All of MICRO Volume 1 Send Check or Money Order to MICRO Box 3 5 Chelmsford 01824 7 r Southern California 6502 Center Computer Components of Oronge County 6791 Westminster Ave Westminster CA 92683 714 898 8330 Hours Tue
47. 5064 DOOD BAD DOC PEAY D 4 604 94945 0045 46045 424 0606 524 064524664 964 204 9 4p 94 644 amame am ee es oy ee gee T s xp Oe ee ee s m 8 s OO SS OSES s m Onty 1 Description baud rete price total Mell with or charge information to 1 998 58 I E CONNECTICUT microCOMPUTER 6 _ Word Processor Program cassetta 329 301 lt Brookfiatd Conn 06804 4865 solder t 124 58 t 1 4 tberrisr strips 1 420 50 i t CIMPAMY Subtot t I ADORE 55 Evia se EE 5 Connecticut residents add 7 selss tax I DIE E and shipping add per order 43 96 Foreign sir mail add 16 96 order I STATE 21 _ s s a Oe u Oe ee oe v SE eee eee m Ub 4D hem eee m s mm aw s m s END Q m m ee OSS s DOG UP AD OS s wee eee de Totel included with order s N ua um Ae m deus b nt D hU ds s SD pem m m ED am m a m CHARGE 0
48. 512 454 0255 Write for list of KIM amp PET memory amp accessories All items postpaid in U S Tax deductible programs Write Today Franchises available Computers Box 104 Perkasie 18944 215 257 8195 Just for the fun of it here are some routines to create something which sounds like the main battle scene from STARWARS Enjoy Apple II Startrek Sounds Routine Dis assembler Listing 3FAIL 3FAL AQ QE LEY 0 3FA3 A2 00 LEX 500 5 3FA6 18 CLC 3FA7 9 01 SBC 301 3FA9 DO FC BNE 3FA7 3FAB 30 CO STA C030 3FAE ES INX 3FAF EQ RC 8 1 00 F2 BNE 3FA5 3FB3 LEY 3F B4 LO ED BNE 3F B6 69 RTS 3FD7 00 BRK 3FBR 09 BEK 3 9 00 00 3F BB 00 BPK 00 3FBL 00 Add ZIP to your cassette tape I O with ZIPTAPE a fast up to 4800 baud audio tape recordin and recovery system for 1 and other 650 based systems rates on most good quality cassette recorders and even economy type units should be able to function at 2400 or 5600 baud The assembled and tested interface uses a single IC to translate audio input to logic level buffers and attenuates signals for recording via either an AUX or MIC input A 10 ohm load is included for recorder load on playback 5V at less than 10 ma is required for power The software uses about 3 4 page
49. 56 3 49999999 1 da 296 62500 15625000 34146855 2 X 88315707F 12 13 0113803 2 79999999 eee CONVENT DEGKEES JPH Semen 27 67540854 0 1 011315326013 17 320581 3 09009099 200 Au 350 122500 42815000 98271922 8 2 2712527 1 0 902960 1109009999 PRINTS lt 1 05 ARCSIN ABCCUSA PT 64 869 09h 49498141 4 67946723 913 4 19999999 Wie PRINTS S asa desea 60112500 250008 1 29 361 345246 tad 9 0 134 57510570 PPINTe 5 1 NEXT 16637570 2 43 27268E 14 2 4520700 364 FOR Wei TO 13 CEMI STRH LAS PR1NTe5 i INEXT ese 5243422 2 8405 22012514 24 4 48974 425595509 65 422500 274625 687112634 9058 1722E 14 25 4950976 4 70999999 3959 5 Tin 86721959 8 644994 JE 14 26 457591 4189999999 1 2 586 T 5626 4218756 7713108 990 1 2418571280915 27 98512709 4 89999999 t o KEACY 99999999 The CONNECTICUT mi croCOMPUTEI model 1200 is the first in a line of peripheral adapters for the COMMODORE PET The CmC ADA 1200 drives an HS 232 printer from the PET IEEE 488 bus The CmC ADA 1200 allows the PET owner to obtain hard copy program listings and to type letters manuscripts mailing labels tables of date pictures invoices grephs checks needlepoint p
50. 5V check spec sheets on 1408 to be absolutely sure of connections 0308 4C 0403 should be 05 03 MICRO Charles R DESIGN OF INTERFACE Husbands 24 Blackhorse Drive Acton MA 01720 With the recent acquisition of a PET Computer one of the facilities that was immediately need ed was a method of obtaining hard copy listings of programs under development In addition to the PET I had an ASR 33 Teletype Unit available which had been interfaced to my 1 This article describes the hardware interface and as sociated software necessary to use the ASR 33 TTY a printing facility for the PET An im portant design goal for the interface was to de velop the software to remain resident in the computer in such a manner that the program under development could be loaded run and listed without disturbing the list rg program The Interface Circuit Figure 1 shows the 20 ma current loop circuit required to interface the ASR 33 to the PET The circuit consists of an open collector NAND gate to provide the proper buffering a diode and a pull up resistor The completed circuit was built on a small perforated board The PET supplies power and ground to the interface board from the second Cassette Interface The input signal is delivered from PAO on the PET parallel user port The interface board is connected to the teletype by means of the PRINTER and PRINTER RETURN lines These lines attach to terminals
51. 640 1050 1060 1070 1080 1090 1100 1116 1120 1130 1146 1154 1169 1170 1180 1190 1199 1240 1216 1220 1230 1240 1250 1260 1270 1280 1290 1300 1318 1320 133 1346 1350 1360 1376 1380 1390 1400 1416 1 420 1430 1446 1456 1466 1470 1486 1496 1500 PRINT THIS SUBROUTINE PRINTS THE CHARACTER IN TTY 934 169 935 255 936 141 POKE 937 567 POKE 938 5232 939 173 940 255 941 03 POKEC942 141 943 252 944 03 945 142 PUKE 946 253 POKE 947 563 948 32 949 230 950 03 951 169 952 79 POKEC953 232 954 41 955 254 956 141 957 79 POKE 958 232 POKEC959 32 9602 230 961 03 POKEC962 162 963 88 KEM OUTI POKEC964 173 lt 965 79 966 232 967 41 966 254 969 7 970 252 971 03 972 105 9732 00 9742 141 9752 79 976 232 977 32 976 230 979 986 2002 POKE 961 5 208 982 237 983 173 984 79 9655 232 POKE 986 5 09 POKE 987 61 POKE 988 gt 141 9689 79 990 232 991 3
52. 650 890 599 906 91 911 912 913 914 917 918 919 92 921 921 92 923 924 925 926 927 928 929 930 874 03 POKE 875 76 POKE 876 122 8772 03 REM ALPHA PRINT ALPHABETIC CHAR 878 173 POKE 878 173 POKE 879 252 POKE 880 03 POKE 881 24 POKE 882 165 POKE 883 64 141 POKE 885 255 POKE 886 03 POKE 6887 32 POKE 888 166 POKE 6889 03 HEM CLNUP COUNT CHARACTERS AND KEM TEST FORK END OF LINE POKE 4696 5234 91 251 POKECS92 893 173 594 251 895 A3 PUKECS96 241 POKE 897 40 898 240 599 13 9 232 PUKEC96012 135 POKEC9hn22 208 903 06 904 238 9 5 89 POKE 966 n3 007 238 906 66 9069 03 POKE 916 76 9112 87 912 03 eNEWLeeINITALIZES NEW LINE POKE 913 169 POKE 914 Hu 915 141 POKEC9162 251 9 177 03 918 232 919 76 920 64 921 03 REM FINDR PROGRAM COMES HERE IF AN IS FOUND IN IST COLM POKE 922 169 POKE 922 169 POKE 923 128 924 141 925 66 926 03 927 141 POKEC928 89 929 03 930 96 949 95 966 961 962 963 964 965 966 970 988 999 1008 leid 1020 1630 1
53. Access to Connectors e Improves Man Machine Interface e Keyboard Positioned for Ease MADE OF HIGH IMPACT STRENGTH of Operation THERMOFORMED PLASTIC EASILY ASSEMBLED Kydex 100 Requires Absolutely No Durable tion of the PRO Keyboard Molded In Color All Fasteners Provided Non Conductive Goes Together in Minutes AVAILABLE FROM STOCK with a Small Screwdriver e Allow Two to Three Weeks for Processing and Delivery No COD s Please e Dealer Inquiries Invited ORDER 1 this Coupon Print Type Please 2 Attach Check or Money Order and Mail to the NAME e a O enclosures CITY group 55 stevenson san francisco 94105 o ZIP Please Ship Prepaid SKB 1 1 s Color Desired blue O beige O 33 75 Each black red D California Residents please pay 35 94 Includes Sales Tax Patent Applied For TM Rohm amp Haas There were so many good articles submitted for this issue of MICRO that we have had to modify the format slightly to make more room Most of the MICRO material has been reduced to approxi mately two thirds its old size providing about 50 more space per page While this does make type smaller it is still very readable Some material in particular program listings were left full size This new format will permit us to print a lot more material without increasing the cost of printing How do you get hardcopy from a PET You could wait
54. Buffer 2 The BASIC program to be listed is then loaded into the machine The LIST N instruction is then execut ed to allow the operator to preview the initial lines of code When the operator is satisfied with the 15 to 18 lines of code to be printed as displayed on the screen the command X USR R is entered and the RETURN key is depressed The USR instruction transfers control to the machine language code located at the address specified by memory locations 1 and 2 The teletype printer will then print the display on the PET CRT from the beginning of display line 3 to the word READY The operator then uses the LIST M X command to preview the next series of lines to be printed It should be noted that the PET listing format leaves a blank line between the last line number selected and the READY response if the last line requested is not the last line in the program preview function allows the operator to block out the lines to be printed regardless of the line num bering technique employed when the program was composed If the program being listed has an R in column 1 due to a line length in excess of 40 characters the operator must take some action to remove this condition before executing the listing of that portion of the program Conclusions and Recommendations The hardware and software illustrated in this article can be used to permit the listing of programs and recording the results of program runs on a conventional TT
55. EAKING ON THE SCREEN IN SERIAL TELETYPE FORMAT THE PROGRAM IS STOKED IN MACHINE EM CODE IN TAPE BUFFEH 2 THE EM IS EXEUUTEL USING USK 12 58 22 03 17 VARIABLES 526 169 627 826 14 POKECK29 525 PUKE POKE 831 176 REM LOOP TEST FIRST CHAR ON EACH KEM LINE FUR AN POKE Ch 32 159 POKEC833 50 POKE H34 128 PUKECK35 5201 PUKECK36 516 537 4 POKE CH 83 REM LOOPS PRINT CH LF 34 169 409 13 POKECK41 141 PUKE CK 42 4255 POKECBA3 POKECG44 5 166 546 3 POKE 847 169 FOKEk S848 10 POKECH49 14 PUKECG50 5255 POKE 651 503 POKECB52 32 853 166 POKEC454 HEM LOOP2 EXAMINE AND PRINT THE OTHER CHARACTERS ON THE LINE POKE 855 189 POKE 856 566 POKECB572 128 POKEC6552 141 POKE 859 252 POKECB60 03 POKECB612 56 862 233 POKE 863 32 PUKE 464 48 POKE 665 512 866 173 POKE 667 252 POKE 868 563 869 141 8702 255 8 71 03 POKE 872 32 POKE 873 5166 540 550 560 570 579 580 580 590 609 610 620 630 640 650 660 670 656 6960 698 699 700 710 126 7340 744 750 760 776 780 7960 804 618 S24 530 840 650 560 561 662 663 570
56. F 0310 5018 DL Fass GTNM FFA 0320 BASIC INST TO RESTORE 4 Neo 460000 460000648101 COUT FDED e4E101 FELL FF 3A 0340 006587460003648 2 400008 5416 9 BAY 0 08100 020055 ege nes3sacebE3SFBeCH P 0946 0211 FT de nega 814 04 0870 0216 coreie 03650 H amp 007212874600721 0880 218 Mkc1 210 FS 0883 oon gennaoal 364Ra30 ME 01 1884 icr 2 i E Ad MK 06 IRCA 0224 OZAN MERR aspi sce eSaseE amp e 5388E3SFBeCBO O72e Mk US Ue DE MK o2 NSE 1 scc nore 51 2 12382 0390 12382 2 0072 TE 0221 gane 1234 12 2 128746 03400 1282746 00 4825 12 1cBr4e0n 72ei15Be MKII nan s3C Bean MK 1c 0918 8 017203 0410 0172034081010001 MK10 X n93e 0241 416101 M04 09465 0244 952 0420 INIT RESTORE 0246 D n430 PTBK socius 0847 Reni 0440 LDX 01 TUE 0849 B5CH 0450 PT c LDA e BBSL X SEIS 7 9502 0460 STA eBSX DL x 1840 B54C 470 LIA HIMLs 84 9508 0380 STA 5 x 0851 0430 DEX nsSe 10F5 0500 BPL 0854 208956 0510 JER 416 6 46 0210829 0888 088A 088 088 0890 0892 0894
57. NEW LINE Figure 3 A general listing algorithm for use with the TTY Listing Program The software control of the output port is done the PRINT subroutine The subroutine PRINT a machine language pro gram which times out the proper serial bit pat tern to the TTY to execute the printing of the designated letter After each character is printed a counter is incremented and tested to determine if the 40 character line has been com pleted If characters have not been printed the next display character is examined At the end of each line the first character of the next line is examined for an before a carriage re turn and line feed is executed A listing of the program in BASIC format is shown in Listing 1 The program was originally hand assembled in 6502 machine language The machine language program was then converted from hexadecimal to decimal and formatted as a series of POKE instructions The machine language mem ory address pointers were also POKED into loca tions 1 and 2 by the BASIC program The print out appearing in Listing 1 was produced on the authors TTY using the Listing Program The PRINT subroutine is a modified version of the PRINT 1 CHAR program developed by MOS Technology for the KIM 1 Using the Listing Program The program as shown in Listing 1 is loaded into the machine in the normal manner A RUN command is then executed and the program will be POKED in machine format into Tape
58. ORAY 3 DATA NULL O NULL O NULL O ORAX 3 ASLX 3 NULL O JSR 3 ANDIX 2 NULL O DATA NULL O BITZ 2 ANDZ 2 ROLZ 2 NULL 0 PLP 1 ANDIM 2 ROLA 1 NULL O DATA BIT 3 AND 3 ROL 3 NULL 0 BMI 2 ANDIY 2 NULL O NULL O NULL 0 DATA ANDZX 2 ROLZX 2 NULL O SEC 1 ANDY 3 NULL 0 NULL O ANDX 3 DATA ROLX 3 NULL O RTI 1 EORIX 2 NULL O NULL O NULL O EORZ 2 LSRZ 2 DATA NULL O PHA 1 EORIM 2 LSRA 1 NULL O JMP 3 EOR 3 LSR 3 NULL O DATA BVC 2 EORIY 2 NULL O NULL O NULL O EORZX 2 LSRZX 2 NULL 0 DATA CLC 1 EORY 3 NULL O NULL O NULL O EORX 3 LSRX 3 NULL O RTS 1 DATA ADCIX 2 NULL O NULL O NULL O ADCZ 2 RORZ 2 NULL O PLA 1 ADCIM 2 DATA RORA 1 NULL 0 JMI 3 ADC 3 ROR 3 NULL 0 BVS 2 ADCIY 2 NULL 0 DATA NULL O NULL O ADCZX 2 RORZX 2 NULL O SEI 1 ADCY 3 NULL O NULL O DATA NULL O ADCX 3 RORX 3 NULL O NULL O STAIX 2 NULL O NULL O STYZ 2 DATA STAZ 2 STXZ 2 NULL 0 DEY 1 NULL 0 TXA 1 NULL 0 STY 3 STA 3 DATA STX 3 NULL 0 BCC 2 STAIY 2 NULL 0 NULL 0 STYZX 2 STAZX 2 STXZY 2 DATA NULL O TYA 1 STAY 3 TXS 1 NULL 0 NULL 0 STAX 3 NULL 0 NULL O DATA LDYIM 2 LDAIX 2 LDXIM 2 NULL 0 LDYZ 2 LDAZ 2 LDXZ 2 NULL 0 DATA TAY 1 LDAIM 2 TAX 1 NULL 0 LDY 3 LDA 3 LDX 3 NULL O BCS 2 DATA LDAIY 2 NULL O NULL O LDYZX 2 LDAZX 2 LDXZY 2 NULL O CLV 1 DATA LDAY 3 TSX 1 NULL O LDYX 3 LDAX 3 LDXY 3 NULL O CPYIM 2 CMPIX 2 DATA NULL O NULL O CPYZ 2 CMPZ 2 DECZ 2 NULL O INY 1 CMPIM 2 DEX 1 DATA NULL 0O CPY 3 CMP 3 DEC 3 NULL O BNE 2
59. R FOR SECOND HALF OF 0215 AD 07 17 AGN LDA CLKRDI CYCLE IS TIMER READY 0218 10 FB BPL AGN NO CHECK AGAIN OTHERWISE JUMP 021A 4C 00 02 JMP START TO START OVER 6 31 5939 Noice that I used device selects he so nes C 2002 uva Qv 9089 899 parsa POTSP uuy pue pajqwuasse Ajayajdurod 122106 21915 unos 1092 21036 Iguolss joid 241 que 1 39 WIM PML uolgiodioO parun fjddns pue ped yum LHD 21 jpuopido 5 pue 8 sayng 00 C 6 6 uo V138 WIN au jo 22ud 21874 u SNIGIVOTH3AO OL 525509 VIVI lt 6 0344410 AT3LTIdNOO 1004 puy 0 jo 033u02 angy ue os 2423 pue pedAay 4 1342 1 8 HIAALVHM 10 umo 508 887 3331 ejdsip 1 5 10 Bojeuy 0 1931810 Ayjyeuosiad
60. RA MOVE This Command will move a block of up to 256 bytes to another memory area It is non destructive unless of course a shift is performed Input Sequence Press Keys See on Display 4 Data Characters F AD 4 char FO F for From Data Characters D 4 char DO D for Destination 2 Data Characters E AD XX 2 char EO E for Execute The 4 Data Characters above represent the loca tions one less than the locations respective ly from which and to which the data is to moved The 2 Data Characters above represent the hex value of the number bytes to be moved If the user desires to move 256 dec bytes he must input 00 in the E Command and D execution may be input in either order then D or D then F MOVE will correctly move blocks of bytes from one area of memory to another However it will correctly shift bytes only in an upward direction Attempting downward shifts will re sult in the repeating of as many of the last bytes in the original block as there is a dif ference in the block positions For example shifting a block of say n bytes starting at 0200 to a new area starting at 0202 will cor rectly shift the n bytes upward 2 locations Attempting to shift a block of n bytes start ing in 0202 to a new area starting in 0200 will result in the last 2 bytes of the original block to be repeated downward from their orig inal locations continuing to 0200 This
61. SAND LOWER BBEL JSR MY51 MK11 INY 1 LDA 5816 11 5 02 51 183C 00638326833 Be38E3 8396230207 2833180800 8896889688968896 0 0 0 51 5 03 00 FC Ss MK10 0C6 F CR MKO1 99 BLANK MK ie MERR BUFF Y 01 080 BLANK 11 8D Mk 01 0D3 S MK10 MODE 06 ALWAYS 15 PART amp CLEAN UP 10 JSR H HS HS HS J SM04 LDA STA LDA STA RTS RESTURE PTLP JSR 5 PLP1 JSR HS PLPe 116 HS SW16 2132 185201 PTLP BRSO 83725772977 2177 2733 OCRF 52 5 04 6666 00 BPR6 BBSL BPR6 01 BBSL 01 LOOP SW16 6133613800 GET POINT 5016 4155 804 210605 EF PLP O PLPe 00 BSCe 00 6 48 MGRA A PARTIAL LIST OF PET SCRATCH PAD MEMORY Gary A Creighton 625 Orange Street 43 New Haven 06510 function and a symbol defined DEF FN IND LOC s PEEK LOC41 2554PEEK LOC Which specifies an indirect address in the form LOC 1 Page LOC Item M LOC specifies contents of a memory location 0 JMP instruction IND 1 USRA jump location M 3 Present 1 0 Device Number suppress printout 5 POS function store FN IND 8 Arguments of commands with range 0 to 65535 PEEK POKE WAIT S
62. T 229 CONSTANT 23 239 TIGRO ESSESS BESS 88 gt gt gt SEES 1835 REM MAIN LOOP FOR FASS 1 TO 2 20505 INIT 130508 COPY DIVIDE EXF 00508 IF SIGN THEN GOSUE ADO IF STGN lt 8 THEN GOSUEB SUB EXPSEXP 2 ST GN S IGN POINT POWER DIVIDE CONS TANT lt PASS GOSUE DIV IF PASS THEM GOSUE DIV IF THEN 289 NEXT PRSS REM PRINT THE RESULT PRINT PRINT PRINT THE VRLUE OF PI TO CTEH21004 1 05125 DEC1MRL PLAC ES PRINT PRINT CRESUL T 5 F TO RESUL T IF THEN 578 IF PEEK CPLACED lt S 43 THEN PRINT PRINT PEEK NEXT FLACE PRINT END DIVISION SUERDUTINME PIGIT 8 2 FOR TO POINT SIZE MIGIT PIGIT PEEK PLACE 3 VIDE RESICUE DIGIT MOD DIVIDE CERUSZERD CR CQUOTIENT RES IQUE QUOTIENT CG SIGUE MEXT PLACE RETURM REM AUDIT YON SUBROUTINE PARRY FOR PLACE S72E B STEF 1 SUM PEEK CRESULT PLACE PEEK CTERM PLACE 24 CRRR S CARRY IF SUM lt TEN THEN 2088 SUM SUH TEN CRRRS 1 POKE RESULT PLACE SUM PLACE RETURN REM SUBTRACTION SUBROUTINE LORN E FOR PLRCE S1ZE 8 STEP 1 6 16 3838 DIFFERENCE PEEK RESULT4PLRCE PEEK CTERM PLACE LOAN LOAN 8 IF DIFFERENCED 6 THEN 3089 3069 3808 FOKE RESULT PLACE DIFFERENCE 3998 NEXT PLACE
63. T Examples 1 Load DEBUG Load B5 into 17FE and 17 into 17FF 2 Start execution at location 178E 3 Depressing any of the 16 keyboard characters will cause the 5 leftmost display digits to shift left and the new character to be inserted into the fifth position 4 Assume that there is a program 0200 0250 Now to execute from 0200 0240 0240 B AD Display 0240 1 0200 C AD 0200 CO 0240 When the user program executes to location 0240 it will return to DEBUG which then will replace the original byte at 0240 and will return to Keyboard Mode 5 User wishes to add 3 byte instruction in 0241 0243 Thus he must shift his program from 0241 0250 to 0248 0253 0240 B AD Display is 0240 0240F AD 0240 FO Remember that MOVE requires addresses 1 less than the actual values XX 10 E AD Display is 10 EO 10 0250 0241 1 6 28 This shifts bytes in 0241 0250 to 0244 0253 User can now insert his 3 new instructions into locations 0241 0242 and 0213 6 User wishes to load NOP into locations 0300 O3FF Load EA into O3FF using KIM Return to DEBUG 0300 F AD Display is 0300 FO 02 FF D AD O2FF DO 0 0 E AD XXOO EO Move 256 decimal bytes T User wishes to calculate the value required for a HERE BCC START where HERE 0204 and START 0250 First load overlay 12 bytes and return to DEBUG 045 0 E AD Display is 0450 HA Thus the branch value is 4A and the branch in
64. Y unit In using the program to print the results of computer runs it should be noted that the results should be for matted to begin on the third line of the dis play An improved version of this program could be designed to look ahead when an R was discov ered to extablish if an RE or REA string was present As only 3 bytes were not used in Tape Buffer 2 in writing this program that feature could not be included Additional space could be freed if the program was redesigned to use the parallel to serial conversion facility available with the 6522 VIA output port Using this facility the 90 bytes required to do the conversion from parallel to serial and timing out this information could be greatly reduced Listing 1 A listing of the PET Listing Program as printed on the author s TTY unit The program was hand assembled in 6502 language then converted to decimal format and entered as a series of BASIC POKE instructions When executed the program will reside in Tape Buffer 2 in machine code format MEGRO l R 3 R 4 R S kK 6 R 7 h 5 9 R 58 69 9c TI 110 150 160 179 low 189 196 210 220 230 ec Ato 260 270 280 290 360 310 320 330 346 345 349 350 37H 380 390 400 410 436 446 456 460 470 480 490 500 516 520 536 EM xx x TELETYPE LISTING ROUT I CHARLES HUSBANDS THIS PROGRAM LISTS THE DATA APP
65. YS GOTO GOSUB Line Number RAM check M 10 89 Input Buffer M 90 98 Flags for MISMATCH Distinguishing between similar subroutines etc mM 91 Ignore Code Value and do direct between quotes ete 98 0 INPUT 64 GET GET 152 READ Flag FN IND 113 Transfer Number pointer IND 115 Number pointer IND 122 Begin Basic Code pointer IND 124 Begin Variables pointer IND 126 Variable List pointer IND 128 End Variables pointer IND 130 Lowest String Variables pointer IND 132 Highest String Variables pointer IND C134 First Free After Strings pointer IND 136 Present Line Number if 137 255 no line number IND 138 Line Number at BREAK IND 140 Continue Hun pointer if M 141 0 can t continue IND 142 Line Number of Present DATA line FN IND 144 Next DATA pointer for READ FN IND 146 Next Data Input After Last Comma pointer M 146 Coded 1st Character of Last Variable M 149 Coded 2nd Character of Last Variable 0 150 Variable pointer all variables FN IND 152 Variable pointer M 156 Comparison Symbol Accumulator lt gt FN IND 157 Pointer to FN pointer MC 157 161 Number Store Work area SQR 183 165 JMP FN IND 164 FN IND 164 Function Jump address M 166 170 Number Store Work area Transcendentals not EXP amp SOR MC 171 175 Number Store Work area Transcendentals amp SQR M 176 181 Main Number Store Work area 181 Number Sign M 184 789
66. al value of the programs depends on their value to you Write CURSOR Box 550 Goleta CA 93017 for info or call 805 967 0905 Mark Zimmerman 619 Woodland Drive Sierra Madre CA 91024 write about the LIFE game edges If one copies the top and bottom edges of the screen amp left amp right edges to opposite sides then simply applying the LIFE algorithm to the central omitting extreme edges arena gives correct wrap around toroidal edge structure Example 9 gt C4 UJ cro 6 4 MICRO STUFF AND MICROBES Kim Klippings The San Fernando Valley KIM 1 Users Club is off and running according to a report from Jim Zuber Meetings will be held the second Wed of each month at 7 30 pm Until another place can be found meetings will be held in Jim s apartment 20224 Cohassett 16 Canoga Park CA 91306 Phone for inof 213 341 1610 Michael Chibnik of 10445 Canoga Ave Chatsworth CA 91311 had a few comments about Microsoft BASIC for the KIM I didn t get enough inform ation on the peripherals that were used A note about Microsoft BASIC is that most of the people who had bought it in the above club did not like the fact that the code for the interpreter is self modifying in many places and that it is not PROMable Editor Someone reported that they had asked Johnson Computer about the PROM ability of the Microsoft BASIC and was told that it is PROMable Does anyone have any hard info on this
67. ane THE 6502 JOU SAMPLE MACHINE LANGUAGE PROGRAM AS IMPUTTED FROM THE KEYBOARD ORG 825 LDAIM 102 LDXIM 0 STAX 32760 LIGHT BLUE INX BEQ 3 i eit IMP 830 001 STAX 33028 THE BEG 3 JMP 641 BRE END T 7 7 7 7 1 7 T 7 1 T 1 0010 6 a A Simple 6502 DARK BLUE gt 0190 Assembler the PET DARK GREEN by Michael J McCann Complete Listings Brown and White and Colored All Over by Richard F Suitor Understanding your Apple s Color SAMPLE MACHINE LARGUAGE PROGRAM LISTING 826 033A A9 55 102 828 0330 00 0 830 033 40 00 80 STAX 32768 833 034 28 INX Oo 0342 03 73 836 0344 AC 03 JMP 830 x YELLOW 2 x 839 0347 1000 0001 840 0388 EA i 841 0349 gn 00 81 STAX 43028 Y GREEN Nel 884 0380 EB TRAL 985 FO BEG 2 3 FOREST 0100 0010 D 887 40 1903 UMP B1 M a GREEN 850 0352 00 BAR i bo d COMPUTER SHOP 288 NORFOLK ST CAMBRIDGE 55 02139 comer of Hampshire amp Norfolk St 617 661 2670 NOW WE HAVE 051 VISA MC NO SIGNATURE AUDRESSS SS SI codes CITY C3 S1 with Dual m Floppy Complete with 32K RAM Memory Dual Drive 3 590 Floppy Serial Port cabinets and power supplies This Challenger Ili features an eight slot he
68. atterns etc using a standard RS 232 printer The CmC model 120248 comes essembled and tested without power supplies case or RS 232 connector for 598 50 The CmC ADA 1200 comes complete for 169 00 Specify baud rate when ordering 300 baud is supplied unless otherwise requested Instructions for changing the baud rate are included NORD PROCESSOR FOR THE COMMODORE PET CONNECTICUT microCOMPUTER now has a word processor program for the COMMODORE PET This program permits composing and printing letters flyers advertisements manuscripts articles etc using the COMMODORE PET and kS 232 printer Script directives include line length left margin centering and skip Edit commands allow the user to insert lines delete lines move lines change strings Save onto cassette load from cassette move up move down print and type The CmC Word Processor Proqram addresses en RS 232 printer through a CmC printer adapter 7 The CmC Word Processor Program is available for 29 50 Poe le Bet 5 232 CURRENT LOOP TTL ADAPTER B CUM 7 7 GEN w 7 eee i The CmC ATApter model 408 has two circuits The first converts 5 232 signal to 28 ma current loop Signal and the second converts 20 ma current loop signal to an 5 232 signal With this device a computer s teletype port be used to drive an RS 232 te
69. awvy duty main frame You add only a serial ASCII Terminal 2 525 32K RAM Serial Challenger Il with Dual Drive F Comes complete with 32K RAM Memory Qual 090 Drive Floppy Disk 500 000 characters storage 53 00 6502 processor and serial port You add only serial ASCII Terminal to be up and running C2 S1S Serial Challenger Il with Single Drive Floppy Comes complete with 18K RAM Memory Single 1 990 00 Drive Floppy Disk 250 000 characters storage 6502 processor and serial port You need to add only Serial ASCH Terminal C2 S1V Video Challenger Il with Single Drive Floppy Comes complete with 18K RAM Memory Single 2 490 00 Drive Floppy Disk 6502 processor Challenger type Video Interface and high quality key board You add only a Video Monitor RF generator and tv set C2 8P Offers all features of the Challenger plus more room for expansion The keyboard has a separate Challenger case with connector cable The roomy cabinet with 8 Slot Cabinet and heavy duty power supply are designed to 8 2500 handle up to eight system boards allowing for 6 slots of axpansion KIMS AND UPGRADES C2 4P VF8 Memory assembled amp tested 129 00 Challen for low power i MNT tas 10 00 i nger n kit J 4 50 598 00 full set of sockets for 10 00 VFB Motherboard buffered for 4 Baards 65 00 Connector As
70. ce se lect line to the clear input pulse to the preset input will cause the Q output to go high lighting the Q LED whereas a pulse to the clear input will cause the Q output to go high light ing the Q LED To test your decoding circuit write a one state ment program for example 0200 AD 00 80 LDA DSO If the line labeled 8000 is connected to the preset of the test circuit the Q output will go high lighting the LED when the program is run Running the program 0200 AD Ol 80 LDA DS4 will cause a switch of the flip flop if the line 8004 is connected to the clear input You should test all 8 device select lines from the LS138 with these programs by changing the con nections and the addresses Note that no data is being transferred since we have made no con nections to the data bus It should also be ap parent that this scheme could be used to switch a motor light cassette recorder or other de vice off and on in a computer program Eureka We have made a simple I O circuit To continue a little further repeat the above experiments with a STA instruction replacing the LDA instruction The results should be identi cal because in both cases it is the address of 6 30 the device select on the address bus which produces the pulse which flips the flop One more experiment connect the R W line from the 6502 to the G1 input on the LS138 after remov ing the connection from G1 pin 6 to pin 16 Now try the programs above us
71. ction balances Black 0 has no bits set no pie and no brightness White 15 has four bits set the whole pie is of maximum brightness and balances in the center of the circle at neutral Orange 6 33 MIGR 9 or 1001 in binary has pie over the top hemi sphere and balances on a point between neutral and orange The 5 binary 0101 has two sepa rate wedges one over red and one over green Since it is symmetric it balances at the cen ter It represents a neutral gray of intermedi ate brightness So does the 10 The 14 has pie over every sector except the red one It is bright and balances on a line toward forest green It gives a light somewhat bluish green YELLOW 1000 NEU TRAL 0001 GREEN FOREST 0100 DEEP GREEN BLUE MID BLUE Figure 1 Color circle shows relations of color to color number bit position A diagram representing the relations of all the colors is given in Figure 2 Each of the one two and three bit numbers form planes each cor responding to a color circle One can think of these positions as points in space with bright ness increasing with vertical position and hori zontal planes representing color circles of differing brightness The colors of the Apple are thus coded by the bit patterns of the numbers representing them You ean think of them as additive combinations of red dark blue dark green and brown where adding two colors is represented by ORing the t
72. ctively There is no doubt that address space is being wasted but few users use all 64K or even 32K so the waste may be justified In Figure 1 address lines 0 2 are extended downward to indicate that they could be decoded by other devices such as an LS138 or LS154 The addresses which enable the device select pulses 50 7 are given in Figure 1 Note that since not all sixteen lines have been decoded to produce the pulses the addresses shown are not the only ones which will work For example de vice select pulse 0 will be produced whenever the computer reads or writes to 8 0 or 9 0 XX means any hex numbers This should cause no difficulty unless we try to put other devices into the 8K4 block in which case we could sim ply decode some other lines If your system does not buffer the address lines you should buffer them with the circuit shown in Figure 2 MICRO 945v D A130 SA IOK 2 4 6 142 5 w A150 c 4 5 4 ap 741 5138 y e D G2B p 3 Figure 1 vv V 7 Decoding Circuit to Select I O Ports See text for details Construct the circuits of Figures 1 2 and 3 I managed to get them on one A P circuit board with no difficulty with room for several more chips I also found that the A P breadboard jumper wire kit is very handy for making neat layouts Connect one of the device select lines from the LS138 to the flip flop preset input Test Circuit Figure 3 and another devi
73. d on does not alter the existing PET display in any way CD4oll 5v Y V H SYM 5v i4 le j CO 4066 5v 680 100 POWER FROM THE PET Karl Quosig 2038 Hartnell Street Union City CA 94587 It is by now well known that the PET has no source of power for use outside of itself The only source available is at the second Cassette Interface This 5 VDC line will not source very much current in fact it will not even run a second cassette recorder Also all the 5 VDC regulators inside the PET are already run ning quite warm If you want to experiment with the PET say with the Parallel User Port Mos Technology 6522 VIA then where do you get the power without a complicated power supply inter face The answer is simple I found the fol lowing inside the PET One the bridge recti fier is good for 3 Amperes Two the PET draws 1 5 Amperes worst case load Conclusion it should be possible to get 1 Ampere out of the PET without straining a thing To do this all we need to do is run a line from the positive side of the PET s filter capac itor and make it available at the rear of the PET I put a test lead jack between the Parallel and IEEE Ports This is 8 VDC Unregulated and by attaching a 3 point Regulator see diagram below Say at our project board we have plenty of power for all sorts of home projects As an example I brought all of the Parallel Us
74. differences be tween labels in the routine Some convenient load and entry points are BASO 1oad MKUP entry hex hex decimal 800 880 2176 A90 B10 2832 104C 10CC 4300 2050 20D0 8400 3054 30D4 12500 While we encourage the use and distribution of this subroutine we do request that proper credit be given Please place the following notice on any copies that you make This PACK amp LOAD Subroutine was written by Richard F Suitor and published in MICRO 6 6 45 MICRON 0010 SINT BASIC SUBR PACK amp LOAD 0020 CALL 0 128 DEC 0050 ACCL DL 0000 0040 BOL DL 0002 050 TABL DL 0004 1060 TREL DL 0006 DOFO HIME DL 0008 SYMBOL TABLE 0080 LMRT DL ACCL 0000 0090 BPRG DL 000C BSOL 0002 0100 FRML DL TABL 0004 0110 NEYT DL 0010 TBCL 0006 0120 2 DL 0012 HIMS 0008 0130 PTLL DL 0014 000A 0140 STAB DL 0016 nooc 0150 DL 0018 DODE 0160 MODE 0031 NBYT 0010 0170 YSRV DL 1034 0012 0120 PRMF DL 0033 PTLL 0014 0190 LMML TAR 0016 IL 0046 0018 DL acc MODE 0031 DL 2524 0230 JzRL DL 0033 0240 DL BAZIC LMML 004A 1251 BUFF DL 1200 HIML 04 0260 GTM DL FEL2 DL F94 BBSL DOCA 5 COUT DL FDED J gt RL GOCE 029 BELL DL FF3R BL e 003 0300 GTLM DL FD67 BUF
75. directly relate to the 6502 family MICRO reserves the right to reject any item submitted for inclusion in this catalog A DEBUGGING AID FOR THE KIM 1 Albert Gaspar 305 Wall Street Hebron CT 06248 DEBUG is a program designed to assist the user in debugging and manipulating programs It re sides in memory locations 1780 17E6 and pro vides a means for inserting breakpoints in a user program moving blocks of bytes throughout memory filling memory with repetitious data and calculating branch values uses selected KIM monitor subroutines Operating Modes DEBUG has three operating modes 1 Keyboard Mode DEBUG remains in a wait loop anticipating keyboard entry which will be recog nized as either data or command characters This mode is initiated either by using the KIM monitor to start at location 178E or by the execution of a previously inserted breakpoint in a user program 2 Execute Mode DEBUG executes logic to ser vice a user command This mode is completed in microseconds and will not be noticeable by the user 3 Non Control Mode DEBUG relinquishes con trol when the user keys in RS or ST during Keyboard Mode or uses the CONTINUE Command To start the user must first load B5 into 17FE and 17 into 17FF using the KIM Then the user begins DEBUG by starting at location 178E This puts DEBUG into Keyboard Mode The user then keys in combinations of the 16 data char acters available on t
76. display and a 20 character thermal printer 4K ROM monitor 1K RAM expandable on board to 4K compatible Application and Expansion connectors are fully KIM 1 TTY and Audio Cassette DEBUG MONITOR ROM or EPROM on board up to 16K 8K BASIC will be available in ROM Carpenter Chuck Apple II Accessories and Software Items reviewed include a renumber and append program a serial interface board a MODEM Applesoft II and the APPLE II BASIC Programming Manual McCann Michael J A BASIC 6502 Disassembler for Apple and PET Accepts machine language object code and produces a symbolic representation that resembles an assembly listing Applesoft BASIC as well Originally written in Commodore BASIC it will work with PROGRAMMING A MICRO CONPUTER 6502 by Caxton C Foster Reviewed by James R Witt Jr For those of you in the computing world who have recently purchased or constructed a microcompu ter based on the 6502 microprocessor the KIM 1 fits this description and can t put it to rea sonably practical use then perhaps your head aches are over Programming a Micro Computer 6502 by Caxton C Foster may be exactly what you need to halt your frustrations Foster pre sents the reader with a combination of reference manual for programming and an introduction to 6502 systems specifically using the KIM 1 as a model The motivation behind Foster s work is practi cality Right from the beginning of the
77. e Space Maze 10 00 PRICE Apple Power Interface Board and One Power Control PROGRAMMABLE PAINTER INTERFACE 80 00 Module 95 00 Onboard EPROM Printer Driver Additionol Power Control Modules Controls Four AC Full Hondshoke Logic Seuta 054 High Speed Output Port Capability Memory for Apple Il Byte Drive in Ma e Set of 8 16K RAM CHIPS 200 00 Printer Driver Programs Avoiloble for Centronic SWIPC 40 ond Other Printers Setof8 AK RAM CHIPS 5 20 00 We are Orange County s only Authorized Commodore Pet Dealer e Commodore PET 8K 795 e PET Printer delivery Sept 595 e Synertek s VIM 269 Commodore KIM I 245 Microproducts New Super Kim 395 Demonstration at Kim Workshop Sept 9 ge ee ee D ee S ee ee ee ee ee ee ee ee ee ee Send for a complete list of software and new product information Mastercharge Visa of A accepted No C O D Allow two weeks for personal check to clear Add 1 50 for handling and postage For computer system please add 10 00 for shipping handling and insurance California residents add 6 sales tax eens APPLE PI Robert J Bishop 1145 W Badillo Apt E Covina CA 91722 Everyone knows that the value of Pi is about 3 1416 In fact its value was known this accu rately as far back as 150 A D But it wasn t until the sixteenth century that Francisco Vieta succeeded in calc
78. e i pe 4 i fron i We are going to construct either two or three digit numbers from this list and now come the only rules required to deal with in the whole procedure 1 While always trying to make a three digit number the last digit of a three digit group can ONLY be a 1 2 or 3 remember that the C digit is only 2 binary digits which can repre sent the OCTal number three at most 2 As usual these numbers appear Least Signif icant Digit first and therefore the last digit is in reality the first digit of the new OCTal number So we can now divide the long string of numbers into two and three digit reverse order OCTal numbers with slashes OCTal 2 2 7 7 0 4 4 4 1 5 5 5 2 6 6 6 3 1 unwrap this list reversing digits as we go unwrap this list reversing digits as we go and converting to HEX OCT HEX 22 12 77 3F uo 20 144 64 Even this can be a bit tedious and since I find the arrow Code conversion very easy to remember No Plot Up Clockwise to Left 0 to 3 Plot Up Clockwise to Left 4 to 7 I draw my dia grams on graph paper using these OCTal numbers only Thus becomes e t 15552 4 6 t 4 2 6 4 2 6 t eree 07773 Some caveats It s still a good idea to draft an original diagram with plain dots just to get the shape and scale to your liking This also becomes a handy guide for the debugging you re almost certain to have to do And too it makes great fun for
79. e operand value in the next location in memory END End of program source code SAVE OBJECT CODE ON TAPE Object code saved under file name supplied by user Origin address saved with program LOAD OBJECT CODE FROM TAPE Loads object program under file name supplied by user Object code is stored in memory with the same origin address used when the program was assembled RUN MACHINE LANGUAGE PROGRAM WITH SYS Transfers control of the 6502 to an address Supplied by the user RUN MACHINE LANGUAGE PROGRAM WITH USR Transfers a user supplied value to the 6502 accumulator Transfers control of the 6502 to an address supplied by the user LIST MACHINE LANGUAGE PROGRAM Listing is produced by disassembling object code Disassembly is in the following format decimal address hexadecimal address byte 1 byte 2 byte 3 mnemonic operand The following areas of memory are available for your machine language programs when this assem bler is in memory locations 7884 8184 and if tape 2 is not used locations 826 1024 6 17 4418339 There are two ways of returning control to BASIC from machine language The RTS Return from Subroutine instruction may be used at any time except when in a user machine language subrou tine RTS returns control to the calling BASIC program In contrast the BRK Force Break in struction does not return control to the calling BASIC program instead control is returned to the user i
80. e process of debugging Listed in 6502 assembly code Offen Dave Kaleidoscope A continuously running graphics program for the PET Hofheintz M C Tiny GRAPHICS A short graphics program for the PET Gordon H T Editha DDJ 3 Issue 5 No 25 pg 34 May 1978 A revision of the Fylstra KIM 1 Editor program SWEETS published in BYTE Tullock Michael PET Files Personal Computing 2 No 5 pg 20 May 1978 Things your user s manual never told you about PET How to use files 6 37 GRO 348 349 350 351 352 353 354 355 356 357 358 359 O Reilly Francis J Instruction Search Byte 3 No 5 pg 153 May 1978 Discussion of 6502 op code 27 and the search for other as yet undefined instructions Carpenter Charles R Tiny BASIC Shortcuts Kilobaud Issue 18 pg 42 June 1978 Suggests methods to expand the capabilities of Tom Pittman s Tiny BASIC for the 6502 More Music for the 6502 Byte 3 No 6 pg 140 June 1978 A music composition and generation program O Haver T C Audio Processing with a Microcomputer Byte 3 No 6 pg 166 June 1978 Adding a virtual tape loop Uses a 6502 processor Eaton John Low Cost Keyboard II 73 Magazine No 213 pg 100 June 1978 Part II of an article on the low cost keyboard Software is designed around the 6502 Swindle David A Sensible Expansion Atwood Memory for your KIM Kilobaud Is
81. each for the Dump and Load programs which may be run as sub routines Though written for KIM 1 changes are suggested for use on TIM systems and only minor modifications should be required to run on any system which has a 6530 or 6522 I 0 chip ne port of the PIA is used for data one for control of the interface and a third acts as a buffer to simplify software instructions Hardware Software package is 22 50 1 00 S amp H Add 3 00 for KIM cassette containing software NJ residents add 5 tax SASE for free info LEWIS EDWARDS Jr TV 1451 Hamilton Avenue Trenton NJ 08629 Only APPLE II STARWARS Andrew H Eliason 28 Charles Lane Falmouth MA 02540 6 13 MBRO It will function at the higher The above material is based on the Phaser sound effect from Apple II Startrek Load via monitor starting at 3FA1 3FA 3FB6 E 3FAl OE 2 00 18 E9 3FA8 01 DO FC 8D 30 CO EO F2 88 DO ED 60 Enter BASIC and set HIMEM 16288 Enter this program and RUN LIST gt LIST 4 10 PRINT STAR BATTLE SOUND EFFECTS 20 I PND 15 41 REM SHOTS t 30 RND 1124104120 REM DURATION 2240 POKE 16290 1 POKE 16304 J 50 CALL 16289 60 N RND 1000 FOR K 1 NEXT 70 GOTO 20 999 END Try I RND 30 1 and J RND 255 2408 3309 Back Issue of MICRO are Available Single copies of issues 1 6 are 1
82. er Port pinouts down 24 ribbon cable along with the 8 VDC line to a chassis which has the 5 VDC regulator and other circuitry and terminated this on a homebrew mother board comprised of 6 42 22 pin edgecard connectors can now experi ment with things such as noise makers joy sticks etc and have plenty of power for then I believe this should be of great benefit for those of you who like to mess around with the hardware Warning 1 If you are going to drill a hole in the PET as I did disconnect all connectors very very gently to the PET s Main Board and remove it before going to work Clean inside thoroughly before re installation Warning 2 your projects do not connect inductive loads directly to any output of the PET Inductive loads must be fully buffered 21 000 pF 15v IN PET TIGRA commodore Radio Shack PET TRS 80 EITHER WAY We ve got software for you You can find out what our customers already know Personal Software consistently offers great software products Check out the programs below they each represent many man months of expert programming effort We re sure you ll be pleased with the results 6502 ASSEMBLER IN BASIC by Dan Fyistra for 8K PETs Accepts all standard 6502 instruction mnemonics pseudo ops and addressing modes Evaluates binary octal hex decimal and character constants symbols and expressions Assembles object programs anywhere in memory Includes one and
83. es however when An Additional Experiment The address decoding circuit of Figure 1 pro duces a one microsecond negative going one shot pulse when a LDA instruction addresses one of the locations shown in Figure 1 This one shot and the duty cycle can be changed Thus we have produced a simple function generator with programmable period and duty cycle The LEDs will show the results at low frequencies be used for a variety of purposes one of this program and watch the LEDs Amplify the Q which is triggering the flip flop shown in Fig ure 3 The program listed below makes use of an interval timer KIM 1 system addresses to pro duce a square wave output and connect it to a speaker notice the effect of changing the time the duty cycle the wave shape by filtering or whatever else you into the timer By varying the time loaded the frequency can be changed think of 8007 and 8001 DSEVEN 8007 DEVICE SEL i DSONE 8001 DEVICE SF 1 i TIMER 1707 CLKRDI 1707 KIM CL 4 DONE TEST 0200 AD 07 80 START LDA DSEVEN INIT DS7 DEVICE SELECT PULSE 0203 A9 FF LDAIM FF INIT TIMER 0205 8D 07 17 STA START DIVIDE BY 1024 TIMER FOR 256 0208 AD 07 17 BACK LDA CLKRDI CYCLES NOW CHECK TO SEE IF IT 020B 10 FB BPL BACK 15 FINISHED IF NOT CHECK AGAIN 0200 AD 01 80 LDA DSONE OTHERWISE TRIGGER 051 0210 AQ FF LDAIM FF 0212 8D 07 17 SA TIMER START TIME
84. ese new units MEMORY PLUS is ready POWER PLUS POWER PLUS is an assembled and tested power supply that will power a KIM 1 or VIM 1 and a MEMORY PLUS board with power to spare Speciiacations Input Voltage 110 to 125 volts 60 Hz AC Output Voltages 5 volts regulated 1 4 amps maximum 12 volts regulated 6 1 0 amps maximum 8 volts unregulated 4 3 amps maximum 16 volts unregulated 6 1 0 amps maximum Packaging Totally enclosed in a bakelite type box with aluminum bottom plate Space between the case and bottom plate provides air circula tion for cooler operation Size and Weight 6 7 8 x 5 1 4 x 3 3 lbs 21102 Static RAM Low Power 450 nsec 1 25 2114 Static RAM Rey Power 450 nsec 7 50 2114L Static RAM Low Power 450 nsec 8 50 1 Enclosure 250 00 1 Extra RAM 2K RAM total 270 00 MEMORY PLUS with 8K Low Power RAM 245 00 POWER PLUS for KIM 1 or VIM 1 40 00 ENCLOSURE PLUS for KIM 1 MEMORY PLUS 30 00 PLEASE Games and Demos for KIM 1 15 00 EDITOR for KIM 1 with TTY and cassettes 15 00 MAILING LIST KIM 1 TTY and cassettes 15 00 INFORMATION RETRIEVAL KIM 1 TTY etc 15 00 MICROCHESS Chess on minimal KIM 15 00 MICRO ADE Assembler Disassembler Editor 25 00 MICRO ADE Complete Source Listings 25 00 RELAY KIT Control two cassettes 10 00 All items Stock to two week delivery NEW Items to be available soon VIDEO PLUS CRT Contro
85. g recently there is no longer any real need to apply the original technique but a good understanding of something never hurt anyone if only to verify other working arrangements If you have a TI Programmer or any convenient way of converting from one base to another here s a simplified method of untangling that unsightly jumble of arrows and binary digits on page 53 of the Big Red Book The key is in recognizing that the conversion chart is nothing more than an OCTal representation of our 8 bit A B C OCT 00 the Code list we will add the OCTal 001 01 1 number that each arrow represents 010 10 2 011 11 3 100 101 5 t 110 6 111 7 byte OCTal is binary broken into groups of three just as HEX is binary broken into groups of four The fog lifts a little and we can now see why the C digit is limited to two bits we only have total of eight to start with Look ing a little further along the same page we come to the Conversion Codes and it s here we can begin to make things really easy C B A C BA 00 010 010 00 111 111 dices 00 100 000 t 0 1 100 100 al 00 101 101 6 11 MIGRA To the Code list we will add the OCTal number each arrow represents Going back to the original example in the manual we can replace the entire chart of binary digits with an OCTal number put directly above our un wrapped arrows like so OCT 2277044541555 2 6 6 637 Shap
86. he keyboard Input data is displayed in a manner similar to that of the KIM from right to left except that only the left most five display positions are utilized exceptions are noted below The user must continue to key in characters un til he is satisified that the required data is input Then one of the several Command code characters available B C D E or F is keyed in At this point or at any time previous to this if the input is not correct and the user wishes to change the display he merely contin ues to enter data until the display string is correct When the display concatenation is sat isfactory either 2 or H data characters and 1 Command character he keys in AD Now DEBUG will go into Execute Mode without echoing the entry of AD and immediately examines the last previous character input If this char acter is not a legitimate Command character B C D E or F DEBUG becomes confused and will transfer to unpredictable memory locations Thus the user is held wholly responsible for the validity of his input He should always check that either his keyed in data is correct before hitting AD or that his Command was indeed ex ecuted Note if a key other than AD the 16 data characters RS or ST is depressed its high order 4 bits are stripped and the remaining low order 4 bits are displayed and evaluated as whatever the combination happens to represent Assuming that the character input immediately
87. ill be properly replaced This Command includes 1 of 2 instances where the sixth display position is used If the sixth position contains a 1 the Command has been cor rectly processed If the position contains any other value it indicates that depression of the AD key has caused multiple bounces and the byte stored by DEBUG within itself is 00 not the original user byte Thus DEBUG will still function correctly but will not correct ly restore the user position when a Breakpoint return is initiated The user must restore the location manually using KIM after the return has been performed otherwise 00 will be left in the location CONTINUE This Command causes DEBUG to pass execution to a user specified loca tion It is similar to the passing of control through KIM and either method may be used to ex ecute user code Input Sequence Press Keys See on Display 4 Data Characters ap 4 char CO The 4 Data Characters define the address to which control is to be passed The above dis play is only momentary since control is immedi ately passed to a user area Non Control Mode The purpose of the Continue Command will usually be to execute to a previously inserted Break When this occurs as previously stated control returns to Keyboard Mode of DEBUG At this point the leftmost display digits will contain the address at which the Breakpoint was located See Overall Notes 1 for a con tinuation warning MIG
88. inent information but keep the write up to a reasonable length MICRO reserves the right to reject or edit any material submitted for this column THE MICRO SOFTWARE CATALOG Name Read Write PET Memory System PET Memory 8K RAM Language BASIC Hardware Standard PET Description Permits user to key into memory hex codes by typing hex starting address and then typing the hex digits in sequence desired Display memory as both hex codes and assembly language mnemonics translates relative address into actual hex address Stores memory on tape and loads memory from tape into any desired mem ory location Executes machine language pro grams Copies Just released 32 sold first Price 7 95 postpaid Includes Cassette tape complete instructions including use of ROM subroutines to input output memory from keyboard and to screen Ordering Info From author Author Don Ketchum 313 Van Ness Avenue Upland CA 91786 Dealer Inquities Invited Name of program 6502 systems Memory locations required Language BASIC Assembler Hardware required Description of program Number of copies sold to date Price What is included in package cassette listings paper tape Ordering information Author s Company Name and Address send to MICRO P O Box 3 S Chelmsford MA 01824 THE MICRO HARDWARE CATALOG A Call for Information Starting with the next issue of MICRO we
89. ing first a LDA instruction then a STA instruction You should find that the program with the LDA instruction 5v A0 2 5 A2 A130 5 gt A 13 Al4c 4 gt A 14 15 A gt A 15 61 G2 Figure 2 Buffering the Address Lines The arrows pointing into the chip are the lines from the 6502 while those pointing away go to the circuit in Figure 1 21905406 we try to put data on the data bus these lines will become important What you do depends on the system you are using Since the KIM 1 is probably the most popular system among the read ers and since my own system is a KIM expanded with a Riverside KEM and MVM 1024 the following details will be of most interest to KIM owners Owners of other systems will have to dig into their manuals to make sure they are not de se lecting their on board devices or much worse selecting two devices to put information on the data bus simultaneously The KIM 1 has a 74145 decoder on board which decodes lines A10 12 lines A13 15 are not decoded Consequently the lowest 8 block is already decoded and the de vice select pulse from the LS145 in Figure 1 should enable the decoder on the KIM for all ad dresses in the 8KO block To do this simply connect the device select pulse from pin 1 on the 74LS145 in Figure 1 to pin K on the appli cation connector on the KIM making sure that the ground connection is first removed A 10K pull up resistor betwee
90. is perhaps a good time to consider just how large a 3 58 MHz period is The Apple text is generated with a 5x7 dot matrix a common method of character generation These same dots cor respond to individual bits in tre high resolu tion display memory One dot is one half of a 3 58 MHz period and corresponds to a violet 3 or green 12 color signal This is why the test is slightly colored on a color TV and the high resolution display has two colors other than black and white green and violet But you can make others due to effects similar to those seen in the BASIC program above The design of color TV has further implications for the display The video black and white sig nal is limited to about MHz and many sets drop the display frequency response so that the color signal will not be obtrusive A set so designed will not resolve the dots very well and will produce blurry text Some color sets have adjustments that make the set ignore the color signal Since the color signal processing in volves subtracting and adding portions of the signal avoiding this can sometimes improve the text resolution Also reducing the contrast especially and the brightness somewhat can help with text material The color TV design attempts to remove the color carrier from the picture after duly providing the proper color but you may be able to see the signal as 3 or 4 fine vertical lines per color block They should not be apparent at all in
91. ith 1 f random variations Brief ly each element is the sum of N terms three say One term is chosen randomly for each ele ment The next is chosen randomly for every ot her element The next is chosen randomly for every fourth element and so forth With the Apple one can experiment with these concepts aurally hence Applayer and visually with the graphic displays Color is a dimen sion that was not discussed much in the column This section presents an attempt to apply these concepts to the Apple display Most of us know what white noise is like on the Apple display An exercise that many try is to choose a random point a random color plot and repeat For example 10 20 30 40 50 60 Dispite the garish display that results this a white type of random display Except for all being within certain limits the color of one square has no relationship to that of its neighbors and the plotting of one square tells nothing about which square is to be plotted next GR X RND HO Y RND 40 COLOR RND 16 PLOT X Y GOTO 20 To implement the concept of 1 f I used the following 1 and are each the sum of three numbers one chosen randomly from each plot one every 20 plots and the third every 200 LIST 1 DIM Acid ACSR ACE 3 3 11 ACS SSIACLT Oe HBS ACLs 11 512 1 3 41 3 193 141 14 015 2 16
92. ller with 2K Display RAM UPPER lower case ASCII optional 128 character user programmable character set keyboard inter face light pen interface programmable display format up to 80 characters by 24 lines For the KIM 1 or VIM 1 or AIM 65 PROTO PLUS Prototyping board for the or 1 or AIM 65 Has fingers for both the ex pansion and application connectors MOTHER PLUS Compact Mother board which will work with the KIM l or VIM 1 or AIM 65 POWER PLUS 5 With 5V at 5A and 12 12 at 1 Ideal for KIM 1 or VIM 1 with additional memory POWER PLUS 24 With 45V at 5A 12 12 at 24V at Specifically for the AIM 65 system Call or write for details prices and delivery Shipping in USA up to 15 00 add 1 00 up to 50 00 add above 50 00 add 3 00 Foreign shipping add 20 up to 100 00 add 10 above 100 00 Mass Residents add 5 sales tax The COMPUTERIST Inc Box 3 S Chelmsford MA 01824 617 256 3649 SHAPING UP YOUR APPLE Michael Faraday 246 Bronxville Road Bronxville NY 10708 Even though as a programming novice it took me a while to take on Apple II s Hi Resolution Graphics I have to admit that the seeming com plexity of constructing a Shape Table held a certain fascination for me from the first time I opened the Reference Manual With Gary Dawkin s delightful program appearing in Creative Comput ing delightful program appearing in Creative Com putin
93. losed details of the Apple Monitor O Connor Clint Book Review Programming a Microcomputer 6502 Kilobaud Issue 20 pg 8 August 1978 very favorable review of Caxton C Foster s book Grossman Rick KIM Plus Chess Equals Microchess Kilobaud Issue 20 pg 75 August 1978 A challenging game of Chess can be played in KIM s 1K of memroy using MicroChess by Peter Jennings Palenik Les FINANC Home Small Business Financial Package Kilobaud Issue 20 pg 84 August 1978 Programs include Calculations on investments Depreciation Loans etc Braun Ludwig Commodore PET Creative Computing 4 No 4 pg 24 July August 1978 Creative Computing 4 No 4 July August 1978 Braun Ludwig Commodore Pet An equipment profile which stresses the value of the PET as a teaching machine North Steve Apple II Computer An equipment profile points out that the Apple is not a machine for the classroom or for the S 100 hardware buff but is one of the most versatile micros on the market Dawkins Gary D High Resolution Graphics for the Apple II Allows user to draw a shape in high resolution graphics mode from the keyboard Ahl David H Atari Video Computer System equipment profile of a 6505 based programmable game system 6 38 01090109 360 MICRO Issue 5 June July 1978 Covitz Frank H Life for your PET Rockwell International Rockwell s New R6500 1 LIFE written in machine language for
94. n a Breakpoint has been executed DEBUG does not store and then restore accumulator register and status values Thus the user must take care in continuing from a Breakpoint if any of these parameters have subsequent bearing in further user program execution Though this and other omissions are glaring de fects no apology is made there was just in sufficient memory available for inclusion of any refinements 2 When returning from instruction DEBUG pulls the status register information from the stack and ignores it If this DEBUG version is used in conjunction with an interrupt system locations 17FE 17FF must contain the address of the user interrupt handler The beginning of the handler must be similar to that shown on page 144 of the KIM Programming Manual The logic listed in example 9 7 must be utilized as shown BNE BRKP will point to the DEBUG loca tion defined below If the user handler deter mines that the interrupt was caused by BRK then the handler must jump to location 17B5 DEBUG will then obtain the BRK address and perform subsequent logic to return the user byte to its original configuration and continue on into Keyboard Mode 3 This version of DEBUG uses page zero loca tions 0000 0001 0002 0003 and 0004 but only as scratch areas during Keyboard and Execute Modes The user can use these areas as tempo rary Scratch areas when DEBUG is not being ex ecuted 4 Due to limited inst
95. n pin 1 and 5V will also be necessary The device select pulse from 8K7 should enable the device containing the restart and interrupt vectors In the case of the KIM pin 9 of the LS145 in Figure should enable the 6530 002 ROM by connecting it to pin J of the application connector No pull up is necessary Test Circuit Figure 3 Next issue we will examine the other pins on the 6502 which will be useful in configuring I 0 ports namely the bi directional data bus and the control signals Hopefully we snall finish the circuitry needed to make an output port 8 bits connect some LEDs to it see if it works or smokes and maybe think of a use for it works that is the lights can be switched from off to on and vice versa but the STA instruc tion does not work Why Keep your circuit as the material in the next column will refer to and make use of the circuit A couple of parting shots First there is a you have just completed very good educational series of articles in KILOBAUD magazine called KILOBAUD KLASSROOM It assumes less experience than I have assumed so far Second I hope you have obtained a TTL Databook from either Texas Instruments or National so that you can study the truth tables and other specifications of the chips we are using A Note About Figure 1 lines in Figure 1 suggest that something should be done with then For the experiments described above nothing need be connected to these lin
96. of two parts first is a brief discussion of the colors of the Apple and their relationships to each other and to the color numbers Some of that information is used in the second part to generate a random color display according to certain principles sugges ted by Martin Gardner in his mathematical games column in Scientific American The Color of Your Apple The color or your Apple comes from your color TV The video signal has many components Most of the signal carries the brightness information of the picture a black and white set uses this part of the signal to generate its picture Superimposed on this signal is the color car rier a 3 58 MHz signal that carries the color information The larger this signal the more colorful that region of the picture The hue blue green orange etc is determined by the phase of the color signal Reference timing signals at the beginning of each scan line syn chronize a standard color signal The time during a 3 58 MHz period that the picture color signal goes high compared to when the standard goes high determines the hue A color signal that goes high when the standard does gives ange that goes low at that time gives blue Signals that are high while the standard goes from high to low or from low to high give vA let and green This at least was the in ention Studio difficulties transmission paths and the viewers antenna and set affect these relations so the
97. oid metal shavings and such falling on the main board I removed the back cover from the monitor Power OFF and mounted a BNC jack two inches to the right of the brightness control OUTPUT WAVEFORM The circuit is very simple and can be put to gether with a wire wrap tool in a few minutea Video monitors seem very tolerant and the two units I have used work fine The only problems encountered was in attempting to do all white screen or very dense graphics which caused sync tear in one of the monitors Normal or dense listings worked well i MNT ats 5v rvIpEo Ovolts DOTS HORIZONTAL ear ICAL SYNC PULSES INTERVAL and fed it with a twisted pair I mounted the board under one of the bolts that hold the mon itor to the main chassis and attached the drive twisted pairs to the existing ones for the mon itor This circuit provides composite video output from the PET I have used the output to drive two different video monitors with good sucoess TIGHT TWISTED PAIRS COMPOSITE VIDEO VERTICAL COMPOSITE ORIVE All three monitors I tried worked with this vid eo output The appearance of the video will be a function of the quality of the monitor Some of the scrapped out commercial units available with the 10MHz and more bandwidths look excel lent with the PET video I have had a number of people comment that my 12 commercial monitor looks better than the built in unit The ad
98. or under consideration Thus if these se lects are used to activate the CS or not CS on a PIA the enable pin pin 25 and the CS go active almost simultaneously However the data sheets clearly require a 180 nsec setup time for the CS before the enable becomes ac tive This setup time is normally available on 6502 bus since the addresses are guaranteed to be valid 300 nsec into phase 1 and thus your circuit worked on It is however clearly impossible to use the internal Apple de coding and satisfy the PIA requirement of 180 nsec setup time The above problem should not be interpreted as a defect in the Apple II since it is a self con sistant system and 1 0 ports can easily be added if desired My solution was to build a simple address de coder on my I O board that uses the address lines instead of the selects Thus the CS of the VIA is activated with sufficient setup time and the VIA works properly A note from Paul Farmer of Microproducts 1024 17th St Hermosa Beach CA 90254 suggests using three buffers in series on a CMOS 4050 IC chip Either phase 0 or phase 2 can be used as the input with enough delay for the setup of a PIA or VIA PET Droppings A new idea in magazines CURSOR tm MAGAZINE is a monthly cassette of programs for the PET You get five programs per month on cassette via ist class mail At 24 00 per year 12 issues the cost per program is 40 cents each Of course the actu
99. ounter Bit Cancel Keys Turns bits off under the following rules KET DECIMAL 0 RVS 254 1 253 2 251 3 247 stop 239 may be pushed at once 5 none 6 191 Decimal Binary 1 127 equivalent VERIFY LOAD flag 0 LOAD 1 VERIFY or Status Key Pushed Counter MOD 10 RVS flag 0 RVS off 1 RVS on Input Run Buffer keys stored during a RUN Interrupt Vector normally at Store Keypush 0 keyboard 1 2 tpae 2 3 screen Wraparound flag 39 single line 79 2nd of double line ior any key pushed BRK instruction Vector User loaded in Input Run Buffer R Keyboard Input Code Stays equal to Input code til finger off key Matches up one to one with M 59228 59307 which is Keyboard Input Code to ASC Code Table Blink Cursor flag if 0 no key pushed Cursor Blink Duration counter 20 interrupts Screen Value of Input Char when Cursor moves on Insure no Cursor Breadcrumbs left behind Screen Page Array single or double Line flags File of one of 10 files Device of one of 10 files 0 option one of 10 files Input from screen Input from keyboard flag Number of Open Files Device Number of Input Device 0 keyboard normally Device Number of Output Device 3 screen normally Tape Buffer Item Counter Tape 1 Buffer area Tape 2 Buffer area 0119037
100. plan to run a Hardware Catalog similar to the current Software Catalog Information for this catalog will come from suppliers of the hardware the manufacturer distributor or dealer This will NOT be a Product Review nor will inclusion of information indicate endorsement of the pro duct by MICRO We will not knowingly include products which do not meet the following guide lines 1 The product must be directly related to 6502 interests For example a general purpose coding form would not qualify 2 The product must be currently available A Some units must have already been delivered B Delivery on new orders should be no more than stock to four weeks 3 The price must be included along with any other pertinent information about discounts shipping charges etc 6 24 010829 Suggestions for Hardware Catalog information 1 Cover all of the important features of your product but be concise MICRO reserves the right to edit submissions which are too long 2 picture is worth a thousand words doesn t cost you a thing Since it is a lot more work to include pictures in the catalog we are not sure that we will be able to use then but if it is possible we will 3 Submit separate products as separate items for the catalog First we will not print con glomerate listings Second you get multiple exposure with separate listings 4 Don t waste your time or ours submitting material which does not
101. processor that takes care of all your letter and document needs In two versions 39 characters and 79 characters APARTMENT RENTAL PROGRAM Prints bill and labels Maintains arrears for each unit MACHINE LANGUAGE SORT FOR THE FOLLOWING PROGRAMS 20 UNIVERSAL DATABASE 60 You define your database once for each use you have in mind DAILY CALENDAR 50 Search your future or past appointments HOME IMPROVEMENT FILE 50 Store all your improvements on file for future HOME INVENTORY FILE 50 Store all your home furnishings on tape for insurance purposes EXPENSE ACCOUNT FILE 50 Maintain all your travel meals and business or personal expenses on tape VENDOR FILE 50 Store all your vendors on file FILING SYSTEM CROSS REFERENCE FILE 50 Now you can find everything in your files MACHINE LANGUAGE SORT FOR ANY RECORD UP TO 255 CHARACTERS 20 GAMES CAR RACE PROGRAM IN HIGH RESOLUTION GRAPHICS 7 50 BINGO FOR 36 PLAYERS 10 Uses printer to print Bingo cards For further information about above programs send 1 00 for postage and handling to DARRELL S APPLEWARE HOUSE 17638 157th Avenue S E Renton Washington 98055 No C O D Allow two weeks for personal check to clear Washington residents add 5 4 sales tax For orders under 100 00 please add 2 00 for shipping and handling Dealer inquiries welcome 335 336 337 338 339 3 341 342 343 344 345 346 3
102. rminal or vice versa without modification of the port The CmC ADA 409 can also be parelelled to drive teletype or kS 232 printer while still using the computer s regular terminal CmC ADA 400 can easily be modified to become an lt 232 to TTL TIL to 5 232 ADApter The CmC ADA 400 does not alter the baud rate and uses standard power supplies The current loop is isolated from the R5 232 signal by optoisoletors CmC ADA 4M is the perfect partner for KIM if vou want to use an RS 232 terminal instead of current loop teletype The CmC 4005 comes with drilled plated through solder pads and sells for 24 50 CmC ADA 4008 This announcement wes composed a COMMODORE PET and printed on GE TermiNet using e CmC ADA 1200 printer adapter and the CmC Word Processor Proaram comes with barrier strips and screw terminals and sells for 29 50 _ CANS gt w 77 7 va gt 5 54502188 J nm PROLP EOE DORE p lt 004 4 4 6094 65 HEE DEOL D lt 4 HEED ORC DOOD 0264 4 lt gt 0 4 gt 4 4 604 lt 094 HEED 4 HEED HEED 04 4 064500 904 HEED BET D HEC PERL D O61 WEEDS 4 04 664 lt 4 lt gt 004 gt 004 084 gt 0804 0049 OEE DOREY 9945604
103. ro Anon 9 Digit BASIC concise method for modifying OSI 9 Digit BASIC for an end user 9 Digit BASIC Anon 05 650 Performs description of new system said to be a new standard for microcomputer operating systems Anon 500 510 Breakpoint Utilities A breakpoint program Anon 510 Tracer A tracer program which prints a disassemble of the next instruction to be executed Bishop Robert J Fiendish New QUBIC Program 73 Magazine 209 78 Feb 1978 An attempt at producing an improved version of the original Qubic program Rosner Richard Daddy Is It The PET ROM 1 No 9 26 Mar April 1978 Description of many features and operations of the PET including many how to instructions Bishop Robert J LOGAN A Logic Circuit Analysis Program Interface Age 2 No 6 pg 128 May 1977 An Apple I BASIC program for analyzing networks of logic gates Bishop Robert J Apple Star Trek Interface Age 2 No 6 132 May 1977 Star Trek written in Apple I BASIC Chamberlin Hal Microcomputer Input Output Popular lt iectronics 13 No 5 pg 86 May 1978 Comments the KIM s memory mapped 1 0 system Peoples Computers 6 No 6 May June 1978 Johnson Ralph Letters The University of California at San Diego plans a Pascal system for the 6502 Cole Phyllis Apple II A review of this 6502 based micro Voros Todd L Sketeheode A technique to minimize errors and simplify th
104. ruction 0192 xev Xe aise eles 1200 Program Storage c ok Bre a tk 0500 Tape Buffer 2 DIO ede VE o PE EK de e STRA 033A Tape Buffer 1 OP uqa 0274 BASIC and Operating System Working Space p Sapa pue 0002 USR Control Pointers 0000 Figure 2 of the PET Random Access Memory Space The Listing Program resides in machine language in Tape Buffer 2 A flow diagrin of the Listing Algorithm is shown in Figure 3 The program after proper initia tion examines the first character of the third line in the display for a value corresponding to the letter It is the letter appearing in the first display column which is used by the Listing Program to exit the listing algorithm and return control of the program to the calling routine The R in the first column would nor mally correspond to the READY displayed by the computer at the end of a requested listing block or at the completion of an executed RUN If the character in the first column is anything but an R the program executes a carriage return and then a line feed The program examines the next displayed character and translates it from dis play format to ASCII format The subroutine PRINT is then called TIGRO INI T is YES FIRST CHAR NO PRINT CR LF EXAMINE NEXT CHAR CONVERT TO ASCII AND PRINT INIT FOR A
105. ruction space DEBUG is particularily susceptible to key bounce The user should remain watchful of such occurrences especially during BREAK execution as previously described 5 My goal here was to fit as much DEBUG power into locations 1780 17E6 as possible not to write a great breakpoint move branch calculate routine That has already been done by others Thus DEBUG had to be written in relatively con cise and tight code using data as instructions instructions as data overlapping instructions using the same code to do different things instruction modification position instructions in prescribed relative locations use of write only memory etc I do not approve of this type of programming in fact I strongly recom mend against it However in this case I hope the goal I had justifies the mess that DEBUG has turned out to be In any event I would like to point out that as tight as the code is it is still possible to add other functions here and there For example the version I usually use displays the value of the accumulator in display locations 5 and 6 when returning back from a Breakpoint At times I also use another version which doesn t require the BRK instruction at all This is convenient when debugging inter rupt programs since no additional interrupt is needed for DEBUG However both versions penal ize me in other areas which makes it all a trade off decision Editor s Note Gaspar seems to be suggesting
106. s Fri 11 00 AM to 8 00 PM Sot 10 00 AM to 6 00 PM Closed Sun Mon Why Should You Buy From Us Decouse we con help you solve your problems ond onswer your questions We don t cloim to know everything but we hove enough references and contacts in the 6502 field that we con help you answer your questions Sign up for 6502 Information Exchange and Workshops System Meetings Next Meeting Kim Vim Super Kim 2nd Saturday of Month Sept 9 Super Kim Commodore PET 3rd Saturday of Month Sept 16 Pet Documentation Apple 4th Saturday of Month Sept 23 New programs and peripherals APPLE we are the Apple Experts New Software APPLE POWER CONTROL INTERFACE This interface plugs into any peripheral slot on the Apple II ji Microproducts Co resident Assembler 20 00 board and 2 16 channels of control Power Control Universal Data Management 50 00 modules plug into the interface via a ribbon cable Each e Super Othello 10 00 Power Control module oS 4 110V e z Circuits ot 12 omps Up to 4 Power Control Modules Graph Plotter w Oxis 510 00 may be used IR MUR interface Bob Bishops Control Room Lights Stereo Equipment Security Systems Apple Taller 10 00 Electrical Applionces Color Organ 10 00 Hondle Up to 1000 Watts per Chonnel Directly From Progrom Control Dancing Man 5 5 00 Complete Isolotion of the Computer From the AC Line
107. s of PET owners is the lack of support for assembly level programming on the PET in spite of promises by Commodore for a ROM or tape of a machine code monitor This will be partially alleviated by A Simple 6502 Assembler for the PET by Michael J McCann complete in this issue The package presented here consists of the assembler a save on tape routine a load from tape routine and a disassembler to produce listings Two errors in the listing were discovered after that portion of MICRO was printed so please make the follow ing changes in the listings 190 IF VAL A 1 OR VAL A gt 6 GOTO 180 15020 IF LEN A 3 THEN MN zA 0Pz0 RETURN Since the BASIC 6502 Disassembler written by Michael for the last issue of MICRO was with very minor modification capable of running on an Apple as well as a PET the assembler portion of this program is probably also modifyable for the Apple The exercise is left for the reader as the math books are fond of saying Part III of the MICRO Software Catalog has eight entries covering a wide variety of software and 6 3 GRO IN THIS ISSUE systems These range from a program to punch readable leader of a paper tape to FOCAL a DEC high level language similar to BASIC There is a Call for Information in regards to a MICRO Hardware Catalog which we hope to start carrying in the next issue If you have hard ware of interest to the 6502 community then follow the instructions and submi
108. sembly for KIM to 20 00 5100 Memory Board with instructions K 165 00 same but fully assembled and tested 199 00 C5100 Cabinet cut out for KIM 129 00 3 Connector 5100 Motherboard Assembly 75 00 CGRS 5100 Kit ERE AE EI I MEE 129 00 5 5100 6502 CPU Kit 179 00 CGRS 5100 Front Panel Kit 129 00 Video Terminal Beard T6 X amp AK 155 00 XITEX Video Terminal Board Assembled 185 00 00 245 5100 with CGRS 16 1529 00 Same but Assembled 1989 00 Ae rec MER MP T P5 5 Pwr Supp 5V5A9Y 1A 12 lIA 6x6X2 75 00 5 5 90 00 Loo EAE of Order Circlea items wanted amp Mass Residents Sales Tax 5 yos rd Shipping 1 2 00 min E e e SUATE ZIP Total er Charge O AUGUST SEPTEMBER 1978 3 2 ISSUE NUMBER SIX MICRO Stuff and MICROBES 4 Design of a PET TTY Interface 5 Charles R Husbands Shaping Up Your Apple 11 1 Apple II Starwars Theme 13 by Andrew H Eliason 1 1 15 by Robert J Bishop A Simple 6502 Assembler for the PET 17 by Michael J McCann The MICRO Software Catalog III 23 by Mike Rowe A Debugging Aid for the
109. sh then to make X and Y the sum of more than three terms with the fourth and fifth chosen at even larger intervals The program follows A paddle and push buttons are used to control the tempo and reset the dis Play If your paddle is not connected substi tute O for PDL O 171 151 FOL 190 FOF s IF FEEK 1 amp 8227 22127 THEN 200 NEST I FOR 1 1 20 yoke 66 110 NEST I HEST E maro 120 1010 1020 120 2000 GF CALL 336 301 PRINT PADDLE SPEED S020 PRINT BUTTOM 0 cO AT ONE TD HI S030 PRINT HOLD BUTTON 1 TO CLEAR C REEN 3040 GOTO 11011 anda CALL S53 DARRELL S APPLEWARE HOUSE We are the APPLE experts when it comes to software We are professionals and not just hobbyists Data Processing is our business Most programs are done in Integer Basic to allow user modifications The following programs require 20K or more of memory All programs use parallel port printers BUSINESS INVENTORY 160 00 for package 9 PROGRAM 200 50 Completely maintains inventory file PROGRAM 205 20 Fast machine language sort on Part No 9 PROGRAM 210 50 Prints sales slips updates inventory file PROGRAM 220 50 Generates reorder report by manufacturer code APPLEDITOR 50 A word
110. sue 19 pg 60 July 1978 Description of a low cost method to add memory to KIM MICRO Issue 4 April May 1978 Carpenter C R Variables Chart Chart to layout and keep track of string and numerical variables for Apple II Applesoft BASIC Floto Charles PET Vet Examines Some BASIC Idiosyncrasies Includes suggestions and modifications for a Mailing List Program by Richard Rosner DeJong Marvin L A Complete Morse Code Send Receive Program for the KIM 1 Converts ASCII from a keyboard to a Morse code digital signal and also converts a Morse code digital signal to an ASCII code for display on a video system O Brien Software from Commodore New selected Application notes from Commodore Floto Charles Early PET Compatible Products A review of several new accessories for the PET Rowe Mike The MICRO Software Catalog A continuing catalog of software available for 6502 based systems Carpenter Apple II Printing Update Updated information and modifications of the system described previously in MICRO No 3 Chamberlin Hal Standard 6502 Assembly Syntax A plea for standardization NE Rowe Mike A Worm in the Apple Discussion of some problems encountered in inter facing the Apple to other devices such as the 6820 PIA Jenkins Gerald C A KIM Beeper A short blast or two of audio for load errors end of line etc Auricchio Rick An Apple II Programmer s Guide Some of the previously undisc
111. t to a software exchange The subroutine presented here avoids these diff iculties at the expense of the effort to imple ment it It is completely position independent it may be moved from place to place in core with the monitor move command and used at the new location without modification It makes exten sive use of SWEET16 the 16 bit interpreter sup plied as part of the Apple Monitor ROM To use the routine from Apple Integer BASIC CALL MKUP where MKUP is 128 decimal plus the first address of the routine The prompt shown Respond with the hex limits of the rou tine to be stored as BBBB EEEE BBBB is the be ginning address EEEE is the ending the same format that the monitor uses Several groups may be specified on one line separated by spaces or several lines Type S after the last group to complete the pack and return to BASIC The program can now be saved To load enter BASIC and LOAD When complete RUN The first RUN will move all routines back to their original location and return control to BASIC It will not RUN the program subsequent RUNs will A LIST of the program after calling MKUP and be fore the first RUN will show one BASIC statement which initiates the restoration process and gibberish If this is done RESET followed by CTRL C will return control to BASIC Editor s Note WARNING 1 The routine must be placed in core w ere it will not overwrite itself during the Pack The start of
112. t your stuff A rather neat program which serves as A Debug Sing Aid for the KIM 1 written by Albert Gaspar provides some good support for the KIM 1 and resides totally in the extra memory from 1780 to 17E6 Four basic operations are given Insert BREAK points MOVE blocks of data in memory calculate BRANCH offsets and CONTINUE execution of the program The program is very tightly coded and shows some ways to really pack your code The series on 6502 Interfacing for Beginners continues with Address Decoding II This ser ies which began last issue and is written by Marvin L De Jong shows the novice how the microcomputer works via simple hardware and software projects One of the most obvious features of the Apple II is its color capabilities The article Brown and White and Colored All Over by Richard F Suitor explains in some detail the theory behind the color of the Apple also provides a few Simple BASIC programs to allow the user to do some experimenting with color Part V of the 6502 Bibliography by William Dial covers entries 335 through 360 Due to the explosion of material being written about the 6502 some changes have had to be made in the organization and content of the bibliography Straight advertisements will no longer be refer enced or will material contained in flyers Minor articles in relatively obscure magazines may be omitted And where a single issue of a magazine has a lot of ar
113. tal electronics you may want to consider some other preliminary instructions BEFORE undertaking this book If you have some sense of digital but little know ledge of micros you should tackle it but should make notes of important items the first time through each chapter and then reread the chapter to pull the odds and ends together If you have written simple programs but have an appetite for more complex proglem solving then Programming A Micro Computer 6502 will be a definite aid and resource in satisfying your hunger Programming A Micro Computer 6502 by Caxton C Foster published by Addison Wesley 1978 MI SUBSCRIPTION AND RENEMAL INFORMATION If you are a subscriber to MICRO then the code following your name on the mailing label is the number of the last issue your current subscrip tion covers If your code is 06 then this is your last issue MICRO will NOT send out renewal notices So if your number is coming up get your subscription renewal in soon and please check your label for correct address and notify us of any corrections or changes MICRO is currently published bi monthly The first issue was OCT NOV 1977 The single copy price is 1 50 Subscriptions are 6 00 for six issues in the USA Six issue subscriptions to other countries are listed below Payment must be in US 1 Surface Canada Mexico 7 00 All other countries 8 00 Air Mail Europe 14 00 South America 14 00 Central America
114. te optional Description 65 is primarily designed to edit assembler source code Line oriented commands Specify input out or text and find specific lines to be edited String oriented commands allow the user to search for and optionally change a text string Also character oriented commands and loading and dumping to bulk device A 65 is a full two pass assembler which conforms to MOS Technology syntax A full range of run time options are provided to control listing formats printing of generated code for ASCII strings and generation of object code Names System Memory Copies Not Specified Price 100 each Includes Object form on paper tape or KIM type cassette Listings of source code are available for 25 00 each Full documentation on the in stallation and use of each package is provided Author Not Specified Available from COMPAS Computer Applications Corporation 687 Ames 50010 The MICRO Software Catalog is a continuing fea ture of MICRO If you have any 6502 based soft ware for sale or exchange or free please send a complete description which includes ALL of the information listed The MICRO Staff will not write up entries for the MICRO Software Catalog from other materials that you may provide First we do not have the time to do this Second since we are not as familiar with your software as you are we can not hope to provide as meaningful a write up as you can Cover all pert
115. telephone orders welcome at 617 783 0694 PET SCHEMATICS Another First From For only 34 95 you get 24 x 30 schematic of the CPU board plus oversized schematics of the Video Monitor and Tape Recorder plus complete Parts layout all accurately and painstakingly drawn to the minutest detail PET ROM ROUTINES Another Breakthrough From PET SHACK For only 19 95 you get Complete Assembly listings of all 7 ROMs pius iden tified subroutine entry points Video Monitor Keyboard routine Tape Record and Playback routine Real Time Clock etc To entice you we are also including our own Machine Language Monitor program for your PET using the key board and video display You can have the Monitor program on cassette for only 9 95 extra Now M C VISA Send check or money order PET SHACK Software House P37 Marketing and Research Co Box 966 Mishawaka IN 46544 aq paeunseJd 5 Ty 943 10 e ST 33815 39 9 y Arey 4236156 134 JO 3811 18173184 27 9 H Drson 3 1384 134 201 Jamey 17 9 73 183 319310 oeprA eirsoduo 134 41 9 av C 134 943 10 1e quessy 7069 9 WSHV 5 1 11 134 8 S6
116. ticles of interest the individual references will be combined under one general magazine reference Programming a Micro Computer 6502 a book by Caxton C Foster is reviewed by James R Witt Jr Cal E Merritt discusses the PET Composite Video Output showing how it works and how to connect up to it Karl E Quosig whows how to get Power from the PET a method of getting 5 from your PET A Classified Index MICRO 1 6 lists all of the major articles and advertisements from the first volume year of MICRO Material is classi fied as General KIM 1 Apple PET or Ads A very useful utility package is presented by Richard F Suitor in Apple Integer BASIC Sub routine Pack and Load The assembly level gram which is presented in its entirety permits the user to simply Pack and save his machine code on tape and the Load and unpack it Partial List of PET Scratch Pad Memory is printed on the back cover as a reference guide for PET owners This material was prepared by Gary A Creighton and should make using and un derstanding your PET much easier Apple Peelings Excerpts from a letter by Donald C Scouten to the Editor EDN regarding the Apple PIA stuff The difficulty in using PIA s and VIA s on the Apple II arises because of the way the Apple decodes the I O select pin 1 and device select pin 41 These are activated only during phase 2 of a cycle that addresses the particular con nect
117. torage location on data lines 4 0203 0 0 0 60 High order address of storage location on data lines 5 60XX 0 1 1 accumulator LED will light for 1 microsecond if contents connected to pin 4 on LS145 6 0204 0 0 0 BCC op code Pin 4 high pin 1 low LED will glow on pin 1 only 7 0205 0 0 0 FB offset 6502 is now determing if and where to branch Branch is to 0201 because 8 0206 0 0 0 garbage carry was clear the program loop address lines A14 and A13 go high only during cycle 5 Thus for six cycles output 0 pin 1 of the LS145 is low The LS145 is an open collector device and acts like a switch to ground when the pin is in the L state allowing current to flow through the LED Dur ing cycle 5 when the address of the storage location is on the address bus pin 4 is in the low state and will cause the LED to glow Earth people do not perceive one microsecond flashes spaced six microseconds apart so the LED ap pears to glow rather than flash Since the ma jority of the loop time is spent with pin 1 at logic 0 a bright glow is observed on this pin Changing the instruction from STA to LDA has no effect since the address bus goes through the same sequence for a LDA as it does for a STA Changing the storage location from 60XX to some thing else will cause another pin of the LS145 to glow The results of the LED test should agree with the truth table given for the LS145 The pulse from the decoder which occurs when it responds
118. ulating Pi to ten decimal places Around the end of the sixteenth century the German mathematician Ludolph von Ceulen worked on calculating the value of Pi until he died at the age of 70 His efforts produced Pi to 35 decimal places During the next several centuries a great deal of effort was spent in computing the value of PI to evern greater precision In 1699 Abraham Sharp calculated Pi to 71 decimal places By the mid 1800 s its value was known to several hundred decimal places Finally in 1873 an English mathematician Shanks determined Pi to 707 decimal places an accuracy which remained unchallenged for many years I was recently rereading my old copy of Kasner amp Newman s Mathematics and the Imagination I was recently rereading my old copy of Kasner amp Newman s Mathematics and Imagination Simon amp Schuster 1940 where I found the series expan sion 4 1 kel 2k 1 2344 icc lo 2k 1 5 gt The book indicated that this series converged rather quickly but it would require ten years of calculation to determine Pi to 1000 decimal places Clearly this statement was made before modern digital computers were avail able Since then Pi has been computed to many thousands of decimal places But Kasner amp Newman s conjecture of a ten year calculation for Pi aroused my curiousity to see just how long it would take my little Apple II computer to perform the task
119. until Commodore comes out with a printer Or you could buy one of the PET RS232 adapters Or you can use the techniques and software that are presented in Design of a PET TTY Interface to quickly and cheaply use a standard TTY as a PET printer article by Charles R Husbands provides both the hardware and the software re quired If you have wondered about how the characters formed on your Apple II read Shaping Up Your Apple by Michael Faraday In addition to ex plaining how the mechanism works a couple of tables make it easy to make your own adapta tions Now that STARWARS is back at your local drive in it seemed appropriate to print a short pro gram by Andrew H Eliason which presents the Apple II Starwars Theme sounds of the main battle scene played on your Apple While this program may give you some insight into the oper ation of your Apple it is really included just for fun On a more serious vein in spite of its humorous title Apple Pi shows how to use BASIC to 1 culate mathematical functions Robert J Bishop presents the history of calculating Pi and then provides a program which given forty hours can calculate the value of Pi to 1000 decimal places In case you do not want to run the pro gram yourself the results of his run are print ed It might be a challenge to someone to write the equivalent code in assembly language and see how long it takes to run One of the most constant complaint
120. wards 1451 Hamilton Avenue Trenton NJ 08629 3 00 extra FOCAL Trademark Apple II Not Specified Language Assembler Hardware Apple II Description This is an extended version of the high level language called FOCAL FOCAL was created for the DEC PDP 8 It is similar to BASIC FCL65E as this version is called is now available for the Apple II Copies Not Specified Price Apple II format cassette 25 00 Mini Manual 6 00 FCL65E User s Manual 12 00 Conplete Source Listing 35 00 Ordering Info Specify parts desired Author s Not Specified Available from The 6502 Program Exchange 2920 Moana Reno NV 89509 WARLORDS Apple II PET version under devel Not Specified Language Not Specified Hardware Apple II Description It is the Dark Ages in the king dom of Nerd and all is chaos King Melvin has died without an heir and a dire power struggle is taking place to see who will emerge as the new King You and the other players are the WARLORDS and you will have to decide what com bination of military might and skillful diplom acy will lead you to victory Name System Memory Name System Memory Copies Not Specified Price 12 00 Ordering Info Specify Apple II Version Author Not Specified Available from Dealers who carry software from Speakeasy Software LTD MICRO E 65 and A 65 Any 6502 based system Not Specified Language Assembly Hardware Terminal Casset
121. wo numbers representing them Subtractive com bination can be represented by ANDing the light colors pink yellow light green and light blue The more bits set in a number the brighter the fewer the darker The bit pat terns for 5 and 10 have no 3 58 MHz component and so generate a neutral tone At a boundary between 5 and 10 however this pattern is dis turbed and two bits or spaces adjoin Try the following program which has only grays disp played 10 GR 20 FOR I 0 TO 9 30 COLOR 5 40 HLIN 0 39 AT 2 I 50 VLIN 20 39 AT 2 1 60 20 39 201421 70 COLOR 10 80 HLIN 0 39 AT 2 I 1 90 VLIN 20 39 AT 2 I 1 100 VLIN 20 39 AT 2 1 20 110 NEXT I 120 RETURN The top half of the display has HLIN s alter nating 5 and 10 The bottom half has VLIN s alternating 5 and 10 What do you see The bit pattern for a number is placed directly on the video signal with the four bits occupying one color carrier period When two bits adjoin at a 0111 LIGHT BLUE 1110 LIGHT GREEN 1 e VIOLET 0001 RED 0010 oe Ti DARK BLUE 0000 dps E BLACK DARK GRE Figure 2 Color space locations of the Apple II colors Each horizontal plane forms a color circle of different brightness 5 10 boundary a light band is formed When two spaces adjoin a dark band is formed The slight tints are due to the boundaries having some color component Changing the 5 10 order reverses this tint Now
122. your non computer friends who might like to play Connect the Dots after a cou ple of beers A big problem keeps cropping up using the scale feature It seems that when blowing up the original drawing the Apple II uses the direction of motion associated with the plotted points as base reference for the additional points This often leads to strangely assymetrical pic tures in larger scale with lines of dots going in unexpected directions As always a little playing around can really make you feel good Have fun Hexidecimal Octal Conversion Table 0 1 2 3 4 5 6 7 8 9 C D E P 0 1 2 3 4 5 6 7 10 11 12 13 14 15 16 17 20 21 22 23 24 25 26 30 31 32 33 34 35 36 37 MO 11 412 43 44 45 46 47 50 51 52 53 54 55 56 57 60 61 62 63 64 65 66 67 70 71 72 73 W 75 76 T 100 101 102 103 104 105 106 107 110 111 112 113 114 115 116 117 120 121 122 123 124 125 126 127 130 131 132 133 134 135 136 137 140 141 142 143 144 145 146 147 150 151 152 153 154 155 156 157 160 161 162 163 164 165 166 167 170 171 172 173 174 175 176 177 200 201 202 203 204 205 206 207 210 211 212 213 214 215 216 217 220 221 222 223 224 225 226 227 230 231 232 233 234 235 236 237 240 241 242 243 244 245 246 247 250 251 252 253 254 255 256 257 260 261 262 263 264 265 266 267 270 271 272 273 274 275 276 277 300 301 302 303 304 305 306 307 310 311 312 313 314 315 316 317 320 321 322 323 324 325 326 327 330 331 332 333 334
Download Pdf Manuals
Related Search
Related Contents
OM, Gardena, Rasaerba elettrico, Art 04032-20, 2006-01 Téléphone Mobile Vegas Description du produit modified 19/11/15 Copyright © All rights reserved.
Failed to retrieve file