Home
The Basic Switch
Contents
1. Skyles Electric Works You love your PET but you ll love it more with this BigKeyboard sae g eet 74KB Big KeyBoards 125 00 Plus 5 00 shipping amp handling The Skyles Big KeyBoard M More than 15 inches wide A layout nearly identical to the PET Keyboard and with all functions alpha numeric graphics special symbols lower case alpha on full sized almost plump key tops double shot to guarantee lifetime durability 12 Would you like to turn on your PET and see this 8KB 8K Memory Expansion Systems 250 00 31743 BYTES FREE Plus 3 50 shipping amp handling READY 16 16K Memory Expansion Systems 450 00 Plus 5 00 shipping amp handling 24KB 24K Memory Expansion Systems 9 650 00 Plus 5 00 shipping amp handling Skyles Memory Expansion Systems are complete nothing more to buy e First quality static RAMs e Solid soldered on first quality glass epoxy board e Separate PET Adapter Printed Circuit Board connects directly to data bus on your PET rat s nest of hang ing hand wiring e Ribbon cable and 50 pin connectors that keep your PET open to the outside world one on the 8KB two on the 16KB and 24 _____ SKB Memory Expansion System s at 250 each Adds 8 192 bytes total 15 359 shipping and handling 3 50 each _____ 16KB Memory Expansion System s at 450 each Adds 16 384 b
2. this form to QOeidon lectronicys SERVING THE PERSONAL COMPUTER INDUSTRY Or phone 612 884 1475 Weldon Electronics 4150 Hillcrest Road Wayzata 55391 i i i Do you own a computer What type i i The Basic Switch Attention Old Pet Owners Not sure about the ROM Retrofit Kit from Commodore Now you can use both sets of Commodore 5 and others as well The Basic Switch allows switch selection of either ROM set your original set or your retrofit set from Commodore Plus Model 15 A includes an additional zero insertion force socket allowing easy use of ROM like the BASIC Programmer s Toolkit concurrently Model 14 The economy model of The Basic Switch Stand alone board and harness without case and case hardware The free standing unit is ready to accept your ROMs Model 14 0 Same as Model 14 but includes attractive protective case and mounted Basic Switch board Note that Model 14 Series does not allow for exc ansion ROMs like the BASIC Pro grammer Toolkit Model15 A Basic Switch plus includes cable assembly and zero insertion force socket Your 1 th ROM simply plugs enabled while either ROM set is selected S cket 15 may be readdressed by the user for additional flexibility The Basic Switch is sold in assembled form only All models are designed for easy attachment to your Pet with a convenie
3. 35 32K DISK INVENTORY Use stock numbers description vendor record of purchase and sales date amount on hand cost amp sell price total value Holds up to 300 items 40 With Parts Explosion 05 50 32K DATA BASE Crass file for phone lists bibliographies recipes Run up to 9 lines of 40 columns each Search by item anywhere all eere 20 24K HI RES LIFE SIMULATION Conway s equations on 296x180 screen A mathematical simulation ta demo population growth with birth death and survival as factors 10 16K CIRCUIT LOGIC DEVELOPMENT AID Evaluate circuits of up to 255 gates including AND OR NOR NAND XOR XNOR and INVERTER 10 16K MORSE CODE TRAINER Learn Morse Code and transmit or receive over radio 10 16K DEVIL S DUNGEON Adventure through dark passages where monsters demons poisonous gas dropoffs threaten all to disco ver fantastic treasures Comes with instruction book Tape 10 16K PACIFICA Discover the floating island and rescue the beauti ful princess To win you must recover the enchanted crown but you face the threat of magic spells and demons 9 95 Don t see what you ve been looking for here Then write for our FREE SOFTWARE CATALOG We re saving one just for you To order software add 2 shipping To transfer tape ver s
4. Yw JY A r H M 95FF End of user RAM HIMEM 49151 9000 Address of name of first file 9600 Start of data buffer 9D02 DOS keyin routine address 9700 Start of track and sector buffer 9D04 DOS print routine address 9800 Start of miscellaneous info buffer 9D06 Name number 1 buffer address 982D Start of name of file 9008 Name number 2 buffer address 984B C Address of start of miscellaneous info buffer 9D0A 9800 9DOC Bottom of DOS 984D E Address of start of track and sector buffer 9700 9DOE 984 0 Address of start of data buffer 9600 9D10 Address stack for the internal print routines 7 9851 2 Address of start of name buffer next file 0000 901 Address stack for the DOS command routines 28 no more files 9D56 Address stack for return to the current language 9853 Data 6 9953 Track and sector 9D62 Address stack for return to Integer BASIC 9A53 Miscellaneous 9D6C Address stack for return to Applesoft ROM 6 9A80 Name 9D78 Address stack for return to Applesoft Disk 6 9A9E F Address of start of miscellaneous info buffer 9D84 3D3G Control B re enters INT or FP ROM only 9 53 9DBF 3D0G Restores DOS and re enters current 9 0 1 Address of start of track and sector buffer 9953 language 9AA2 3 Address of start of data buffer 9853 9DEA Restores 300 3FF from 9E51 9 80 9AA4 5 Address of start of name buffer of next
5. 170 PRINT CHR X CHR Z 180 NEXT 2 Exo Signature 200 PRINT 210 NEXT X 220 END Name Address 17 56 MICRO The 6502 Jot nal October 1979 More LETTERS have a SYM 1 While debugging a program that uses the timer in the 65321 found out that the IRQ pin is not con nected to the IRQ bus Rather than spend a lot of time finding the neatest way to connect the 6532 IRQ pin to the IRQ bus simply ran a piece of wire wrap stock between the IRQ pin on the 6532 to the nearby 6522 Now can use the interrupt feature of the 6532 do not know whether Synertek did this for a par ticular reason but have not had any pro blems since making this little modifica tion Perhaps you are already aware of this just thought would pass it along for what it is worth Keith Le Baron 1260 S Blackhawk Freeport IL 61032 TEXTCAST Turn your PET into a WORD PROCESSOR comparable to large systems for a fraction of the cost CREATE REVIEW EDIT FILES There is a useful but unadvertised display subroutine in the AIM 65 Monitor It is labeled OUTDD1 and can be cailed by a JSR instruction to hex ad dress EF7B The subroutine displays the ASCII character which is in the accumulator at the relative position 0 19 decimal or 0 13 hexadecimal indicated by the X register It returns with A and X contents intact Before calling the subroutine
6. is located page B and has multiple addresses use hex BFF6 49142 as the address to POKE to the control register and to PEEK at the status register Address BFF7 49143 is used to POKE a byte to the modem and to PEEK at a byte from the modem The BASIC program provides direc tions for the operator data transfer from the modem to PET data transfer from PET to the modem and miscellaneous programming needs Lines 101 105 POKE a machine language routine into the second cassette buffer and line 110 POKEs the 17 11 PET MEMORY EXPANSION PORT A28 IRQ A2 BA A25 SELB 2 1 A30 13 R W V 12 5 429 B02 14 E DD BD 15 DT RS 11 A39 BD6 16 06 C31 10 A38 Bb5 17 05 C32 9 A37 BD4 18 D4 650 8 A36 BD3 4 19 D3 IRQ 7 A35 02 120 02 TXD 6 A34 01 121 01 RTS 5 7 433 BDO 22 DO IRE Bl GND 23 D amp D RXCLK3 JT 24 CTS RXD 2 vss 1 a MC6850 address of this routine into the interrupt address location of RAM so that when an interrupt occurs PET will check the ACIA before it checks the other possible interrupt locations When the ACIA receives a serial byte from the modem it strips off the start and stop bits converts it to parallel and then interrupts the CPU PET is then routed to the routine beginning at 033A Lines 033A 033C transfer the con tents of
7. MICRO The Magazine of the APPLE KIM PET and Other 35 Systems SPELUNKER BUT ONLY FOR THE BRAVE J No17 OCTOBER 1979 kkk x Xx E OO OO en NOW PRESENTING Apple software for your Entertainment Business Education 622222212 COO COE OEC COO EE OO ORE OF Star Attractions FILEMASTER 2 programs FORMAT amp RETRIEVAL comprise a powerful data file manager Great for everything from phone lists to legal abstracts Needs 32K Design your own data structure Up to 500 characters per record Up to 15 searchable fields in any com bination On 34 95 SPACE Multi faceted simulation of life in interstellar society You and opponents must make life amp death decisions Keeps track of your progress from one game to next Needs 48K and Applesoft ROM Disk 224226 y RR uet 29 95 Pot O Gold or our All New Pot 0 Gold A collection of 49 pro grams for 16K Apple Everything from Logic to action games Only a buck a game Specify or 11 Price each Tape 49 Disk 54 ADVENTURE Fight off pirates and vicious dwarfs 700 travel op tions 140 locations 64 objects Needs ROM amp 48K Disk 29 95 16K CASSETTE INVENTORY Use item number description stock amount reorder amount restock date cost amp sell price Holds upto 140 items
8. THEN 9 FRIMT You HAVE FOUND AMT PAD i9480321058 IN TREASURES Saga IF RMT213 THEM PRINT NICE SPELUNK ING a024 PRINT GOO0 BYE 9899 END sies FOR I 2 TO i8 I THE a PRINT i HEAT I 465 IF LIGHT 8 AND LOC ANG LOCHLS THEN 9299 Sii4 VTAB 5 THE 22 PRINT TAB 22 PRINT PORE 58 65 21468 HzLOCO B8 OF AELOC lt 6 THEN 3156 VTRB 22 PRINT THE 22 FRINT S156 zLOCOo a OR 15 10635 AND RAFT 62 THEM 3166 VTHE 5 THE 33 PRINT TRE 22 PRINT 5 S166 IF 0 2 8 OF CEZLOCOZB AND RRET H2 THEN 3176 VTRE 6 TAB 5 PRINT aira IF ANG RAFT 2 THEN Sich WTAE amp TAB ZB PRINT L C 9 DE 06 43 ANG R PE 1 THEN 9185 GOTO 9194 Be 4o in 29 2 THE 22 PRINT S498 IF LOC 4 OF 8 THEM 3204 9195 VTRE TAB 22 PRINT GOWN IF L C ii OF LOC THEN 3218 GOTO 9290 1 a oig irl 218 VTRE THE 36 PRINT TAB 3B PRINT 9215 IF LOC S THEN 9229 VTRE i TAB 25 PRINT E TAB 25 PRINT N 17 22 MICRO The 6502 Journal October 1979 9226 VTRB 8 TAB 38 PRINT W TAB 35 PRINT S TAB 26 PRINT 5 35 PRINT E S298 PORE 50 255 9208 IF LIGHT AND LOC gt 2 AND LOC I9 THEN 9468 3265 5 TAB 2 J 6 9316 FOR 1 1 TO NUMN 1 9328 IF STACI MOD 166 9 L0C THEN 9368 9338 PRINT NOUNS 41 1
9. Did you know that your OSI disk based system has most of the hardware you need for a realtime clock already built in Here is information on how to use it For most personal and business applications the need for keeping track of time is either not very great or can be handied by special software routines for particular applications Where computers are involved in process con trol operations however such as in the real time control of laboratory ex periments precise timekeeping is a must Here the initiation and sequencing of most computer controlled events must be held in tight lock step with a real time clock Owners of Ohio Scientific Challenger Il and disk based systems may not be aware that provision for a real time clock already exists on their 470 disk con troller board The bottom middle section IO II 12 of this board contains the foils to mount three 74390 decade courtter IC s These divide the on board 1 MHz crystal Clock to provide pulses ranging from 1 to 100 000 per second selectable at the user s option Timing pulses may be fed into the NMI or IRQ lines of the OSI bus pins 2 or 3 where the 6502 will see them as interrupt signals The software to handle an interrupt driven time keeping routine must have been loaded into mernory prior to turning the clock on or it may be permanently located in PROM at a con venient memory address One example of how
10. 66 7 68 9 AA6A B AA6C D AA70 1 72 3 74 75 AA93 AAB1 AAB2 AAB3 AAB4 5 6 7 8 1 2 AAC3 4 5 6 7 8 9 5 MICRO The 6502 Journal Checks file type Sets up file buffers and addresses used by MAX FILES Restores DOS hooks Start of command table This is a table of two byte masks One byte is us ed to determine what type of extra data is needed by a command The other byte is used by the hard ware routines for what file type to create or look for Table containing the letters V D L O This is used when checking for optional data Table of bytes for determining what type of op tional data to look for Table of minimum and maximum ranges for V D L Start of error message table Relative address of start of error message i e A971 X Address of name section of next available file buf fer Internal print routine number PR hooks out of DOS IN hooks out of DOS Number of total file buffers Number of file buffers not in use Temporary storage used by various routines Mask for MON and NOMON Command number Found L from a BLOAD Temporary storage used by various routines Defined volume number Defined drive number Defined slot number Defined length Defined record number Defined byte number Defined address Start of file name buffer number 1 Start of file name buffer
11. PRINT LEFTS NS I IF LN lt M3 ML THEN RETURN 35004 815 RIGHTS N LN I 35005 LEFTS N1 1 THEN LN LEN N15 1 N1 RIGHTS N1 LN GOTO 35005 REM DELETE EXCESS SPACES 35006 LN LEN 815 FOR I M3 M2 TO 1 STEP 1 BP MIDS 815 1 1 IF BPS ORB P OR BPS OR BPS Q OR BPS OR LN lt Mj M2 THEN 35008 REM FIND BREAK POINT on the apple is HTAB 1 not HTAB 0 Length of the line you wanted printed N N isthe dollar string you want nicely printed You can form N through concatination or can make it equal to another string developed within the program The word Supercalifragalisticexpili docious Does anyone really know how to spell it is entered in the string N of the sample run to point out two charac teristics of the nice print subroutine In the first nice print example the length of the word has forced it down one line leaving the preceeding line rather short In the second example where the word is longer than the allowable line length super is arbitrarily hyphenated A short line should not appear too often with a 40 column line length since most words are 10 letters or less in length Nicer writer is easy to incorporate into a program and fast in execution It will make your programs appear more pro fessional and best of all it will keep your friends from asking questions like 35007 NEXT I HTAB 2 PRINT LEFTS
12. Bones room Lining the walls of this chamber are the skeletons of pirates long since dead An om nious curse is uttered by all of the Skeletons in unison as you enter the room and the curse shadows your travels throughout the cavern Bat room The ceiling is all but in visible for the tens of thousands of bats sleeping there In one corner of this room lies an old rusted chest As you open the chest the bats begin to stir Inside the chest is a king s ransom in jewels diamonds rubies and emeralds Ghost room An eerie feeling of demonic power lurks in this chamber Misty Lake You are in the middle of Misty Lake A strange glow emanates from the bottom of the lake You turn off your light and notice an enormous bright peari nestling inside a gigantic clam The clam is at the bottom of the lake in only ten feet of water Swift River This narrow fast flow ing river is outside the cavern It runs south for a few yards and then disappears underground 17 15 Having been exposed to a fantasy gram called Adventure which seems to reside on many large timesharing net works was challenged to see if this type of game could be handled on a micro Thus the dream stage began I thought up monsters treasures a cave structure tools tricks and battles The major goals emerged Pseudo English input verb noun phrases interconnected rooms one could travel through Objects one could take put carry
13. FIRE GHOST GOLD ICE KNIFE LAKE LIGHT N NE NW OGRE PEARL RAFT RIVER ROPE SE SW TENT TREE TRUCK UP WATER tested and integrated separately from the others Input commands A list of verbs and nouns was developed and categorized as to nature or function After entering these tables into the pro gram 1 worked on the routine to read and decode input commands Each word was picked out of the input string then searched for in the noun and verb lists The first recognized verb and noun numbers were the output of this routine and this output controlled the action routines later added an edit to pare the noun type and verb type to see if they were compatible Verb Table Sensative Noun Types Location Weapon Monster x X X x x x x x x X MICRO The 6502 Journal Objects to take and put Parallel to the noun list is the status list which gives the room number where an object currently resides A 1 in dicates that the object is in the posses sion of the player In the output section objects in the current room LOC were printed and the objects in the players possession were also reported The se cond action routine was added nex t the TAKE and PUT routine TAKE changed the status of a noun to 1 while PUT set its status equal to LOC Again tested the program and played with it moving things all over the caves Treasure Tools Foods X X X X X x X X x x X x x X
14. T1CH TILL TILL T1LH T1LH T2LL T2CL T2CH T2CH ACR IFR October 1979 Table Memory Assignment Names for the 6522 VIA NAME Port B Input Output Registers Port A Input Output Registers Port B Data Direction Register Port A Data Direction Pegister 1 Latch Low order Byte WRITE Timer 1 Counter Low order Byte READ 1 1 Timer Timer Timer Timer 1 Latch Low order Byte READ or WRITE Timer 1 Latch High order Byte READ or WRITE Timer 2 Latch Low order Byte WRITE Timer 2 Counter Low order Byte READ Timer 2 Counter High order Byte READ or WRITE Shift Register Auxiliary Control Register Control Register for T ners Peripheral Control Register Interrupt Flag Register Status Register Interrupt Enable Register Port I O Register without handshaking latch High order Byte WRITE Counter High order Byte READ systems Pay careful attention to the comments in Table because they relate each step to points in our previous discussion Figure 2 is a flowchart of the delay loop and it has a box for each of the instructions in Table with handshaling A In the program listing given in Table timing begins at the completion of the STA T2CH instruction The program waits in the loop consisting of the series of instructions LDA IFR AND 20 BEQ WAIT until the time out of the T2 timer sets bit five of the interrupt flag register The formula for the time T required
15. THE LEADER IN QUALITY SOFTWARE Available from dealers or write today to the MUSE CO 7112 Darlington Drive Baltimore MD 21234 MASTERCHARGE and VISA welcome Nicer Writer Is screen wraparound a necessary fact of life Or can the computer adapt to conventional line ending rules This little BASIC output routine goes a long way toward eliminating wraparound once and for all Has this ever happened to you A group of friends are admiring your ex pensive investment With the flair of a true computer expert you press the ap propriate buttons push RETURN and tell the expectant guests to watch the Screen Hi the computer prints Thanks for answering the questions as well as you did Rick can state that you should live 55 215677 more years and have 2 15662 children You wait for the applause Instead you hear How come the words run off the end of the line Dead silence You are embarrassed for your guests of course instead of seeing the brilliant Q REM NICER WRITER 5 REM 10 REM PROGRAM DEVELOPED 20 REM AND COPYRIGHT C 1979 30 REM BY RICK CONNOLLY JR 40 REM 5009 RICKWOCD CT NW 45 REM HUNTSVILLE AL 35810 46 REM 49 REM 50 REM 5 IS THE STRING TO BE PRINTED 60 REM CW IS THE COLUMN WIDTH OF THE PRINTER OR MONITOR 70 REM 1 IS THE TAB INDENTATION ON THE FIRST LINE 80 REM M2 IS THE TAB INDENTATION ON SUBSEQUENT LINES TAB 1 IS 0 INDENTATION ON THE AP PLE 9
16. 15 3 M2 1 PRINT II M2 1 14 LEN N18 35009 REM HYPH ENATE LONG WORD 35008 HTAB M2 PRINT LEFTS 15 D 35009 IF LN lt M2 THEN RETURN 35010 1 RIGHTS N1 LN I GOTO 35005 PRINTOUT OF STRING N AS IT WOULD NOR MALLY BE PRINTED FROM A PROGRAM THIS IS AN EXAMPLE OF A LONG SENTENCE TH AT COULD COME EITHER FROM A PROGRAM WRIT TEN FOR 64 OR 80 COLUMN SCREEN OR PRIN TER OR FROM ONE THAT CONCATINATES SUP ERCALIFRAGALISTICEXPIALIDOCIOUS NO NICER PRINTOUT OF STRING NS THIS IS AN EXAMPLE OF A LONG SENTENCE THAT COULD COME FROM EITHER A PROGRAM WRITTEN FOR A 64 OR 80 COLUMN SCREEN OR PRINTER OR FROM ONE THAT CONCATINATES SUPERCALIFRAGALISTICEXPIALIDOCIOUS NO Why did it print CO MPUTER Disassembling the DOS 3 2 You Can t tell the players without a score card and you can not effectively use the Apple DOS 3 2 without this important information on its organization On the surface DOS 3 2 is identical to DOS 3 1 Upon booting the DOS is load ed slave or master the greetings pro gram is run MAXFILES defaults to 3 and HIMEM is set at 9600 DOS 3 2 still communicates with the rest of the AP PLE via input and output hooks at 36 37 38 and 39 Al addresses refer to a 48K machine The differences are many In Apple soft DOS does the 3314 or call 54514 automatically volume checking is ignored unless explicitly defined in the
17. Even more than this you will have to in stall all the hardware for the RS 232 signal level generation that is Q1 and Q2 and their associated resistors and diode Once again you must set up W10 and W11 with the proper switch as described previously so that you can switch between the cassette and your peripheral believe that the description for J2 was sufficient to get you going on the software you might need to use this port The J4 Port In the OSI manual on the Superboard J4 is described as a joystick and noise port The noise is made by turn ing on and off four of the keyboard Figure 4 CASSETTE REMOTE PLUG October 1979 Figure 1 Superboard I O Ports J1 Pin Signal R 2 NMI 3 DD 4 BDO 5 BD1 6 BD2 7 BD3 8 GND 9 GND 10 GND 11 unused 12 A2 13 A1 14 15 16 4 17 A5 18 A6 19 A7 20 A8 21 A9 22 A10 23 A11 24 A12 25 A13 26 A14 27 A15 28 GND 29 GND 30 GND 31 02 32 RAN 33 BD7 34 BD6 35 BD5 36 BD4 37 GND 38 GND 39 GND 40 GND October 1979 5 OMNONMAWNH AD 5 0040nWNc g AD 42 Signal RxData RxCLK CTS TxData TxCLK RTS Mic 05 volt GND AUX 0 5 volt Audio in GND Video out J3 Signal GND RS232 out RS232 in RxData RxData1 RxData2 V in for RS232 inte face unused CTS CTS2 unused unused J4 Signal R1 R7 C1 C2 C3 4 C5 C6 C7 R6 GND Noise MICRO The 6502 Journal latches T
18. TAX Use it as an index to look up note 0204 B5 00 in the note table 0205 8D 06 STA TILL Put low order byte into TILL 020F Transfer X back to to find high order TABLE 0210 18 cle byte which is 24 locations higher 0000 16 4B 80 08 2D 8D F5 0211 69 24 ADC 21 in page zero 0008 66 DF SF E7 75 5 45 0213 AA TAX Back into X to become index to fetch 0010 EB 96 46 FA B2 GE 2F Fe 0214 BS 00 LDA NOTE X high order byte of half period 0018 BA 84 51 21 F 2 70 0216 8 05 AO STA Result into Tl timer latch high Note 50020 58 36 16 OE 00 00 50219 52 LDA DUR Y begins to play Get duration 0028 OB 09 09 08 08 07 0218 FO 24 BEQ CUT If duration is zero end of song 0030 07 07 06 06 05 05 05 021D AA TAX Duration into X to serve as counter 0038 Q Q 04 03 03 03 03 03 021E A9 FF AGN LDA FF Set up T2 for a time period that determines 500 0 02 02 R C2 02 02 02 01 0220 80 08 STA 12 the tempo 0223 9 FF LDA FF 0225 8 09 AO STA 12CH Start the T2 timer DURATION TABLE 0228 A9 20 LDA 20 Test to see if T2 has timed out 0800 O1 O2 OL 08 10 20 10 08 022 2C OD AO BACK BIT IFR Is bit five of the FR set 0808 Q2 O1 02 Q 08 10 20 022D FO FB BEQ EACK No wait for it and play note 0810 10 08 O2 01 02 0 08 022F CA DEX Decrement duration counter until 0818 10 20 40 80 40 20 10 08 0230 DO EC BNE A3N it is zero then note
19. shown the equations To get T this number must be converted to decimal and then multiplied by which in our case is 0 01 seconds THe hexadecimal to decimal conversion algorithm used in CNVD is from Peatman s book Micro computer Based Design while the coding used is from Butterfield s Mode Adder in 6502 User Notes 13 pg 23 Subroutine CNVD also calls a subroutine named AIMDSP This routine displays the contents of locations with addresses 0001 0002 and 0003 namely those locations that contain the time T now in decimal No attempt has been made to locate the decimal point in these subroutines As long as the period Tp if the square wave on is multiple Bf ten 0 01 second for example the user should have no trouble placing his decimal point mentally In any case subroutine AIMDSP is an AIM 65 dependent subroutine that has been published previously so only its 65 mini disassembly format is given here Owners of other microcomputer systems will want to substitute a suitable routine to display the contents October 1979 Aue TO CLOCK INPUT ON THE 7474 FLIP FLOP Figure 5 Stopwatch Interface for the Circuit in Figure 4 The s witch is normally closed To produce a pulse when an event occurs the normally open N O contact is closed momentarily of the three locations mentioned Such routines for the KIM 1 and SYM 1 are readily available The time i
20. 489 560125 11 SHEE 2 20688 Wilis W 28 Wie amp o i12 Wz85228 WC92z8 Wr115221 Wci2 26 40142 11 155 211 MWC125 26 MW C284 MC21271 eed PORE 58 63 24 G SUE 31999 i GOSUE 34939 WTAE 11 GOSUE 21999 i GOSUE 21999 8 2 THE i FOR I 2 TO 23 PRINT TRE 29 IF 1111 THEM PRINT TRE PRINT oU NEXT I PIKE 54 255 PORE 32 1 POKE 22 27 Z4 16 15 22 17 THE 2 FOR 1 1 TO 6 12 6 NEXT I 1 2224 25 26 44 2 67 68 MEF hsz egiz 9 214 115 21 12 29 0145 4 165568 MCI i248 M1290 45193 46 MCh Lad bet had J pl 17 8 2 5 98 1 68 MOSS 9 65 MOSS RLS Midas 5 5422 28 2 54221 5472 50 449 122 4502 25 2 49522 1 4592 15 6 79 ine Nets 36908 WTCL 15 WT 2 106 WT 639224 WT C4 958 WT C zB 69216 72 158 WTC Sos24 WTCSo222 MT 182 726 112 18 WT cizi WTC 21 142 22 WTC 152 36 WTc162213 WTc172 58 MWTC185224 WTCc1S0 26 WTz285 8 i s MTCZzo 38 WTC23 23 WT ted SG NTC2S 3 8 WIGS 72 48 WT C26 9521 WT 29 9 8 TZE A 1939 GOTO 405 TRE 1 PRINT RETURN PRINT PEEK 2 2 PEEK 2 022 25652 4 PEE Candoe PEER 256 END 17 24 MICRO The 6502 Journal October 1979 The COMPUTERIST Has It The leaders in Expansion Accessories for AIM SY
21. A totally new checkbook program with a unique option Bar Graphs These bar graphs outputed to a printer or video screen provide trend analysis data on code expense income expenses or gain loss on a month by month basis The program contains a total of fourteen options 1 Check Deposit Entry amp Modification 2 Reconciliation of Checks or Deposits 3 Sort by Check Number 4 Sort by Code for Year 5 Sort by Code for Month 6 Output Year to Date 7 Output Month Activity 8 11 Printer Video Plot Trend Analysis Bar Graphs 12 Account Status 13 Reconciled Check Status and 14 Quit An excellent program for maintaining your heckbook or that of a small business REQUIREMENTS Disk Il 32K of memory with Applesoft ROM Card or 48K of memory without Applesoft ROM Card FUNCTION GRAPHS AND TRANSFORMATIONS 14 95 This program uses the Apple li high resolution graphics capabilities to draw cletailed graphs of mathematical functions which the user defines in Basic syntax The graphs app ar in a large rectangle whose edges are X and Y scales with values labeled by up to 6 digits Graphs can be superimposed erased drawn as dashed rather than solid curves and transformud The transformations available are reflection about an axis stretching or compressing change of scale and sliding translation The user can alternate between the graphic display and a text display which lists the available commands and the more recent interac
22. GOTO 2 1B6 NOUN1 a HLOCSNELOC gt GOTO 2196 NLOC 4 GOTO 2196 MLOC EcLOCO GOTO 2196 ML C 15 IF L C 3 THEM HL C 8 GOTO 2199 HL C SiLOC GOTO 2196 2 IF L C 8 THEN NLOC 8 GOTO 2196 HLOC W LOC GOTO 21568 HL C 12 IF LOC S THEN NL C 2 GOTO 2156 IF RAFT 1 THEM NLOC RES RHFT amp PL C L C IF THEM LOC NLOC IF NLOC 12 THEN z904 IF 59 55 THEN 2986 IF FLOC 6 THEM Si125 4 IF FLOC 11 THEM 122 GOTO 29868 IF HOUN 3 OR NOUN 16 gt AND ROPE THEN GOTO 147 IF NOUM S THEN 2258 IF LOC S AND L C412 THEN 1878 A IF LOC 5 THEN L C 4 a IF L C 1z THEN LOc 5a GOTO IF NOUN 16 THEN 2286 IF LOC 4 THEN 1879 L C 5 GOTO sean IF VERB G OR VERB 11 THEN 23268 GOTO 2358 IF NUMP THEM 1676 IF NOUN 24 AND LOC 19 CR L Cc 1l8 OR L Cc 5 OR L Cc 18 OF L Cc k LOC 6 L Cz115 THEN 2245 October 1979 MICRO The 6502 Journal 17 19 STREHOLIHS SLOC THEM 1878 S IF H uN 22 Miza 28 THEM id STH MOUN 1 GOTO IF VERB 3 OF VERB 18 OF VERE 14 THEM 2278 248 IF STACNOUND 1 THEM iB 8 STRCHOLM3 0 4 NOUN 23 THEM 2428 VERB 1 THEN STALI 4 GOTO 2428 IF 12 THEM 2988 IF STACNOUM I 41 THEM Lari 2426 FOR 1 TO NUMMEES 4 STEP 2425 IF MOUNSHTZHT THEN 2426 2424 FOR D 2 To 4 2425 IF STR MTCHT4DO3 MOD THEM 2478 244 FOR M 1 TO STEP 18 2445 IF HTZHT4D348M M3 THEN 246
23. Good News Bac News pgs 35 36 news is that only two minor hardware changes improve the high speed cassette read write The KIM read rou ine is also improved new uses for the BREAK conimand are given and now the register name is displayed during the R command Rowe Mike Staff MICRO Software Catalog VIII pgs 37 38 Ele new programs are described Doutr Ben Inside the KIM TTY Service pgs 39 40 How to operate the KIM TTY link at 9600 baud Kirsct ner Frank D The Integer BASIC Token System in the APPLE II pgs 41 43 Hov APPLE stores characters A meaty article showing how to exercise considerably more control over the BASIC inte preter in your microcomputer Carpe ater Chuck Applesoft pgs 45 46 Append and renumber routines Anon Classified Index for Issues 7 to 12 pgs 47 48 Index is broken down by system APPLE OSI General KIM TIM SYM AIM and so on 490 73 12 May 1979 Schm dt Bill and Shattuck Bob Transceive for the 1 pgs 78 82 This program requires a video terminal and AFSK genera tor October 1979 Introducing SEAWEI L s Little Buffered Mother The ultimate Motherboard for any 4 SYM 1 or AIM 65 system Features 4K Static RAM on board Onbocrd hardware for optional use of e 45V 12 12V regulatorson boarda 128 c ddressing limit
24. Right The little sub routine at lines 35000 thru 35010 does a lot to help the wraparound problem It is a human oriented subroutine that prints on the screen using much the same rules we would use with a typewriter Specifically It will break a line at a space comma period colon hyphen or other character you specify If a word is longer than the allowable line it will be hyphenated rather ar bitrarily but this is a small sub routine At your pleasure it will indent the first line of the output This helps increase legibility Four variables control the output for mat They may be entered once at the beginning of a program or they may be changed within the program if required The variables used are CW Column Width This specifies the maximum cotumnar width of your output device and is used for error catching 1 Margin indent on the first line printed M2 Margin indent on subsequent lines Note Left justification 17 5 35000 IF M3 gt OR M M CW THEN PRINT LINE TO L ONG FOR PRINTER PRINT PRINT END REM CHECK FOR LINE LENGTH 35001 LN LEN NS FOR I TO 1 STEP 1 BP MIDS NS I1 1 IF BP OR BP OR BPS n OR BPS S OR BPS OR LN lt M3 Mi THEN 35003 REM FIN D BREAK POINT 35002 NEXT I HTAB M1 PRINT LEFT N M3 Ml 1 PRINT 1 M3 1 GOTO 35004 REM LONG WORD 35003
25. Scotch 5 diskettes 10 53 Verbatim 5 diskettes m 10 27 Cassettes a tapes guaranteed Premium quality high output lownoise in 5 screw housing with labels C 10 10 5 95 50 25 00 100 48 00 C 30 10 7 00 50 30 00 100 57 00 WRITE FOR 6502 AND S 100 PRODUCT LIST 115 B Stump Road AB Computers Montgomeryville PA 18936 215 699 8386 PRESENTS IT S assanan UTILITY I 29252 CHECKBOOK UPDATE TO D EC FILE WRITES Sover YOUR CHECKBOOK PROGRAM TO AUTOMATICALLY UPDATE IT TO DOS INDEX FILE UPDATE AUTOMATES BISHOP S INDEX FILE FIND CONTROL CHARACTER WILL DISPLAY CONTROL CHARACTERS ON ANY CATALOG OR PROGRAM LISTING SLOW LIST FULL STOP amp START CONTROL WITH EXIT WORKS WITH APPLESOFT OR INTEGER BASIC LIST HEADERS PUT HEADERS ON YOUR LISTINGS WITH NO LINE NUMBERS OR REM STATEMENTS II AUTO WRITE AUTO WRITE INSTRUCTIONS USE EXEC FILES TO APPEND ADD SUBROUTINES OR EDIT PROGRAMS CONVERT INTEGER TO APPLE SOFT DELETE ILLEGAL LINE NUMBERS ETC ETC EXEC READER READS TEXT FILES FOR ABOVE DISC SPACE COMPLETELY WRITTEN IN APPLESOFT WORKS IN 3 SECONDS GIVES FREE SECTORS AND BYTES WITH LISTINGS AND DOCUMENTATION PRICE 19 95 acaseaasas DISC MANAGEMENT SYSTEM EIGHT PROGRAMS ON DISK TO PROVIDE THE USER WITH COMPLETE UNDERSTANDING OF THE DISK DRIVE COMMANDS PLUS A UTILITY PACKAGE TO INDEX amp CATAGORIZE ALL PROGRAMS WRITTEN FOR THE APPLE II COMPUTER THE SYSTEM PROVIDES FULL SEARCH EDIT
26. and use Monsters treasures do battle take rewards Secrets to be discovered The obvious method was to tabularize as much data as possible so that similar functions could be implemented as subroutines This left only special handl ing routines to be added The program was organized into five major sections Lines numbered 30xxx initialize the tables and variables Lines numbered 4xxx to 10xxx print out the current location and status for the player Lines numbered 1xxx read and decode the input string Lines in the 2xxx range perform the command ac tion if possible In lines with 3xxx numbers the monsters have an oppor tunity to react to their environment Each of these sections was developed Verb Type Direction 1 GO 1 x 2 JUMP 11 x 3 RUN 1 X 4 WALK 1 X 5 DRIVE 1 X 5 CLIMB 3 DIG 2 8 CARRY 116 9 DROP 116 10 116 11 TAKE 116 12 USE 36 15 8 16 KILL 8 17 STOP 40 18 HIT 8 19 FIGHT 8 20 RUB 16 23 EAT 64 24 BITE 64 17 16 commands Table 1 Sample word tables for the guide The following lists of verbs and nouns are for use if you are having difficulty in communicating with Spelunker Not all of these words have meaning or utility in this adventure didn t want to make it too easy VERBS BITE CARRY CLIMB DIG X DRINK DRIVE DROP EAT FIGHT GO HELP JUMP KILL PUT RUB RUN START STOP TAKE THROW USE WALK WISH NOUNS APPLE BATS BOMB BONES CAVE CHEST CLAM CURSE DOWN
27. as RxData and TxData The 6850 also has two control signais which are not October 1979 used by the cassette interface might be useful to your peripheral hey are designated as RTS and CTS on the schematics Finally there are two separate clocks which drive the 6850 TxCLK anc RxCLK These clocks set the baud rate at which the 6850 operates For precise in forma tion on the 6850 suggest that you get copy of the manufacturer s spec sheet on this ACIA Your dealer shoulc have it mention all of this simply these six signals are present as TTL signals on J2 pins 1 through If your peripheral requires TTL level serial data then you will connect it to these pins But there is more to it than just con necting your peripheral s cable to the right pins on J2 My Superboard came with several parts missing You will need to install a 7417 at 068 and a 71514 at U67 You will also have to instal the 220 and 390 ohm resistors at R38 through R49 Next notice that the RxData and CTS signals coming in on pins 1 and 3 respectively are called RxData3 and CTS3 after they come from U67 hey are then routed to jumper locations W10 the upper W10 to the right of Qz in the Schematic sheet 6 and W11 The reason for this is that you don t want inp ut com ing from two or three different sources going to the 6850 recommend that you install a DP3T double pole three throw switch so that you can swi
28. be sure to ORA 80 or else the hardware cursor will be displayed Don Stein 6012 Chatsworth Lane Bethesda MD 20014 Editor s Note Marvin De Jong demonstrated the use of this subroutine in an earlier issue of MICRO Since however Don Stein independently found it and thinks that it is important enough to point out to other AIM users we are printing his letter Editor s Note If you have some small bit byte of information that you wish to pass on to fellow computerists a short letter to MICRO is one simple way to pass the word DISK DRIVE WOES PRINTER INTERACTION MEMORY LOSS ERRATIC OPERATION DON T BLAME THE SOFTWARE 150 1 7 150 2 ON TAPES OR DISKS PRINT TEXT LETTERS FORMS TABLES TEXTCAST FITS YOUR PET SYSTEM OLD AND NEW ROMS CLEAR INSTRUCTIONS Prices Tape plus manual 60 Diskette plus manual 65 Manual separately 20 Write Cognitive Products P O Box 2592 CHAPEL HILL N C 27514 PET Trademark of Commodore Business Machines Inc October 1979 MICRO The 6502 Journal Power Line Spikes Surges amp Hash could be the culprit Floppies printers memory amp processor often interact Our unique ISOLATORS eliminate equipment interaction AND curb damaging Power Line Spikes Surges and Hash ISOLATOR 150 1 3 filter isolated 3 prong sockets integral Surge Spike Suppression 1875 W Maximum load 1 KW load any socket 54 95 ISOLAT
29. flag is reset and 64 clock cycles later t e timer flag is set again If we write 21 into location A41F instead then tl e timer flag will not be reset until 10 4 clock cycles have elapsed Just as an example let s say we wanted 800 clock cycles to elapse before the timer flag is set We will be reading the flag register period cally to see if it is non zero determine whether the flag gets set and branch on he non zero condition Writing decimal 00 hex 64 into location A41D sets pre divider to 8 then 8 x 100 8 0 ticks later the timer reaches zero and the flag is set While the counter is independently decrementing we can determine the cur rent timer contents at any tme by reading one of these four lo ations A404 A406 41 A41E There four readable locations due to dont care addressing modes or incompl te ad dress decoding One might be tempted to lool at the timer contents occasionally and branch when the count reaches zero This does not offer a good cha ice for Success as the following examole will show MICRO The 6502 Jour Robert A Peck 1276 Riesling Terrace Sunnyvale CA 94087 Let s say we ve written decimal 10 into location A41D 8T so that 80 cycles later the timer will count down to zero Suppose we do the following dur ing the counting period A Increment a memory location B Test timer contents C Branch back if non zero If
30. the caverns Reactions 3000 s The demonic life forces who have been attacked or who do not have their own treasures fight back Based on complex probabilities they either kill steal your treasures or wander the caverns in search of you 2LIST 8 REM SPELUMKER I i GOTO REM TO INITIALIZE PRINT IMPUT LENCINS3 259 GOON I i lant NH UN B VERBE H 1618 GUSUE 1566 G SDB 1666 GUSUE 1766 1 2 IF Wes THEN 191 LASS YTPPS VTP VERE gt IF ZMTTP 23232 HTYP THEN 2 1878 PRINT ICH VERSTEHE NICHT iacB GOTO imas 129 GOTO ze i564 1528 i548 5 5 FOR 1 1 TO LENLIN IF S THEM 1529 IF THEN A588 IF 5 5 THEM thee GOTO 1544 135 THEN 1566 MS CS9 1TNSCT 13 1566 155A 1538 Lene 1616 1788 1714 ZH 2018 262K 2828 z dc 21 zin 242K 2120 214H 2158 2164 2176 2188 219 2191 2192 2133 2194 2225 IF 555 THEN 34 lt 5412 5 5449 RETURN IF NOUM THEN RETURN FOR 1 TO IF HIS4NOUNSSCIAS 4 1453 THEN NEXT J IF J2 NUMN THEN RETURN NOUN J HZ W2 RETURN IF VERE THEN RETURN FOR 1 1 TO IF HZHMERBSECIWS 4 195 THEN NEXT J IF J2 NUMV THEN RETURN ERE J MLIS Hi4 MOVE HL Cz amp IF THEN 2288 IF NOUN MOD 22 1 THEN 2198 IF LOC 14 AND LOCHS THEN 1878
31. 1 latch Load an eight bit number into the high order byte of the T1 latch and clear the T1 interrupt flag Read the contents of the high order byte of the 1 latch Load an eight bit number into the low order byte of the 72 latch Read the contents of the low order byte of the T2 counter and clear the interrupt flag bit five of the IFR Load and eight bit number into the high order byte of the T2 counter transfer the contents of the low order byte in the T2 latch to the low order byte of the T2 counter clear the T2 interrupt flag and start the counting process Read the contents of the high order byte of the T2 counter Bits five six and seven control the modes of T1 and T2 Bit six equal to one signals a time out of the T1 counter timer Bit five equal to one signals a time out of the T2 counter timer MICRO The 6502 Journal 17 29 Figure 3 60 Hz Signal Conditioner for the Low Overhead C ock circuit based on the 555 timer and using only the 5V supply be found in Berlin s 555 Timer Applications Sourcebook pc s 2 13 120 to 157 T C34E 1 T 0 05 seconds for microsecond clock The loop time is between 5 and 13 microseconds longer For many applications this uncertainty will be of no consequence As pointed out earlier the microprocessor need not be idle while the timer is timing out For the particular delay of 0 05 seconds programmed in Table ill a total of 50 000 clock cycles ela
32. 15 Weapon 4 Pit 16 BOMB Weapon 3 Writing 17 CURSE Weapon 15 Bones 18 FIRE Weapon 13 2 Chimney 19 KNIFE Weapon 1 Mouth 20 CLAM Monster 18 Misty Lake 21 BATS Monster 16 Bat 22 BONES Monster 15 Bone 23 GHOST Monster 17 Ghost 24 OGRE Monster 14 Gold 25 CHEST Treasure 16 Bat 26 GOLD Treasure 14 Gold 27 PEARL Treasure 18 Misty Lake 28 LAMP Treasure 12 Ice 29 RAFT Tool 5 South Shore 30 ROPE Tool 9 Frozen River 31 TENT Tool 1 Mouth 32 TRUCK Tool 1 Mouth 33 LIGHT Tool 1 Mouth 34 WATER Food 0 35 APPLE Food 0 36 ICE Water 12 Ice Room Table Room Tunnel Connects Notes N E S W 1 Mouth 50 19 2 Truck Tent Knife Light 2 Tree 1 3 3 Writing 2 10 20 Bomb 4 Pit 20 Ax Use rope to go down 5 South Lake Shore 18 Raft north Rope up 6 West Lake Shore 18 12 Raft east 7 North Lake Shore 9 18 Raft south 8 Maze 8 9 8 20 All 45 s return to Maze 9 Frozen River 7 1 8 Rope 10 Swift River Room 3 11 Raft south 11 Hub 13 14 49 21 15 22 12 SE SW NW 12 Ice 11 6 Ice Lamp 13 Chimney 11 Fire Rope up 14 Gold 11 Gold Ogre 15 Bones 11 Curse Bones 16 Bats 22 Chest Bats 17 Ghost 21 Ghost 18 Moosty Lake 7 5 6 Pear Clam 19 Swift River 1 20 intersect 1 8 3 4 21 Intersect 2 11 22 17 22 Intersect 3 11 16 21 49 Falls Over Death 50 Home End game MICRO The 6502 Journal 17 17 Lots of testing and refinements later SPELUNKER took its maiden voyage Surely a program like this is never finish ed The framework ha
33. 933452434943593 95233444 6908 130 FOR 1 24880 24964 6905 68 PLA 140 REA CLK MAC NEXT CLK 6905 40 RTI 150 REM CLOCK COUNTER LOCATIONS 690E 78 CLOCK SEI 160 REM 6978 27000 HOURS 690F F8 SED 170 REM 6979 27001 KINUTES 6910 18 180 REM 697A 27002 SECONDS 6911 AD 7B 69 LDA FSEC 190 REM 497B 27003 TENTHS 6914 69 01 ADCIM 01 200 REM POKE RESET INTO COUNTER LOCATIONS 6916 8D 7B 69 SIM LESER 210 FOR CL 27000 TO 27003 6919 38 SEC 220 CL O NEXT CL 6914 9 10 SBCIM 50010 230 REM TURN THE CLOCK SUITCH TO QN 691C DO 36 BNE END 240 TzFRINT TURN THE CLOCK SUITCH TO QN 691E 8D 7B 69 STA 5 250 PRESS G RETURN INPUT AS 6921 AD 7A 69 LDA SECS 260 IF 1 lt gt G THEN 250 6924 18 220 REM POKE START INTO CLOCK GATE 4avasasasassas4sess 6925 69 01 ADCIM 280 2 1 6927 80 69 STA SECS 290 PRIIT PRINT CLOCK LED SHOULD NOU BE BLINKING 6924 38 SEC 300 5553535923355434455353534533455325553544353235 544435499 53455434 692B E9 60 SBCIM 0060 350 REM USER S PROGRAM BE INSERTED HERE 92D DO 25 BNE END 400 TO USE CLOCK PEEK AT COUNTER LOCATIONS 692F 8D 7A 69 STA SECS 500 REM 43435525555555555555553255352353452452245324525549 554335545323 5932 AD 79 69 LDA 8999 REI MAC CODE DATA FOR CLOCK ROUTINE s4sas
34. ANO REFRESH COUNTER FOR 16 PIN 16K RAMS THAT REQUIRE 128 CYCLE CONTAINS MEMORY REFRESH COUNTER MULTIPLEXES SYSTEM 14 BIT ADDRESS TO THE 7 AOORESS PINS ory THE RAMS COMPATIBLE WITH 3480 MEMOR CONTROLLER PARTIS GUARANTEED 12 50 EACH MOTOROLA DYNAMIC MEMDRY CONTROLLER MC3480L MEMORY CONTROLLER DESIGNEDTOSIMPLIFY CONTROL OF 16 PIN 4K 16K DYNAMIC RAMS GENERATES RAS CAS ANO REFRESH TIMING SIGNALS FOR 16K TO 64K BYTE MEMORIES GENERATES MEMORY READ WRITE TIMING DIRECT INTERFACE WITH MOTOROLA OR INTEL 3242A ADDRESS MUX AND REFRESH COUNTER PART GUARANTEED 13 95 EACH 6502 64K BYTE RAM AND CONTROLLER SET MAKE 64K BYTE MEMORY FOR YOUR 6800 6502 THIS CHIP SET INCLUDES 32 4116 3 16 1 200 NSEC RAMS 1MC3480 MEMORY CONTROLLER 1MC3242A MEMORY ADDRESS MULTIPLEXER AND COUNTER DATA AND APPLICATION SHEETS PARTS TESTED AND GUARANTEED 325 00 PER SET 2716 450NSEC eie How Do You Connect Peripherals to Your Superboard 11 The OSI Superboard has a wealth of I O ports but often the effective use of them is Left as an exercise for the reader Here is some concise information on the con figuration and use of the ports Since wrote A Close Look at the Superboard MICRO 11 15 received several calls and letters asking for more information concerning inter facing the Superboard to various peripherals printers memory boar
35. AO 0205 A9 4D 0207 8D 06 AO 0204 9 0206 05 020F A9 OF 0211 8D O8 AO 0214 A9 8C 0216 8D O9 AO 0219 A9 20 021B 26 OD AO 021E FO FB 0220 00 START SUA LA SUA LIA SUA LIA SUA LIA EO ACR 4D TILL 63 TILH 9F T2LL 8C T2CH 20 IFR BEQ TEST Load ACR to put 1 in free running mode and T2 in pulse counting mode Initialize T1 timer to run with a period of 2 034D 2 100000 microseconds 0 1 second Start timer toggling PB7 Set up T2 to count 8C9F 1 36000 counts 36000 0 1 1 hour Clear IFR Check interrupt flag register to see if bit five has been set indicating that T2 has counted 36000 pulses Break to the monitor at the end of an hour Start counting Table VII Program to Produce a One Hour Delay MICRO The 6502 Journal October 1979 taves of notes on the equally tempered scale note middle A corresponds to 440 Hz and successive note frequencies are related by a factor equal to the 12th root of two Also listed in Table VIII are the periods in microseconds that is the numbers that must be loaded into the T1 timer to produce the notes Since the period of the square wave is 2 T each of the numbers in the last column of Table Vill should be decremented by two Table VIII Note Table for Producing Tones on the Equally Tempered A program to play songs using the notes in
36. J1 to the KIM connector O course some of the wires won t be usel and so you might be able to pull sorie of the unused wires out and solder th m to the points on the Superboard wher you are going to get the missing signa s The missing signals can be found at the following places R W 1 21 pin 6 as mentioned above 02 on U pin 4 RST on the high non ground side of the BREAK key where the rid 5 volt supply line enters the board VSS any place along the edge of the boerd where the ground plane is SYNC on J8 pin 7 and 01 U8 pin 3 If you need the RDY signal you have to make a ct ange on the Superboard Open the short trace coming from U8 pin 2 which is the line on the 6502 and put 4 71 pull up resistor in the opening you made This will enable any peripheral that needs to use the RDY line to pill it low After installing the resistor you can wire the RDY line to U8 pin 2 There are also RO 55 OUT RAM R W PLL TEST line on the KIM expansion connector but y gt u won t be able to get these from th Super system This is a non line oriented editor that allows upper and lower case letters any width paper and any length page Included features are automatic headings date and page number right hand justification search with universal or individual replacements Text is stored on disk or cassette for easy retrieval Box 3078 Scottsdale AZ 85257 1
37. LOOP L2 L3 Hark Chan P O Box 714 Cambridge MA 02139 ORG LDXIM STAZX DEX BNE STXZ LDAZ SEC SBCIM BCS CLC ADCIM TAX STAZ LDAZX STAZ LDAZ ASLA ASLA CLC ADCZ CLC ADCIM STAZ CLC ADCZ SEC SBCIM BCS CLC ADCIM TAX LDYZX LDAZ STAZX LDXZ STYZX LDAZ CMPIM BEQ 0200 36 00 L1 38 35 34 L2 35 35 00 37 36 36 01 36 35 33 L3 34 00 37 00 35 00 38 00 LOOP 17 41 0010 0020 INTERRUPT SERVICE ROUTINS 0030 0040 02H3 5 LDAZ 3 0050 0245 AY F4 LDYZ F4 0060 0247 A6 F5 LDXZ 5 0070 0249 38 INCZ 38 0080 024B 40 RTI each address is distinct and is between hex 1 to 34 decimal 1 to 52 After the in terrupt key is pressed the content of these addresses represents a deck of random cards The program uses a simple random num ber generator to generate random point ers with values between 1 and 52 The first card in the deck is interchanged with the card selected by the random pointer The position of all the cards is next shifted one place so that the last card becomes the first the first card becomes the second and so on This is to make sure that the first card is always changing and a different card is inter changed with each randomly selected card A random pointer is again generated and the whole operation is repeated After a sufficient number of operations the deck is suitable for ca
38. Rockwell 6500 1 and the Intel 8048 are intended for high volume low cost applications the fact that they include counter timer logic is a testimony to the importance of counter timer functions for a large var iety of applications Several simple ap plications will be explained FLAG REGISTER The techniques will focus on the counter timers found on the 6522 Ver satile Interface Adapter The 6522 is currently popular a number of micro computer systems that utilize the 6502 including the SYM 1 the 65 and the MICRO PLUS Expansion boards such as the MEMORY PLUS also include the 6522 and the 6522 can be easily inter faced to the popular KIM 1 see 6502 User Notes No 13 pg 16 However the techniques that are described will fre quently be applicable to any COUNTER REGISTER CONTROL REGISTER DATA BUS Marvin L De Jong Department of Math and Physics The School of the Ozarks Point Lookout MO 65726 counter timer with only minor modifica tions in the hardware or the programs The basic features included in many counter timers also called interval timers are shown in Figure 1 This block diagram shows that a counter timer con sists of three registers the counter register which is either an 8 bit register or a 16 bit register a flag register and a control register A number N is loaded into the counter register by a WRITE typically an STA instruction If the counter is a 16 bit register then
39. Table VIII is listed in Table IX The identification numbers 1 0 num bers of the notes in the song to be played are stored in a song table star ting at 0400 Actually the song could be stored anywhere in memory that is convenient simply by changing the base address of the song table The base ad dress of the song table is storecl 0050 and 0051 called SONG and SONG 1 respectively Scale I D NUMBER NOTZ FREQUENCY PERIOD 2 Hex Hertz Microseconds 00 130 813 OEEE 01 138 591 0818 02 Do 146 832 0040 05 Df 155 563 OC8E 0 164 814 05 174 614 0B2F 06 F 184 997 0A8F 07 es 195 998 09F7 08 e 207 652 0968 09 220 000 08 1 04 233 082 0861 0 Bo 246 945 807 9 0 middle Cy 261 626 0777 00 277 183 0700 05 D 293 665 0647 0 Ds 311 127 0647 10 E 329 628 05ED 11 Fi 349 228 0598 12 F 369 995 0548 13 391 995 14 5 415 30 SOLBL 15 44 0 000 0470 16 466 164 0431 17 B 493 883 03F4 18 Cy 523 251 03EC 19 Cf 554 365 0386 14 D 587 230 0353 18 D 622 254 0323 1C E 659 255 02F6 1D 698 456 02CC 1 739 989 5024 1F G 783 991 027 20 GE 830 609 02 5 21 2 880 000 0238 22 932 328 0218 23 B 987 767 01FA October 1979 MICRO The 6502 Journal The identification numbers 00 23 found in the song table are used to index a note table found in page zero from 0000
40. X X X x x x October 1979 Cave room structure The map was finalized giving each room a number The interconnections were entered into the N E S and W arrays with a positive number indicating an exit in that direction to the room number specified A series of statements were inserted in order to print out the current room descriptions but at the time only the room name was printed Later discovered that there was not enough memory to put in the complete descrip tions in any event The first of the action routines the MOVE routine was coded next If there was a possible move in the re quested direction the LOC variable was set to the new room and its description was printed This portion was a lot of fun to test and debug Monsters treasures and battles The monsters and treasures were merely noun objects in the caves like all of the other things A relationship was defined between the monster his treasure the player and the player s use of weapons Thus grew up the monster table and the weapons table The monster table identifies the monster determines his strength defines his treasure identifies his home chamber and determines how quickly he moves about the caves The monsters move through the caverns to find their treasures if they are stolen In the table are certain base probability factors for the monster to kill the player steal all the player s treasures or steal only the treasure
41. all data required a check for optional data is made After any optional data is read numbers are changed to hex if need be the maximum and minimum ranges are compared then if ali data is OK the number is stored and DOS returns to check for any other optional data A routine gets the correct address from the stack then executes the com mand have highlighted a few of the commands PR and IN do the same function as in BASIC except that DOS will set the hooks properly before releasing control MON and NOMON set a mask at AA74 as follows 02 monitor nothing 10 monitor 0 20 monitor 1 40 C and combinations thereof MAXFILES resets HIMEM and PP INT BASIC and allocates a file buffer via a subroutine at A7D4 BRUN does a BLOAD then a JMP AA72 MICRO The 6502 Journal William Reynolds 1733 N Ford Street McMinnville OR 97128 RUN does a load then jumps to a routine which executes the program Which routine is used is dependent upon which language is being used BASIC FP RAM or FP ROM LOAD reads the file type and does either INT or FP as needed then loads the program When in FP mode and after the program is loaded DOS does the call 3314 or 54514 as needed to set the program pointers for Applesoft FP attempts to find a ROM card and turn it on If possible it sets the return addresses via a routine at 9084 if no card is found the DOS runs Appiesoft then goes to a routin
42. and X2 Y2 A different pro cedure is used depending whether the slope of the plotted line is nearer the X axis or Y axis Lines 1060 1065 and 1160 1165 store the bit in merrory and are specific to my graphics ooard would be happy to provide a copy of the full program to anyone who is using the OIS 440 board with graphics 1900 IF 1 2 THEN 1100 1010 As Y2 1 X2 X1 1015 IF gt 1 THEN 1100 1020 1 1 0 5 1030 FOR X3 X2 TO X1 STEP SGN X X2 1040 Y3 INT B A X3 1060 M 54272 164Y3 INT X3 8 1065 POKEM PEEK M ORS X3AND7 1070 NEXTX3 RETURN 4100 IF 1 2 THEN RETURN 1110 2 1 2 1 1120 1 1 0 5 1130 FOR Y3 Y2 TO Y 1140 X3 INT B A Y3 STEP SGN Y1 Y2 1160 Ms54272 16 Y3 INT X3 8 1165 POKEM PEEK M ORS X3AND7 1170 NEXTY3 1180 RETURN To Order PRocRaMMen s ToouKir MacaoTeA 15 Programming Fun Have More Fun Make Fewer rrors Complete Programs Much Faster with the BasicPROGRRMMER S ToouHiT Now you can modify polish simplify add new features to your PET pro grams far more quickly while reducing the potential for error That all adds up to more fun and the BASIC Programmer s Toolkit The magic of the ToolKit 2KB of ROM firmware on a single chip with a collection of machine language pro grams available to you from the time you turn on your PET to the time you shut if off No tapes to load or to
43. be expanded to 32K RAM dual mini floppies and a printer C2 4P M F 1 533 It s a big personal computing mini floppy system at a special package price Contains the famous C2 4P microcomputer with 20K static RAM 5 mini floppy unit for instant program and data loading RS 232 circuitry for optional modem and printer and diskettes featuring exciting games personal business and education applications C2 8P DF 2599 l A full business system avail C2 8P 799 The personal class computer that able at a personal computer price The system includes the can be expanded to a fuil business system Has all the powerful C2 8P microcomputer 32K RAM expandable to features of the C2 4P plus an 48K dual 8 floppy unit stores 8 times as much information 8slot BUS 3 times greater asamini floppy and3 disks of personal educational and expansion ability than the small business applications software Has all the capa C2 4P Can be expanded to 48K bilities of a personal system including graphics plus RAM dual floppies hard disk the ability to perform Accounting Information Manage printer and business software ment and Word Processing tasks for smail business I m interested in OSI Computers Send me information on Personal Small Business Computers Educational Systems CJ Industrial Development Systems l Name Address 1 city COMPUTERSHOP Boston Union Camb
44. each additional item Programs accepted for publication Highest royalty paid Integer to Applesoft conversion Encounter only those syntax errors unique to Applesoft after using this program to convert any Integer BASIC source Disk Append Merge any two Integer BASIC sources into a single program on disk Integer BASIC copy Replicate an Integer BASIC program from one disk to another as often as required with a single keystroke Applesoft Update Modify Applesoft on the disk to elimin ate the heading always produced when it is first run Binary Copy Automatically determines the length and starting address of a program while copying its binary file from one disk to another in response to a single key Stroke 9 95 BLOCKADE lets two players compete by building walls to obstruct each other An exciting game written in integer BASIC by Vince Corsetti 9 95 TABLE GENERATOR forms shape tables with ease from direc tional vectors and adds additional information such as star ting address length and position of each shape Murray Sum mers Applesoft program will save the shape table anywhere in usable memory 9 95 OTHELLO may be played by one or two players and is similar to chess in strategy Once a piece has been played its color may be reversed many times and there are also sudden reverses of luck You can win with a single move Vince Corset 175 program does all the work of keeping board details and flipping p
45. ending of the program The pro gram is relocatable and the two portions can be in separate locations This feature makes it easy to incorporate the shuffling program into a complete card playing program However it is im portant that the user initialize the inter rupt vectors to jump to the interrupt ser vice routine To keep the computer code relocatable the initialization of the 2 byte address is left to the user The storage area for the cards together with 4 bytes of working space are in page O In this program the Storage area starts at address 0001 However the program can be changed easily to move the storage area to other locations in page O The deck of cards is stored in an array at locations hex 0001 to 0034 The value of October 1979 0120 0200 0130 0200 A2 0140 0202 8A 0150 0203 95 0160 0205 CA 0170 0206 DO 0180 0208 86 0190 020A A5 0200 020C 38 0210 020D 9 0220 020F BO 0230 0211 18 0240 0212 69 0250 0214 AA 0260 0215 85 0270 0217 5 0280 0219 85 0290 021B A5 0300 0210 OA 0310 021E OA 0320 O21F 18 0330 0220 65 0340 0222 18 0350 0223 69 0360 0225 85 0370 0227 18 0380 0228 65 0390 022A 38 0400 022B E9 0410 022D BO 0420 022F 18 0430 0230 69 0440 0232 AA 0450 0233 B4 0460 0235 5 0470 0237 95 0480 0239 0490 023B 94 0500 023D 5 0510 023 9 0520 0241 MICRO The 6502 Journal 29 34 FB 35 00 21 36 L1
46. illustrate how the timers can be used to generate interrupt requests IRQs we have chosen to describe a simple 24 hour clock that requires very little computer time overhead The 60 Hz power line frequency is suf ficiently stable over long periods for many clocks Somewhere in your micro computer system you will probably be able to locate a low voltage 60 Hz source This is conditioned by the circuit shown in Figure 3 to produce a 60 Hz square wave and the output is applied to PB6 to be counted Clearly there are 3600 0E10 such pulses in a minute The T2 counter timer will be program med to count 3600 pulses followed by an interrupt request The interrupt routine increments one location in memory to keep track of minutes and when this location reaches 60 another location is incremented to keep track of the hours At the beginning of the interrupt routine the T2 counter timer is reloaded with 3600 for the next period The program is listed in Table IV The first two instructions set bit five of the ACR to logic one Next the timer is load ed with 0EOF Note that 0EOF 1 3600 The LDA A0 and STA IER instruc tions enable interrupts from bit five of the interrupt flag register IFR of the 6522 to the 6502 microprocessor s IRQ pin a connection that is usually internal to the microcomputer system To enable interrupt request signals from T2 bit five of the IER interrupt enable register must be set to logic one
47. interfere with any running programs And the Programmer s ToolKit installs in minutes without tools Here are the 10 commands that can be yours instantly and automatically guaranteed to make your BASIC programming a pleasure AUTO RENUMBER DELETE HELP TRACE STEP OFF APPEND DUMP FIND Every one a powerful command to insure more effective programming Like the HELP command that shows the line on which the error occurs and the erroneous portion is indicated in reverse video HELP 500 J SQR A TCU READY Or the TRACE command that lets you see the sequence in which your program is being executed in a window in the upper corner of your CRT custom designed to plug into your PET So when ordering please indicate if your oolkit will be used with the Skyles Memory Expansion System or Will be used with the ExpandaPet or Expandmem Will be used with the PET 2001 8 alone We furnish connectors to the memory expansion bus and to the second cassette interface Will be used with the PET 2001 16 32 chip only Will be used with Skyles MacroTeA The prog anon ToolKit is a product of Harry Saal and his associates at Palo Alto ICs So if you really want to be into BASIC programming and you want to have fun while you re doing it order your BASIC Programmer s Toolkit now We guarantee you ll be de lighted with it 80 00 80 00 80 00 550 00
48. is finished 0820 O2 O1 01 00 0232 E6 50 INC SONG Get another note from the song table 0234 DO 02 BNE PAST If song is zero then get the next note from 0236 E6 51 INC SONG 1 next page of song table 0238 6 52 PAST INC DIR Get another duration from the table SONG TABLE Plays scale 0234 DO 02 BNE 50400 00 01 02 03 0 05 06 07 0236 E 53 INC DIR 1 50408 08 09 CA OB OD OE OF 023E LC 0702 THERE JMP MORE Play this note 0410 10 11 12 13 14 15 16 17 0241 A9 00 OUT LDA 20 Clear the ACR to finish playing notes 50418 18 19 1 1B 1C 1D 1E 1F 0243 8D OB AO STA ACR 0420 2021 22 23 0246 00 Jump to the monitor when finished INPUT TIMING PULSES Figure 4 Circuit to measure the tine interval T between two successive pulses Table X Program to Measure the Time Between Two Pulses C200 9 0202 020 50206 0208 0204 0200 0210 0213 0216 0218 0218 4210 0220 0222 0225 0227 022 0226 022 0232 0235 0238 023 0230 023F 0212 85 85 85 A9 8D CE EE A9 9 A9 8D A9 8 9 8 AD AD 29 FC 20 CE EE 00 ol 03 01 Q2 A0 00 AO 00 00 AO 10 oc AO EO 08 06 AO 05 AQ FF 08 AO 09 00 AO QD 0 10 F9 00 03 00 00 AO 0245 4C 24 02 SUBROUTINE CNVD 0300 0301 0303 0305 0308 0304 03CD 030F 0310 0312 0314 0316 0318 0314 031C 031E O31F 0321 0322 0
49. its free running mode to toggle PB7 and PB7 can be used to drive an amplifier If the frequency is in the audible range then a tone will be heard A series of tones may make up a song Table VIII lists the fre quencies necessary to produce three oc 17 34 T TIMING PULSE UAL Figure 6 Circuit to measure the t me duration of a positive pulse The CB1 pin must be programmed to produce an interrupt on the negative transition of the pulse by loading PCR4 with a zero Change the byte at 0217 from 10 to 00 in the listing in Table X to accomplish 0200 A9 CO 0202 8D OB AO 0205 A9 4D 0207 8D 06 AO 020A A9 00 020C 8D 05 020F OF 02 this START LDA 20 STA 105 LDA 54D STA 11 LDA 00 STA LOOP JMP JOOP Set bits seven and six of the ACR putting the T1 timer in its free running mode with a square wave output on PB7 Let 0040 160 microseconds Start timer Dummy loop simulates remainder of program 2 50 microseconds Table V Program to Produce a Square Wave Output on PB7 FREQUENCY PERIOD N 2 N f Decimal 10 Hz 0 10 50000 0350 34 100 Hz 0 01 sec 5000 1388 1386 1000 Hz 1 00 ms 500 0124 0122 10 kHz 10 ms 50 0032 0030 100 kHz C Ol ms 2 0005 0003 250 kHz 4 00 us 0002 0000 Table VI Table for Producing Various Square Wave Frequencies 0200 A9 EO 0202 8D OB
50. locations are required to store a number as large as 65536 These three memory locations have addresses 0001 through 0003 in the program shown in Table X and they are used to store the decimal equivalent of the count made by the T2 counter timer The initialization steps display registers cleared flip flop preset timers loaded control registers Set etc require the first 34 bytes in the program After that the interrupt flag register IFR is watched to see when a positive transition on CB1 occurs When it does a jump to the conversion subroutine CNVD occurs The function of the conversion subroutine is to convert the contents of the T2 counter timer registers to an ac tual count in decimal This count represents the number of periods of the square wave on PB7 that have occurred between the events being timed The program in Table X uses a square wave whose period is 0 01 seconds thus the 17 38 INTERRUPT ROUTINE 0200 78 SEI O201 A9 LDA A0 0203 8D STA AOOE 0206 A9 LDA 0208 8D STA 0208 A9 LDA 4D O20D STA AOO 0210 A9 LDA 03 0212 8D STA A005 0215 A9 LDA 57 0217 80 STA A008 021 A9 LDA 02 0216 8D STA 009 Q21F 58 0220 4C JMP 0220 0300 A9 02 0302 8D STA A009 0305 18 CIC 0306 F8 SED 0307 A5 LDA 00 0309 69 ADC 01 0308 85 STA 00 030D C9 60 O30F DO BNE 0224 0311 A9 LDA 00 0313 85 STA 00 0315 18 CIC 0316 A5 LDA 01 0318 69 ADC 01 031A 85 STA 01 031C
51. number into the song table It should take another keyboard entry for the time value of the note and place it in the dura tion table With several 6522s you could play four part harmony With a D A con verter and a voltage controlled amplifier you couid also control the note envelopes giving an elementary syn thesizer For my interface circuit used the 7404 inverter connected to PB7 The out put from the 7404 was connected to one lead of a 1 inch speaker and the other lead was connected to 5 volts Better interfacing circuits to drive speakers have appeared in various articles and books see Caxton Foster s Programm ing a Microcomputer Measuring the Time Between Events A number of applications require that the time between two successive events be measured The events might be the start and finish of a race the arrival of cosmic rays two heartbeats of an animal and many others If the events are periodic then the time between events can be obtained by first measur ing the frequency of the events with a 17 35 Table IX Program to Play a Song 0050 SONG SONG 00 0200 A9 CO START LDA SCO Initialize ACR to put 1 in free running 0051 SONG 1 50 1 0202 8D OB AO STA ACR mode 0052 DUR DUR 00 0205 00 LDY 00 Indirect indexed mode with index 0 0053 DUR 1 DUR 1 08 0207 B1 50 MORE LDA SONG Y Get note I D from song table 0000 NOTE See Note Table 0209
52. o 33333132 TEAM STANDINGS Ji n Literal next n lines are text AMERICANS 0 2 al n Line length including indent is n TEES en 15 Setline spacing to n bo EaSt t CENTRAL 2 WEST 3 g to 4 P ml n Top spacing including head title P ER ons m2 n Spacing after heading title 5 4 m3 n Spacing before foot title E ot TATSI Y N gt 2 44 m4 n Bottom spacing including foot title Stop adjusting right margins nf Stop filling output lines STAR FOOTBALL PREDICTIONS 19 95 length is lines BATTLESTAR I 15 95 2 Begin paragraphe sp fi ti n Sp Space down n lines except at top Temporary indent of n nut an 2 Ife ul Underline next n input lines anne Pun Ail orders include 396 postage and handling Apple il is a registered trademark of Apple Computer Inc California residents add 696 Sales Tax STATE CAPITALS 9 95 VISA amp MASTERCHARGE accepted LUNAR LANDER 9 95 PROGRAMMA INTERNATIONAL Inc 3400 Wilshire Blvd Los Angeles CA 90010 213 384 0579 384 1116 384 1117 COPYRIGHT lt C gt 1979 SPEEDWAY 15 95 JOY STICK 49 95 Dealer Inquiries Invited EXPAND A PORT 49 95 G323npoacg auemMma3jos Spelunker Spelunker is not for the faint of heart It presents many interesting and useful programming techniques in the pleasant format of
53. oe CHE AL CURSE IF THEM KP 6B SRP CMCMEE 2 98 OM CM 4 21 22 28M CHO TOR CURE E IF SHF27B THEN SRF 7 OHIE 4 1 29 HZ MATO LOUISE IF SRP288 THEN lt PRINT ATTACK MDUNSSECMCHO ds METIE 3 Ris PND 3 BND 100 F3 END 106 G IF EP2Ei THEN 2928 IF SHP2 RZ THEN 3948 IF STHEIM Me1234 1 THEM RETURN IF THEN 2360 5 RETURN 5 STROMEM L FSM CM E RETURN 22 1 PRINT THE NOUNSECCHCMO 24544 KILLED YOU PRINT EL FOR TO IF NT P ISG21 amp AND STAC i THEN I PRINT ALL YOUR REWARDS STOLEN PRINT SAP RS 959 GOTO z944 A PRINT HE TOOK HIS VRLLURELE FRINT RS 3 GOTO REM OUTPUT 2 FOR To 9 WTAE I TRE 2 PRINT NEST I 4056 IF LOC OF L C2 24 THEM GOTO 4651 4 GoTo See Laer 56 62 THE 2 PRINT LOCH PORE 58 255 PRINT RETURN tel dad tel p 1 4096 zz TRE i 4495 IF LIGHT 1 OF OF L C i129 THEN Site a2 FRINT IT 15 VERY DARK a3 GOTO S168 L Ccf M DLTH GOSUB 4979 aa GOTO 4698 na LOCS TREE ROOM GOSUB 4n GOTO L Cc WeITIMG ROOM GUSUB 4870 j GOTO 3 L CS PIT GOSUB darn GOTO 42 L cf Z llTH GOSUE 4474 GOTO 445
54. rental commercial investments b Generation of complete amorization schedules consistent with banking practices and schedules c Generation of depreciation schedules for selecting the best depreciation schedule for your use and a determination of optimal switch over points to straight line to maximize depreciation All three features iire designed for video screen or printer output In addition the program will plot cash flow before taxes vs years cash flow after taxes vs years adjusted basis vs years capital gains vs years pre tax pro ceeds vs years post tax proceeds vs years and return on investment vs years RECUIREMENTS Applesoft 11 16K of memory without DOS or 32K of memory with DOS Disk 11 ADDRESS FILE GENERATOR 19 95 A professional piece of software which allows the user to create four different types of address files a Holiday File b Birthday File c Home Address File and d Commercial Address File The program contains a menu f seven major commands 1 Create a File 2 Add to File 3 Edit File 4 Display File 5 Search File 6 Sort File and 7 Reorganize File Most of the major commands have subordinate commands which adds to the flexibility of this powerful software system We doubt you could buy a better program for maintaining and printing address files REQUIREMENTS Disk Apple Printer Card 32K of memory with Applesoft ROM Card or 48K of memory without Applesoft ROM Card SUPER CHECKBOOK 19 95
55. the ACIA status register to register X and lines 0330 033E cause a branch if bit 7 is set indicating that the ACIA did interrupt the CPU and has a byte to transfer Otherwise lines 0341 transfer PET to the ROM in terrupt sequence Lines 0342 0344 transfer a data byte from the ACIA to register and line 0345 clears the CPU interrupt to allow for other interrupts Lines 0346 0347 strip the parity bit from the data byte and line 0348 transfers it to register X for temporary storage 17 12 10K 10K 15K 184143 12 Figure 1 Next to erase the cursor lines 0349 034A load A with 20 note that CHR 32 is a blank Lines 034B 034D get the current position of the cursor on the video line and lines O34E 034F then clear the cursor To type the character line 0350 retrieves the data byte from register X and stores it in register A and lines 0351 0353 then types the character in the next print position To set the cursor lines 0354 0355 load register A with 0 rote that CHR 160 reverse blank lines 0356 0358 get the current position of the cursor on the video line and lines 0359 035A then set the cursor Lines 0358 0350 then transfer con trol back to the PET interrup routine Back in the BASIC program line 115 POKEs 3 into the ACIA control register which then resets the ACIA Line 120 sets the lower case letter mode and then lines 120 180 print inst
56. to 0047 The note table contains the half periods of the frequencies found in the fourth column of Table VIII corrected for the fact that the half period is 2 T rather than The low order bytes of the half periods are found from 0000 to 0023 in the note table while the high order bytes are found from 0024 to 0047 The program first locates an iden tification number for a note from the song table it then loads the latches on the T1 timer with the correct half period and the note begins to play The dura tion of the note is determined by a number found in the duration table call ed DUR and located from 0800 upward There must be one duration number for each note The duration of a note is basically the number of times the T2 timer is allowed to time out If 01 represents a sixteenth note then 02 is an eighth note 04 is a quarter note 08 a half note and 10 whole note The tempo may be changed by changing the bytes loaded into the T2 timer at loca tions 021E through 0227 in the pro gram listed in Table IX The song table given in Table IX simp ly plays the three octave scale from Table VIII with a variety of durations as indicated by the duration table You are invited to make your own song or translate someone else s song into 1 0 numbers Better yet write a song inter preter that does the translation for you Your interpreter should take a keyboard entry for a note and place the 1 0
57. two write instructions are required In 6502 CLOCK Figure 1 Block Diagram of a Typical Counter Timer October 1979 MICRO The 6502 Journal 17 27 systems these registers are simply some of the 65536 memory locations After N is loaded into the counter it is decremented at a rate determined by the clock signal connected to the counter When N decrements through zero one of the bits in the flag register is set to logic one Thus the contents of the counter register change as follows N N 1 2 2 1 0 and on the next clock cycle the flag is set Consequently it ac tually takes 1 clock cycles to time out This summarizes the fundamentals of the counting timing process The control register is used to select one of several modes available to the programmer For example in one mode the contents of the counter register are decremented at the same rate as the system clock while in another mode pulses on an external pin cause the counter to decrement and in a third mode the counter is automatically reloaded after each time out The modes available with a 6522 will be discussed in more detail below The 6522 Interval Timers The 6522 Versatile Interface Adapter is a complex integrated circuit that in cludes two eight bit ports four pins associated with handshaking signals for these two I O ports and two interval timers The ports and handshaking pins will only be of incidental interes
58. up the March 79 issue of and was micro intrigued by John Sherburne article on The Skyles MacroTeA is a warm start button Over 1700 bytes of protected RAM memory for your object code Theres no tape loading and no occupying of valuable RAM memory space The Skyles MacroTeA puts 10K bytes of executable machine language code in ROM from 9800 to BFFF directly below the BASIC interpreter 2K bytes of RAM 9000 to 97FF Like all Skyles Products for the PET it s practically plug in and go No tools are needed And faster than loading an ASSEMBLE LIST equivalent size assembler editor from tape the MacroTeA is 0100 MOVE TBL 1 TO installed permanently 0110 BA 0400 A 0120 LOOP LDY The Skyles MacroTeA 13 chips on a single PCB Operates 040 B9 0130 LDA interfaced with the PET s parallel address and data bus or with 0405 89 0140 the Skyles Memory Connector When ordering indicate if the 0408 C8 0150 INY MacroTeA will interface with a Skyles Memory Expansion 0408 DO 0160 BNE System You can save 20 Specifications and engineering are 0170 up to the proven Skyles quality standards Fully warranted for 90 040B 0180 09 days And as with all Skyles products fully and intelligently 050B 0190 0 documented 0200 0210 VISA Mastercharge orders call 800 227 8398 Except Calif California orders please call 415 494 1210 LABEL FILE 1 EXTERNAL Skyles Electric Works ST
59. used will depend on the microcomputer system and previously written clock programs have included suitable display routines To summarize the operation of the T2 counter timer on the 6522 we conclude this section with the following state ments Todecrement the 16 bit number in the T2 counter at the system clock rate clear bit five of tt e ACR Todecrement the 16 bi number in the T2 counter using external pulses applied to PB pin 6 of Port B set bit five of ihe ACR e To produce an interrt pt request IRQ when the courter decre ments through zero in wither of its modes set bits five ar d seven of the IER To disable the interrupt feature set bit five of the IER a 1d clear bit seven of the IER e A system RESET disables the pulse counting mode the in terrupt request feature clearing all the registers of the 3522 Table IV Low Overhead 24 hour Clock 0200 A9 20 MAIN LDA 20 0202 8D OB AO STA ACR 0205 A9 OF IDA 0F 0207 8D 08 AO STA T2LL 0204 A9 LDA 0 0206 8D 09 STA T2CH 020F A9 AO LDA A0 0211 8D CE AO STA IER 0214 58 CLI 0215 4C 15 Q2 HERE JMP HERE Put T2 in its pulse courting mode by setting bit five to logic one Set up T2 to count 3600 pulses Set up interrupt enable register to permit IRQ from T2 Allow 6502 to accept IRC signals Loop here between interrupts INTERRUPT ROUTINE 0300 9 OB LDA 0 0302 8D 09 AO STA T2CH 0305 18 CIC 0306
60. 0 REM M3 IS THE NUMBER OF CHAR ACTERS PER LINE TO BE DIS PLAYED 91 REM October 1979 output of your sophisticated program your guests saw HI THANKS FOR ANSWERING THE QUESTIONS S WELL AS YOU DID RICK I CAN S ATE THA T YOU SHOULD LIVE 55 215677 MORE YEARS A ND HAVE 2 15662 CHILDREN Now you and know that screen wraparound is a fact of life Perhaps the program concatinated a bit Or possibly it was adapted from ar article written by some thoughtless autt or with 64 column screen or 80 column printer In either case you probably will soon tire of explaining that nothing is 100 N THIS IS AN EXAMPLE OF A LONG SENTENCE THAT COULD CO ME EITHER FROM A PROCRAM WRI TTEN FOR A 64 OR 80 COLUMN S CREEN OR PRINTER OR FROM ON E THAT CONCATINATES 3UPERC ALIFRAGALISTICEXPIALIDOCIOUS NO 110 5 M2 1 M3 40 CW 40 120 HOME PRINT PRINTOUT ST RING N AS IT WOULD NOR LLY BE PRINTED FROM PROGRA Mi PRINT PRINT RINT PRINT 130 PRINT NICER PRINTOUT O STR ING N PRINT GOSUB 3500 0 PRINT PRINT 140 PRINT NICER PRINTOUT O STR ING N ON LEFT HALF OF C OLUMN PRINT 1 3 42 1 M3 20 GOSUB 3500 RINT PRINT 150 END MICRO The 6502 Journal Rick Connoliy 41 Roland Drive Bullwin MO 63011 wrong with your magic machine it just prints funny sometimes This is the wrong approach We don t adapt to the computer s idiosyncrasies it adapts to ours
61. 02 Chelmsford 01824 Please include oid label or your subscription number 17 60 MICRO The 6502 Jot rnal October 1979 6502 Bibliography Part XIII Dr William R Dial 438 Roslyn Avenue Akron OH 44320 478 The Cider Press 2 No 1 April 1979 Scribblemonger John FORTH Ver 1 6 pg 1 Forth for the APPLE is 20 times faster than BASIC Silverman Ken Computer Terms pg 2 APPLE terms defined and explained Nareff Max J Max your APPLE pg 2 Another in a series of articles designed to simulate the various MAtriX functions on the APPLE Larsen Leroy W Still another BSTAT pg 2 This BSTAT offers choice of hex or decimal and gives you CATALOG so you can enter the name of the program exactly with the cursor and save the program with another cursor move on the APPLE Bernard Phil Storing Strings on Tape or Is Disk Necessary pg 3 Anon Disk of the Month pg 3 Twenty five programs on disk Vrooman Gerry The APPLE Il Memory Map De Fogger pg 4 Explanation of where various functions are in memory Rahl Robert R N N N N N N N N N pg 6 Another version of the Hello program for the APPLE disk combining a few new gimmicks 479 Byte 4 No 4 April 1979 Campbell Richard Cross Pollinating the APPLE II pgs 20 25 A seria port based on an Intel 8251 with RS 232 output Zimmerman Mark Simulating Physical Systems The Two Dimensional Id
62. 060 85 E6 JMP 685 JUMP TO PET INTERRUPT second cassette port 0070 0342 AD F7 BF LDA BFF7 GET BYTE FROM 0080 E 2 CLI CLEAR INTERRUPT FLAG Gestion ANDIM 7F STRIP OFF PARITY BIT s 0100 0348 There are lots of software questions 2122 SEA a 20 see BLANK L 00 2 GET CURSOR POSITION ON LINE have not answered For example how 0130 034D 91 EO STAIY EO CLEAR CURSOR can a program be copied directly from 0140 O34F 8A TXA RETRIEVE THE BYTE FROM X the cassette to the modem How cana 0150 0350 20 D2 FF JSR FFD2 IT AS A CHARACTER program or data file be saved by sen 0160 0353 9 AO LDAIM 40 CHR 160 REVERSE BLANK ding it to the storage facilities at the 0170 0355 A E2 LDY 00E2 CURSOR POSITION ON LINE other end of the line and how can it be 0180 0357 91 EO STAIY 0 CURSOR retrieved later With the exception of 91302 0359 85 E6 JMP 685 JUMP TO PET INTERRUPT displaying more characters what can an 7 expensive smart terminal do that PET Figure 3 can t do As stated earlier this article is merely a start References 3 Peripheral Interfacing by Rod Hallen KILOBAUD Microcomputing June 1979 2 CMOS Cookbook by Don Lancaster Howard W Sams and Company In corporated 1 An Introduction to Microcomputers Volume ll by Osborn Jacobson and Kane Adam Osborne and Associates Incorporated October 1
63. 324 0327 0329 0328 032D 032F 38 AS ED 85 Ag ED 85 F8 0 06 26 A2 B5 75 95 E8 20 88 FF 09 A0 11 FF 08 AO 10 PPRHdEGSS T7 DO EE 20 Ag 85 85 85 60 40 03 00 01 02 03 October 1979 START NEXT TEST CNVD MORE LDA STA STA STA LDA STA STA DEC INC LDA STA LDA STA STA LDA STA LDA STA STA LDA JSR DEC INC JMP SEC LDA SBC STA SBC STA SED LDY ASL ROL LDA ADC STA DEY ENE JSR LDA STA STA STA RIS 00 LEAST MIDST MOST 01 FF T2CH CNTHI T2CL CNTLO 10 CNTLO CNTHI FD DAT X DAT X DAT X AGIN MORE AIMDSP 00 LEAST MIDST MOST Clear display registers Least significant byte of time Middle byte Most significant byte of time Initialize PBZ to be an output pir Initialize PBZ to logic one then toggle it to preset the 7474 flip flop Set bit four of the peripheral control register PCR to set interrupt flag on a positive transition on pin CBl T1 in free running mode 2 counts pulses Set period of square wave on PB7 so that 0 01 second 1386 2 5000 so f 100 Hz 0 013 Start square wave running Set up pulse counter T2 to start at FFFF Start counting pulses when the event pulse clocks the 7474 flip flop Clear flag Read the interrupt flag register Mask all except IFR Wait until flag is set then timing is finished so convert the answer to
64. 5 5 1 14005 5 248 J J 19 MOD 4 IF J THEN 3266 PRINT 2 366 NEXT I 13 2 FOR 1 1 TO 12 PRINT ii NEXT I 19 12 TRE 2 PRINT POSSESSIONS NUMP FUR 1 1 TO HUMN 1i IF THEN 3488 44 PRINT 6 1 12 544 Den 5 9458 1 IF NUMP 4 THEN 14 S498 NEXT I 3966 TAR 23 TAB 1 GOTO i868 36086 INITIALIZE ROUTINE 1 DIM IN CAA NOLINS C2320 VERBSS 2599 W1 0D 2 052 WASD NTYP 583 STALIG DIM NCSA ECA 55562 W50 38020 TEXT CALL 926 DIM L CsC265 SPECII P SS C185 19058 d JAAA NUMM G S866 DIM WTZS NUMW zara LOCAL 26166 REM INITIALIZE VARIABLES 20101 REM SHOULD BE READ AND STMTS 26116 LENS NOUNSS 12 SE 5 SW H H4 GOWN LEMCMOUME 32 15 2 CRVE LAKE RIVERTREE NOUNS LENCHOLNSE 2 12 RX BOMB CURSEFIRE NOUNS LEMZH UNSf 5 15 CLRM BATS BONESGHOSTOGRE A NOUNS LENCNQUNS 1 9 CHESTGULG PERKLLRMP NOUNS lt LENO NOQUNSS gt 4 19 RAFT ROPE TENT TRUCELIGHT HINSE LENCNOUNS 544 9 WATERAPPLEICE NOUNS LENG NCOUINES 2 1 esee 4129 HUBMN IT VERBS LENCVERBS 94 49 60 JUMP RUN HALK DEIYECLIME VERBS 6 LEMCVERBS 54 49 01G 23H WERBS LENCVERESiO 12 CRRETDRDP PUT USE WISH THRO VERBS LEMCZVERBESS O 13 HELP KILL STOP HIT FIGHT H VERBS LEHZVER
65. 5 BASIC SOCIOLOCY CX6013 AUTO MECHANICS ppe CX6006 COUNSELING PROCEDURES CX6014 PRINCIPLES OF ECONOMICS October Delivery November Detivery CX6007 PRINCIPLES OF ACCOUNTING CX6015 SPELLING CX6008 PHYSICS CX6016 BASIC ELECTRICITY 2 2 CX6017 BASIC ALGEBRA Prices subject to change COMPUTER COMPONENTS O i ORANGE COUNTY 6791 Westminster Ave Westminster 9268 714 891 2584 Telex 182274 Hours Tues Fri 11 00 AM to 8 00 PM Sat 10 00 AM to 6 00 PM Sun 12 00 to 4 00 PM Closed Mon Master Charge Visa B of A are accepted Allow 2 wqeks for personal check to clear Add 2 00 for handling and postage For computer syst ms please add 10 00 for shipping handling and insurance California add 6 Sales Tax MAIL ORDER LINE 714 891 2587 OrJTELEX 182274 VAN NUYS BURBANK LAWNDALE ORANGE COUNTY IRVINE 213 786 7411 213 848 5521 213 370 4842 714 891 2584 714 891 2589 Mas ue In Southern California We re Number One COMPUTER COMPONENTS OF ORANGE COUNTY your full support computer store presents the finest in personal computers Send for our 36 page fully illustrated catalog 5392 Save 50 by sending the top one inch of this ad with your order AN INDUSTRY STANDARD computer SPECIAL 13 Color TV Apple Plus compatible with 16K F with Apple II 1195 PAL only 999 with system purchase Apple Il or APPLE II will change the way you think about computers
66. 550 00 Your MacroTeA Custom designed for your PET So specify your PET model when orde ing 395 00 Important Savings If it s to be used with a Skyles Memory Expansion System the croTeA can plug directly into the Skyles connector So you save 20 The Skyles MacroTeA is c niy 375 00 when interfaced with the Skyles Memory Expansion System Send your check or money order to Skyles Electric Wcrks VISA Mastercharge orders may call 800 227 8398 California residents please phone 415 494 12 0 Day Unconditional Money Back Guarantee on all products id by Skyles Electric Works except chip only California residents please add 6 6 California sales tax Skyles Electric Works 10301 Stonydale Drive upertino CA 95014 408 735 7891 CONNECTICUT microCOMPUTER Inc 150 ROAD BROOKFIELD CONNECTICUT 06804 DAMI SYSTEMS TEL 203 775 9659 TWX 710 456 0052 SENSORS TEMPERATURE VELOCITY lt Y PETMOD RS 232 X PRINTER Bo PET INTERFACE KIMMOD 2 RS 232 INTERFACE MODULE KiM INTERFACE GPIB TRS 80 MOD GPIB IEEE 488 TRS 80 INTERFACE INTERFACE MODULE POWER MANUAL AND ETC DISPLAY MODULE PRESSURE edb e pH e ACCELERATION HUMIDITY LIGHT LEVEL FLUID LEVEL ANALOG DAM SYSTEMS by A complete system of modules to let you computer listen to the real world DAM SY
67. 7 is the number loaded ihto T1 and is the system clock period Refer again to Figure 4 When the se cond pulse occurs the Q output of the 7474 flip flop makes a transition to logic one This also signals the conclusion of the timing interval If Q is connected to CB1 the 6522 can be programmed to set a flag in the IFR when the logic zero to logic one transition on CB1 occurs At this time the T2 counter timer can be read the result converted to decimal 17 37 APPENDIX A LOW OVERHEAD CLOCK MODIFICATION SUBROUTINE AIMDSP 0340 A5 LDA 01 0342 85 STA 0344 A5 LDA 0 0346 85 STA O5 0348 A5 LDA 03 85 STA 06 034C A2 LDX 13 034E TXA 034F 48 PHA 0350 AO 04 0352 A5 LDA OL 0354 29 AND 0356 18 CLC 0357 69 ADC 30 0359 09 ORA 80 035B 20 JSR EF7B 035E 46 LSR O 0360 66 ROR 05 0362 66 ROR O4 0364 88 DEY 0365 DO BNE 035 0367 68 PIA 0368 AA TAX 0369 CA DEX 036A EO CPX 036C BO BCS O34E 036E 60 RTS and the answer can be displayed or logg ed for the next set of pulses All of this is accomplished with the routines given in Table X a program that was designed to operate in conjunction with the circuit of Figure 4 An explanation of this program follows The largest number of pulses from PB7 that can be counted on pin PB6 by the T2 counter timer is FFFF 1 or 65536 Each memory location is capable of storing two BCD digits thus three memory
68. 7 46 MICRO The 6502 Jour aal board doubt that any of the peripherals you might be interested in wili require them since they are rather peculiar to the KIM This method of directly wiring a KIM Socket to the appropriate signals on the Superboard will give you a workable KIM expansion connector even though it may look a little messy since you have to run wires to several points on the Super board If you plan to use several boards simultaneously you will want to make your connections to a KIM compatible motherboard You may ask if all this wiring is worth the effort since OSI sells a 610 expander board which plugs directly into the J1 socket and which will then connect to the OSI 48 pin bus think that it is because like to work with hardware and software together OSI doesn t offer everything that need and their price is somewhat high for what want You may wish to investigate just what OSI offers in the way of peripherals before you make any of these changes and addi tions to your Superboard any case hope that you now understand a little more about how your Superboard works and how you might go about connecting some peripherals to it PRINT CRG Wherever you want it CRT E QU BF 2D STATUS EQU F 000 DATA EQU F 001 SAVFLG EQU 0205 ISR CRT OUTPUT TO CRT FHA SAVE CHARACTER LDA SAVFLG CHECK SAVE FLAG BEQ RTN IF 0 6850 OUTPUT WAIT LDA STATUS WAIT FOR 49 00 LSRA CHARACTER the ultimate in
69. 8 2446 RNG Oz CCUESE1 mies zHiMeS3 HT 2449 IF MiMr4o 8 THEM MiMr42 1 2450 PRINT ASSAULT ON NOLINSSCMEMIeS 4 MEMO e S HT UNITS 452 PRINT ITS LIFE FORCE 15 HOM x 2499 IF M iMr3328 THEN 2468 2456 PRINT HO LllNS OMZM2OE 4 MEMSO HAS BEEN ELIMINATED 2457 STACMCM 3 1 2466 NEXT 2470 MEAT D 2486 NEXT MT 2430 IF NOUN LE OF VERB 18 THEM 2588 2492 STH 162 8 GOTO 2492 RMD 4 4 Ie GOTO 2586 2434 2 GOTO 2508 2492 5 GOTO 2588 2456 MiL Cco e SoG IF NTYP 22 THEM 23588 2516 IF MOUN S2 THEN 2528 IF VERE 12 THEN LIGHT 41 GOTO 23488 2520 IF MOUN 29 S26 RAFTHL GOTO 2908 253m NOUN Z6 THEN zS4B8 R PE 1 GOTO 256868 2548 REM S98 IF NOUMZ11 THEN sTRCXBO L C THEM ROPE 1 12 THEN z e a6 S04 S344 5 REM PE ACTION FOR 1 TO NUMM iG 3 STEF i8 2 IF STACMEM39 THEN G SUE 1898 58 NEKT H4d IF STAGES AND ZTRE Zdo 2 THEM 5 222 2 GOTO 400 REM MONS SUB z MOD 188 IF CSTACMEM L 99 MOD 188 gt AND MiM 4 28 THEN 2588 IF HRM LOC THEN 38668 5 0 MOD IF 2 9 THEN RETURN GOTO 2250 REND 43 HLOCZH MEM GOTO 3859 HL C ECXMRM GOTO 52 HL C ZIHEM GOTO 2353 17 20 MICRO The 6502 Journal October 1979 3853 NL C MZMRM GOTO 2855 1855 IF HL Cci1 THEM RETURN STR MEMSO SNLOCASTREMCM32 HMRM RETURN MO 2l KPSOMEM S 3 CSTACMOM L I P 4 EHE EHE CM CR
70. 8 Luct MEZT LAKE GOSUE 497 GOTO 4998 LOCS NORTH LAKE GOSUB 47 4998 L Cs HMRZE ROOM GOSUB 4878 GOTO 4496 E un 1 ve fex MD MD orc d vw Dam ur gt p lal Let n r 10 4 Cn Cn Mom i c un SD Gu Pop o Bop B m Bx gt 4 October 1979 The 6502 Journal 17 21 4960 LOC FR ZEM RIVER GOSUE 4878 4999 4636 S604 LOC RIVEE ROOM GOSUE 4478 GOTO 4d 5108 LO Ct z HLUE GOSUE 407 5499 GOTO 4496 LOCS ICE ROOM GOSUE 34878 S299 GOTO 4498 L ci CHIHNE GUSUB 447A 5299 GOTO 4998 54468 LOCs GOLG GOSUB 4978 5499 GOTO 4898 5568 LOCS BONES GOZUE 4678 59518 IF i THEN CURSE CURSE 15 GOTO 4496 L C z BRTS 4474 GOTO 498 LOCS GHOST ROOM GOSUE 4670 GOTO 4694 266 LOCS MISTY LAKE GOSUB 4 GOTO 498 LOCS SHIFT RIVER GOSUB 4 GOTO 4626 3 LOCS INTERSECTION GOSUE 4076 ntn 4 un iN J C LO GOTO 4 GOTO amp aad GOTO EHAA 999 GOTO 4898 sua EU EE FALLS GOSUE 478 VTHB 22 TRE 1 GOTO 9636 awe LOCS YOUR HOME GOSUE 4074 sean Saa IF STACSS das THEN 1 9626 IF STR 4 22 Saa IF STH 4 8 IF STA 5 sema 22 SEA IF
71. 979 T D Q TAPE DATA QUERY PET 8K SOL IIA TRS 80 LEVEL II FILE MANAGEMENT SYSTEM Utilizes Dual Audio Cassette Recorders INTERACTIVE QUERY LANGUAGE English Like Commands Powerful Info Retrieval Capability COMPUTERIZED BUSINESS amp PERSONAL REC RDS Customize Your Own File Structures Create amp Maintain Data Files No Programming Experience Required IMPLEMENTED IN BASIC T D Q CASSETTE WITH MANUAL amp REF CARD 50 00 The Following Pre Defined T D Q File Structures Are Availabie To Solve Your Data Processing Needs INVENTORY CONTROL 35 00 ACCOUNTS RECEIVABLE 35 00 ACCOUNTS PAYABLE 35 00 ORDER PROCESSING 35 00 CUSTOMER DIRECTORY 25 00 APPOINTMENT SCHEDULING 25 00 Each With Cassette And Manual Send Self Addressed Stamped Envelope For Complete Software Catalogue Send Check Or Money Order To H GELLER COMPUTER SYSTEMS DEPT M P O BOX 350 NEW YORK NY 10040 New York Residents Add Applicable Sales Tax MICRO The 6502 Journal NOW AVAILABLE For SOL IIA and 8 GENERAL PACK 1 11 00 Checkbook Balancer Tic Tac Toe Metric Conversion GENERA 2 19 00 Space Patrol Biorhythm Battlestar One Armed Bandit FINANCIAL PACK 1 13 00 Loans Depreciation Investments FINANCIAL PACK 2 13 00 Mortgage amp Loan Amortization Future Projections Risk Analysis STATISTICS PACK 1 19 00 Mean amp Deviation Distribution Linear Correlation amp
72. ART 0400 LOOP 0402 TBL1 0408 TBL2 050B 10301 Stonydale Drive Cupertino CA 95014 408 735 7891 110000 0608 0608 modification to John Sherburne s original program plots hypocycloids quite a bit faster on the OSI by reducing the number of revolutions required The had just added the e tra 2K of plotting hypocycloids hypocycioid if memory to my Ohio Scientifi 440 video you don t remember is what you get board to implement the grapt ics option when one circle rolls inside another as in and was wondering what 1o do with the Spirograph toy immediately ac those 16 384 dots 128 128 staring cepted the challenge that if it can be out from my monitor happened to pick done on a PET could do it better on my gr The original hypocycloid program suf fered greatly from lack of speed since each point was calculated using four trigonometric functions Approximately 300 points per revolution were required Even then some gaps appeared in the resulting pattern was able to reduce the number of points calculated per revolution to 30 by drawing straight line segments between calculated points This makes the resulting curves not quite as smooth but very acceptable as the accompanying photos illustrate The number appearing in the lower left cor ner indicates the number of resolutions required to complete the figure Below is the subprogram used to fill in the space between calculated points 1 1
73. AS 244 GOTO 300 225 POKE 49143 ASC AS 192 GOTO 200 300 POKE 49143 200 NOTE Figure 2 October 1979 cs means clear screen and cd means cursor down MICRO 6502 Journal Scanlon P O Box 22 Arkansas State University State University AR 72467 directly to pins 2 and 6 of the MC6850 All the parts except the crystal are fair common and can be ordered from most mail order electronics parts firms The 1 229 megaHertz crystal can be ordered from any crystal manufacturer for around 10 This interface can be connected to any 6502 or 6800 based microcomputer that allows direct access to the microprocessor bus for example the APPLE KIM SYM SWT OSI etc The software is written in BASIC and makes the PET act like a TTY type dumb terminal The control characters are obtained by using the shift key For example control S is simply shift S Although this program appears to limit the PET it really doesn t since you can hit the stop key write and run a program in the extra RAM and get back to the ter minal program with a RUN 190 or a GOTO 190 For example you could write a BASIC program starting at line number 500 compute a bunch of data POKE the data to the modem and then return to the terminal program with a GOTO 190 Software The MC6850 Asynchronous Com munications Interface Adapter or in the buzz words of computerland simply speak the letters
74. BS 2O415 RUB VERBS LENCVERBS Ot15 STRRTURIVE VERBS LENCVERBEZ42o 15 DRINKERT BITE VERBS LEMCVERESS 544 9S Mastek a FOR TO 19 15 1 MEXT I FOR 1 11 TO 14 NEXT I 1 15 TO 49 10 4 NEAT I FOR I 28 24 amp 12 8 NEXT I 8 FOR 1 25 TO 28 NTVPEIO 1 amp NEXT I A FOR 1 29 TO S3S NTVP I 232 NEXT I 2 12 64 NEAT I 2 VTTPZ22 11 VTUPZ 5 October 1979 MICRO The 6502 Journal 17 23 2 2 FoR 1 8 TO 41 NEXT I 1 2 143 4 FOR 1 15 TO 19 0 NEXT I al bed bed zo t p m nic Ge e I F 36442 172 48 38450 j 38468 F R 2 22 NEXT I SA47H FOR 1 23 TO 25 VTVPCI3 4 NEXT I 20500 FOR 1 TO 14 5 12 8 NEXT I 36518 STACAS 4 STACLE 3 STACL 7I 15 31528 5 1 13 5 30538 51 421 16 5 38548 STR 42 14 5TRG 579 lt 27 18 5 STRCB 9 5 5 lt 32 1 57 5 36 12 L i c o en cn en SJ OCT EO gt FOR 1 1 5 lt 12 12 0 5 12 61940 NEXT I B NO SE NCGO 2 NGO 18 NC 23 8 18 27 B NO18 s3 NC 19 43 NCLE 9222 NE NCO19 21 NC 82 8 2354 4 20 69 48 8 9 9 4 449514 4 24 20 3 38658 212 11 38668 Sibi j8 561B3 11 55115
75. C9 CMP 24 031 DO BNE 0324 0320 A9 LDA CO 0322 85 STA O1 0324 D8 CLD 0325 40 RTI MICRO The 6502 Journal number of counts in T2 represents the number of hundredths of seconds that occurred between the two positive pulses on the clock input of the 7474 flop The time between the leading edges of the positive pulses produced by the events call this time T as measured by the program in Table X is given by the formula Tm Tp SFFFF 2 N4 2 FFFF where T is the period of the square wave on is the number in the 2 counter timer at the conclusion of the timing interval and N4 is the number in the T1 timer Refer to Table VI for the necessary 1 to produce a suitable Values of T that are multiples of ten afe most useful The origin of the number FFFF in the equation lies in the fact that the T2 counter timer is loaded with FFFF before timing begins For the listing shown in Table X T is 0 01 seconds so the equation bec mes Tm 0 01 FFFF seconds The precision with which one can measure the true time T between the events depends the resolution To since clearly the true time need not De an exact integral number of T Our analysis shows that the actual tine T is given by the expression 1 Tp lt T lt Ty Thus if greater precision is required then Tp can be reduced The conversion subroutine CNVD performs the operation FFFF
76. D opera tions outlined in Table II will also be posponed until required by a specific example A Simple Delay Loop Using the T2 Timer The most common application of counter timers is the implementation of delay loops The counter timer replaces a series of instructions that are design ed to waste time The counter timer simplifies greatly the instructions that are necessary to program a time delay and furthermore the computer may ex ecute other tasks during the delay pro duced by the timer a feat that is much more difficult to perform with a software implemented delay loop assembly language version of a simple delay loop using the T2 timer on the 6522 is listed in Table lll The mnemonics are perfectly general for 6502 systems but the addresses of the registers of the 6522 are the ones given in Table I for the AIM 65 and the SYM 1 Programmers using other systems need only change the addresses to corres pond to the locations of the 6522 registers in the address space of their October 1979 ADDRESS 4000 4001 002 4003 A 00 4005 4005 4005 006 4007 4008 4008 4009 A00B A00C A0CD 0GE A OOF ADDRESS 4001 4001 4005 4005 4006 4006 4007 4007 4008 4008 4009 4009 A00B A00D SYMBOL ORB OPA DDRB DDRA TILL TILH T1CH TILL TILE T2LL T2CL T2CH ACR IFR IER SYMBOL TALL
77. F8 SED 0307 5 00 LDA MIN 0309 69 01 ADC 01 0308 85 00 STA MIN 030D C9 60 CMP 60 030F DO 13 BNE DONE 0311 A9 00 LDA 00 0313 85 00 STA MIN 0315 18 Cic 0316 5 01 LDA HRS 0318 69 01 ADC 01 0314 85 01 STA HRS 031C C9 21 24 031 DO BNE DONE 0320 9 00 LDA 00 0322 85 01 STA HRS 0324 D8 DONE CLD 0325 40 RTI October 1979 Start counting pulses again by loading T2CH Clear carry for addition Set decimal mode for addition Get minutes Add one Is one hour complete No get out of interrupt routine Yes set minutes to zero Get hours Add one Is one day complete Clear hours Clear decimal mode Return to the main program MICRO The 6502 Journal Producing Long Time Delays The maximum time delay that can be produced with the T2 counter timer when it is decrementing at the system clock rate is approximately FFFF 1 or 0 065536 seconds if 1 microsecond In certain applications longer time delays are necessary To ob tain these delays the T1 timer is used in conjunction with the T2 counter timer We digress for a moment to introduce the T1 timer The T1 timer can be used to imple ment a simple delay loop in exactly the same way as the T2 timer Refer to Table HI If the addresses A004 and 005 replace addresses A008 and A009 respectively and if bit six of the inter rupt flag register IFR is tested rather than bit five then the p
78. I in terrupt lines 90 100 POKE a jump to the start of the interrupt handling routine Next in lines 120 140 the machine language object code is read as data and POKEd into high memory The decimal equivalents of the object code are represented as DATA in lines 9010 9110 Lines 200 220 now set the clock counter locations to 0 and we are ready to turn the clock switch Once this is accomplished the clock is under program and or keyboard con trol via POKEs to the PIA PORT B bit 0 Applications programs inserted at line 300 may use the clock by PEEKing at the appropriate clock counter locations 17 59 HOURS 6978 MIN 6979 6957 SECS 6974 10 PRIN PRINT REAL TIME CLOCK FOR DISK BASED OSI SYSTEMS 5957 FsEC 6978 20 PRIM PRINT ROBERT KINTZ ROCHESTER NEU YORK 5900 ORG 6900 30 PRIN PRINT RUNS UNDER OSI OPERATING SYSTEM 0S 650 U 3 0 5900 48 START PHA 40 REN SET UP PIA PORT A IMPUT PORT B QUTPUT 5901 8A TXA 50 Xs63 32 REM PIA ADDRESS OF 500 OR 510 CPU BOARD 6902 48 PHA 60 POKE 1 0 3 0 X 0 6903 98 TYA 70 POKE X 2 255 POKE 1 4 X 3 4sPOKE X 2 0 6904 48 PHA 80 REM SET UP CLOCK ROUTINE ruses 6905 20 OE 69 JSR CLOCK 90 REM IMI VECTORS TO 0130 304 6908 68 PLA 100 REM 6900 26880 START OF CLOCK ROUTINE 6909 A8 TAY 110 POK 304 76 POKE 305 0 POKE 304 105 6904 68 PLA 120 REM READ IN MAC CODE AS DATA
79. IC this will activate the printer just as it does the cassette so that any characters output by BASIC will be sent to both printer and cassette If either of them is turned on it will print or record the data sent And how can one tell whether the printer is busy or not You can t without writing some of your own software You see Microsoft BASIC does not actually do any I O it merely jumps out to the I O routine provided by OSI in the monitor There are four routines that BASIC jumps to for I O one which inputs a character one which outputs a character one which is executed whenever the LOAD command is given and one which is executed whenever the SAVE command is given BASIC jumps to the following addresses which have instructions as shown Input FFEB 0218 Output FFEE 021A Load FFF4 021E Save FFF7 0220 The monitor stores the addresses of the input output load and save routines at the locations 0218 021 021E and 0220 respectively every time the BREAK key is pressed This makes BASIC transfer control to these routines when it needs Of course it would be easy to write your own routine and POKE the address of it in one of these locations so BASIC would then jump to your routine instead of the one in the monitor You can disassemble the routines in the monitor if you want to find out just what they do but will describe their functions here The input routine l
80. II Mike Rowe P O Box 6502 Chelmsford MA 01824 Name Text Processing System Editor and Assembler System APPLE II Memory 24K Language Integer BASIC and Machine Language Hardware APPLE II 24K and Disk Il Description This disk based system allows you to create and edit Applesoft Integer BASIC assembly language and APPLE DOS exec files The text editor provides capabilities to create load modify and save APPLE Il disk operating system text files Editing features include simple to use data entry extenswe character and string searches and replacement block line movement and simple single line macros Text creation and modification is further simplified with such features as tabbing specific search windows file merging and line deletion The text editor supports systems equipped with a printer to create permanent listings of text files The assembler is a complete disk based two pass symbolic assembler You can assemble up to ten disk based text files at any one time The assembler will generate disk based binary files that can be executed via the APPLE DOS BLOAD or BRUN commands Eight character symbols allow for meaningful variable and routine names The assembler supports all 56 stan dard 6502 opcodes and six additional pseudo opcodes used to define constants labels program addresses etc Meaningful error messages are generated to help locate program mistakes The assembler can generate both program and symb
81. IM 20 ASCII BLANK 0229 20 C1 89 JSR OUTDSP SEND IT TO DISBUF 022C 5 Al LDA 00A1 GET CONTENTS OF A1 DON LANCASTER S 022 20 FA 82 JSR SEND IT TO DISBUF 0231 A5 AO LDA 0040 NOW 0 INCREDIBLE SECRET 0233 20 FA 82 JSR OUTBYT 0236 9 20 LDAIM 20 ASCII BLANK MONEY MACHINE 0238 20 C1 89 JSR OUTDSP 023B 20 06 89 5 JSR SCAND SCAN THE DISPLAY A cookbook for creating 023E 4C 3B 02 JMP DSCAN DO IT CONTINUOUSLY your own computer or tech venture SYMBOL TABLE 2000 2 2A ACCESS 8B86 DSCAl 023B OUTBYT 82FA OUTDSP 89C1 SCAND 8906 TMIN 0211 TMOUT 0227 While working on a lea ing rate a program in BASIC to print it when calculation program in Kim BASIC needed found the need for a list of variables Qus dnd available so that could cross out the Henri Reiher Postpaid ones used in my program I fc und such 4236 Madison a list in MICRO 4 4 and decide 1 to write Montreal QUEBEC CANADA H4B 2T9 SYNERGETICS BOX 1077 M 100 REM PROG TO SHOW UMERICAL AND STRING VARIABLES AVAILABLE IN 110 REM MICROSOFT 512 AS USED PET APPLE TRS80 AND OTHERS THATCHER AZ 85552 115 REM REF C R 2 APRIL MAY 78 PAGE 4 4 Send ISMM s Check Visa 7120 FOR X 65 TO 90 Send FREE Lancaster Booklist 125 PRINT 130 PRINT CHR X 140 FOR Y O TO 9 145 Y CHR X NUM 147 REM INSTEAD OF NUM Y YOU CAN USE STR Y 150 PRINT Y qj Zip 155 NEXT Y 160 FOR Z 65 TO 90 Visa
82. ING AND DATA TRANSFER CAPABILITIES A TWENTY SIX PAGE BOOKLET PROVIDES DETAILED EDUCATIONAL TEQUNIQUES GIVING A THROUGH UNDERSTAND ING OF THE DOS COMMANDS SYSTEM REQUIREMENTS DISK II amp APPLESOFT TAPE OR ROM PRICE 19 95 ON DISK FOR EITHER OF ABOVE PROCESSED amp SHIPPED WITHIN 4 DAYS SEND CHECK OR MONEY ORDER TO SOFTOUCH i P O BOX 511 LEOMINSTER MASS 01453 4 ECUTCECU Put Yourself Control with the APPLE7HROTTLE That s ight The will tum your me paddles into a speed controller I m finally in Control with my NEW APPLETHROTTLE By sim pushing a button you can stop your mputer for as long as you want Release the button and your computer enters 1 slowmotion mode with one paddle controlling the speed And if that isn t enough look at these additional feature Plug into any slot Wort s with machine language Integer BASIC and Applesoft Norraal slow stop Use LIST TRACE RUN etc NO SOFTWARE to load we program secrets 89 95 And there s more No more multiple LIST commands to view small program section With the APPLE 7 077LE you ll be able to list or trace long progranis while watching your program flow in slow motion So get in control with the APPLE7HRO77LE and order yours today PROTOBOARD with over 1300 holes o
83. IONS KIM TIM 65 4th Qtr 779 SYM 1st Qtr 80 SINGLE DRIVE DUAL DRIVE 795 00 1195 00 Complete with all hardware Interconnecting cables FODS text editor and user and instal lation manuals two pa s assembler the Text Output Processing System and Dynamic Debugging Tool Hardware in cludes a Western Digital 1771 based controller in a state ot the art 47 x 672 card size Shugart SA 400 drive and the Alpha power supply The storage media for the DM816 MD1 is the stan dard soft sectored 5 4 mini diskette readily available at mos computer stores and has designed the system so that the diskettes rotate oniy during disk transactions favorably extending media life A disk formatt routine included with the system formats the diskett 35 verifies media integrity by a comprehensive R W test and checks drive RPM Additional utilities provide ascending or descending alpha numeric sort disk picking text output formatting file renaming file adc ressing and other capabilities PRODUCTS BUILT TO BE USI D WITH CONFIDENCE AVAILABLE DIRECT OR FROM THESE FINE DEALERS JOHNSON COMPUTER PLAINSMAN MICROSYSTEMS Box 523 Box 1712 Medina Ohio 44256 Auburn Ala 36830 216 725 4560 800 633 8724 ARESCO P O Box 43 Audubon Pa 19407 215 631 9052 LONG ISLAND CO APUTER GENERAL STORE LONE STAR ELECTRONICS 103 Atlantic Avenue Box 488 Lynbrook N Y 11563 Manchaca Tex
84. Kingston C SYM Notes and KIM 4 Compatibility pg 18 Interfacing details for these two units Adams Jim Wumpus and Music Box for SYM pg 20 Modifications to implement these two programs on the SYM Nelis Jody Manual Corrections pgs 20 23 Corrections for the AIM User s Manual Merhar Milan TVT 6 Notes and RAM Expansion pgs 24 25 TVT 6 discussion and a way to fill the lower 4K in KIM McCormack Chris Cassette Directory Printout Program pgs 25 26 Prints your tape directory on your TTY or terminal 483 Stems from Apple 2 No 4 April 1979 Gustafson Gus INT FP Stop List Program pg 4 BASIC programs for Stop List Gustafson Gus Apple Disk Copy Program pg 5 Modified program to permit using two cards and multiple drives Sittel Randy Program 0 pg 5 Routines for free bytes no matter what the memory 484 Circuit News April 15 1979 Anon Microcomputers Monitor Oil Well Operation APPLE I is used in monitoring off shore oil well drilling processes displaying information continuously on a silent 700 printer and an H P X Y plotter 485 The Pet Gazette Spring 1979 Anon Beautiful Music pg 1 21 Micro Technology Unlimited is coming out with a PET version of the KIM music board DAC and the visible memory Butterfield Jim Routines from PET BASIC pgs 2 6 A listing of a large number of routines from PET BASIC PET Tokens p
85. M KIM Featuring a Power Supply Enclosure for the AIM 65 Now with OVER VOLTAGE and SHORT CIRCUIT _ Protection ENCLOSURE WITH BUILTIN POWER SUPPLY SPECIFICATIONS INPUT 110 220 VAC 50 60 Hz OUTPUT 5V 5A 24 1A GROUNDED THREE WIRE LINE CORD ON OFF SWITCH WITH PILOT LIGHT Enclosure has room for the AIM and one ENCLOSURE additional board MEMORY PLUS or VIDEO PLUS 45 AIM PLUS 61109 AIM and AIM PLUS 485 Plus some very elegant expansion boards HERE 2499 ih 8K STATIC 95 Sockets for 8K Eprom 6522 1 0 Port ON BOARD REGULATORS EPROM PROGRAMMER y1539 puus UPPER tower case ASCII 128 Addittonai User Programmable Characters GRAPHICS SYMBOLS FOREIGN CHARACTERS Programmabie Screen Format up to 80 CHARACTERS 24 LINES KEYBOARD and LIGHT PEN Interfaces Up to 4K DISPLAY RAM Provision tor 2K Provision to add 6502 for STAND ALONE SYSTEM ASSEMBLED TESTED WITH 2K DISPLAY RAM VIDEO PLUS 24500 MEMORY PLUS 20000 FULLY ASSEMBLEO AND TESTED Many other products available Write for a complete catalog or call if you are in a hurry e The prices listed above do not include shipping and handling COMPUTERIST PO Box 3 Chelmsford MA O1824 617 256 3649 s boum dios the r ader can mediately Specify ol 6 95 plus 75 for First Book of KIl KIM g
86. OR ISO 2 2 filter isolated 3 prong socket banks 6 sockets total integral Spike Surge Suppression 1875 W Max load 1 KW either bank SUPER ISOLATOR 150 3 similar to ISO 1A except double filtering amp Suppression 79 95 ISOLATOR ISO 4 similar to ISO 1A except unit has 6 individually filtered sockets 93 95 ISOLATOR ISO 5 similar to ISO 2 except unit has 3 socket banks 9 sockets total 76 95 CIRCUIT BREAKER any model add CB Add 6 00 CKT BRKR SWITCH PILOT any model CBS Add 11 00 ee PHONE ORDERS 1 617 655 1532 x 7 Electronic Specialists Inc 171 South Main Street Natick Mass 01760 Deptmi 17 57 up to 1 70 in merchandise with the purchase af PET CBM item FREE MERCH PET 1BK Large Keyboard 995 130 PET 32K Large Keyboard 1295 170 PET 8K 795 100 2040 Dual Disk 343K 1295 170 PET 2023 Printer pres feed 849 110 PET 2022 Printer trac feed 995 130 KIM 1 159 Add 30 for Power Supply SYM 1 222 00 6500 Programming Manual 6 50 2114 L 450 ns suse 9 90 24 5 15 10014 45 2716 EPROM 5 Volt 42 00 6550 RAM for 8K PET 12 70 6502 Microprocessor Chip 9 75 6522 VIA 9 75 6520 PIA 5 50 PET 4 Voice Music Board MTUK 1002 2 49 00 Music Software K 1002 3C for PET 19 00 Programmers Toolkit PET ROM Utilities 45 00 Microchess 2 0 for PET or APPLE 17 90 PET Word Processor Machine Language 24 00 3M Scotch 8 disks SALE 10 31 3M
87. PACE x BUS BUFFERED WITH 115 TTL 200NSEC 4116 RAMS FULL DOCUMENTATION ASSEMBLED AND TESTED BOAROS RE GUARANTEED FOR ONE YEAR ND PURCHASE PRICE IS FULLY REFUNDABL IF rie i RETURNED UNDAMAGED WITHIN 14 ASSEMBLED TES TED WITH 32K RAM WITH 16K RAM WITHOUT RAM CHIPS i HARD TO GET PARTS ONLY NO RAM CHIPS BARE BOARD AND MANUAL PET INTERFACE MIT 4 CONNECTS THE ABOVE 32K EXPANDABLE RAM Ti A 4K OR 8K PET CONTAINS EXPANSION INTERFACE CABLE 80 0 STANOOFFS POWER SUPPLY MDOIFICATION KIT COMPL INSTRUCTIONS ALL ASSEMBLED BOARDS AND MEM ORY CHIPS CARRY A FULL ONE YEAR REPLACEMENT WANANTY Initialize interrupt vector to address of service routine Initialize card array and page zero work Space Generate random ptr Rotate card array Interchange cards Have Interrupt key Interrupt Key Pressed Restore accumulator Restore X register Restore Y register Set flag to 1 Return from interrupt 16K X 1 DYNAMIC RAM THE MK4116 3 15 16 384 BIT HIGH SPEED NMOS DYNAMIC RAM THEY ARE EQUIVALENT TO THE M TEXAS INSTRUMENTS OR MOTOROLA 4116 SEE ACLESS TIME 375 NSEC CYCLE 16 PIN TTL COMPATIBLE BURNED IN AND FULLY TESTED E REPLACEMENT GUARANTEED FOR 9 E EACH IN QUANTITIES OF 8 MOTOROLA MEMORY ADORESS MULTIPLEXER MC 3242A THE MC 3242A IS AN ADORESS MULTIPLEXER
88. Regression Contingency Table Analysis GAME PACK 1 20 00 Basketball Object Removal Bowling Darts Gopher GAME PACK 2 children educational 13 00 Arithmetic God Addition Dice Travel For the KIM 1 PCROS Real Time Operating System in the IK RAM Includes Assembly listing Cassette with user s manual Schematic for relay control board 50 00 17 13 Software for the APPLE Il FORMAT PROGRAMMA s FORMAT Version 1 0 is a command oriented text processor de signed to be fully compatible with PIE P PROGRAMMA Improved Editor U RELATIUE 31213 OF THE NINE PLANETS FORMAT s system of imbedded commands A 555 t 7 5 J within the text give it an ease of oper ation similar to text formatters found on 15 95 2 THE PLANETS some mini computers SAUCER WAR 15 95 FORMAT features right margin justifi cation centering page numbering and auto paragraph indent Marry Ternott The following commands are available with FORMAT LA J fa ad Begin adjusting right margins Y t t bp n Begin page numbered n Falis Press ony key to continue 2 br Cause a line break COPYRIGHT lt C gt 1979 LS Center next n lines without fil ACTIVE FILTERS 24 95 Start filling output lines CANTER DOWNS 15 95 bs t Foot title becomes t gt t Head title becomes t J n indent n spaces from left margin
89. STEMS FRICE LIST SYSTEMS comronents 121 Analos Inrut Module 179 00 16 8 01 analog inruts 100 microsecond conversion tise 3 stale reauires one 8 bit computer Port for conlrol and one 8 bil computer input port for dats FOWL Fowenr Mosule 14 95 Supplies rower for one AIM16 module ICON Inrut Connector 9 95 For connecting analod inruts Lo the AIMI 20 Pin card edde connector solder eyelets OCON Qutr ut Connector 9 75 For connecting the to a computer 20 rin card connector solder evelets 1 Manifolda Module 59 97 Use in Place of ICON Screw Lerminal barrier slries for connecting Joysticks rolenticaeterss vollase sources eic Eliminates Ue need for soldering Pluss inlo 1016 ANAMANT Analos Manifold Module THA in Place af ICON Connects SYSTEMS SENSORS lo the 1 16 without soldering sensor cables Just rlud in Pluss into the or Ue SENSORS THA Sensors for Lemperaturer Pressure flows humidityr levels action elc COMPUTER INTERFACES TEA For the TRS 80 eic Use in place of OCON Eliminates ihe need for soldering or consiruclion FET Interface Module 49 75 Gives tuo IEEE Ports one user port and one DAM SYSTEMS interface port Saves wear and Lear on PET s printed circuil board Also called PETSAVR KIMMOD KIM Interface Mo
90. TION PROGRAM B ROBERT PECK Letters M DIFIED BY MICRO STAFF 0241 ACCISS 8B86 0251 OUTI SP 89C1 0241 OUTIYT 82FA 0241 SCAD 8906 Having trouble running mnemonically entered programs on your AIM 65 This 0200 ORG 0200 might be one source of the problem 0200 49 00 LDAIM 00 STORE ZERO IN 0202 85 STA 00A0 AREA RESERVED FOR TOTAL According to the AIM 65 User s Guide 0204 85 A1 STA 0041 indirect indexed addressing mode may 0206 20 86 8B JSR ACCESS UNPROTECT SYSTEM RAM be entered by using either HH Y or 0209 AD 1F LDA A41F CLEAR PA7 FLAG OPTIONAL HH Y where HH is a hexadecimal 020 A9 FF LDAIM FF LOAD TIMER PRESET NUMBER byte The AIM 65 Summary Card lists the 020 8D 1D STA ESTABLISH 8 AS PRE DIVIDE alternatives HH Y or HH Y 0211 F8 TMIN SED TIME 255 8T 2040 CYCLES M 0212 A5 A0 LDA 0040 SET DECIMAL MODE format HH Y will 0214 69 01 ADCIM 01 LOAD AO AND ADD ONE y 0216 85 A0 STA 0040 PUT IT BACK The formats HH Y and HH Y will be 0218 A5 Al LDA 00A1 IF THERE S A CARRY assembled incorrectly as indexed in 0214 69 00 ADCIM 00 ADD IT IN direct instructions HH X 021 85 A1 STA 0041 AND RESTORE 021 D amp CLD CLEAR DECIMAL MODE Don Stein 021F 2C 05 4505 TEST TIMER FLAG 6012 Chatsworth Lane 0222 30 03 BMI TMOUT BRANCH IF MINUS FLAG IS SET Bethesda MD 20014 0224 lC 11 02 JMP TMIN JUMP BACK AND DO iT AGAIN 0227 9 20 TMOU LDA
91. That s because it is specifically designed to handle the day to day tasks of education financial planning building security scientific caiculation and entertainment APPLE Il is appealing and comfortable like other appliances that make your life easier and it brings to personal computing a new level of simplicity through hardware and software sophistication Reference Books for Apple and PET Owners Programming Manual MOSTEIO Hardware Manual MOSTEK Programming the 6502 2 9 95 6502 Application Book ZAKS 12 95 Programming a Micro Computer 6502 FUSTER 9 95 PET Owners Only PET User Manual Hands on BASIC with a PET PET Machine Language Guide 9 95 PROFESSIONAL BUSINESS SYSTEM 80 COL DOT MATRIX PRINTER ze commodore DUAL DRIVES 2 2040 1295 PET to IEEE 1295 Cable 39 95 Retrofit kit required for operation with as 2001 8 2001 32B INTERFACE AROS Prototyping Hobby Card Parallel Printer Interface Card Communications Card amp 0825 Connector cable High Speed Serial Interface Card Language System with Pascal 48K RAM 8 Disk I Required Apptesoft ti firmware Card 16 input An ilog Card ACCESSORIES Disk tl Orive Only Disk amp Controller 32K Min RAM Recor mended Vinyl Carrying Case Tape Recorcter Programmers Ald No 1 Firmware For Use with Integer Cloc
92. The 6502 Journal while the other the high order byte is still not loaded temporary storage at ches are provided Using the T2 timer as an example the low order eight bits of the number N to be loaded into the counter are loaded into the low order byte of the T2 latch T2LL Nothing hap pens Next the high order eight bits of N are loaded into the high order byte of the T2 counter Referring to Table this last operation has three important and simultaneous consequences The byte stored in the T2 latch T2LL is transferred to the low order byte of the T2 counter T2CL T2 now contains a 16 bit number The interrupt flag that signals the time out bit five of the IFR is cleared set to zero It will be set to one when the number decrements through zero The countdown begins The T1 timer has two latches one to store the low order byte to be transfer red to the counter and one to store the high order byte to be transferred to the counter One reason for this difference is that the T1 timer has a free running mode At the end of one time out the two bytes of data stored in the latches are automatically transferred to the 16 bit T1 counter to start a new timing in terval Furthermore the values in the two lat ches may be changed during one timing interval to give a new value for the next interval The examples that follow should make these points clear Addi tional discussion of the REA
93. To produce simple delay loops for long time intervals the pulses from PB7 are fed to PB6 Timer T1 operates in its free running mode and timer T2 operates in its pulse counting mode Consequently T2 counts the pulses pro duced by T1 on PB7 A program to pro duce a delay of one hour is given in Table Vil This program may be easily modified to produce delays of 1 10 60 100 1000 10000 36000 or 65536 seconds Timer T1 produces a square wave whose period is 0 1 second These pulses are counted by the T2 counter timer If nine is loaded into T2 then 10 pulses each of 0 1 second duration will be counted giving a delay of one se cond Other time intervals are program med accordingly Of course there is an uncertainty of several microseconds in the actual loop time but this uncertainty will be unimportant for most applica tions If the program in Table VII is modified to allow T2 to produce interrupt requests IRQs by loading into the interrupt enable register IER at iccation 00 refer to Table IV then it couid be used in connection with the interrupt routine given in Table IV to produce a 24 hour clock program To generate an interrupt every minute as required by the low overhead clock T1 should count to 600 Load T1 with 0257 instead of C39F as shown in Table Vil and your clock should run These modifications are shown in the AIM 65 disassembly format Sound Effects The T1 timer can be used in
94. a game As you play keep telling yourself Its only game it s only game This is an adventure fantasy series in 2 Tree room A towering withered which you become directly involved in tree stands in what appears to bea exploration of a mysterious cavern in dried up river bed From it you seem southwest Kentucky called Devils to hear echoing sounds saying Delve If you have never played before Water water water you should take guide along The guide will read the chamber descriptions as 3 Writing room Do not read this you enter each room for the first time description if the room is dark The He can also supply some hints and clues writing room is a large oval to help you when you are stuck Only the chamber with tall ceilings and guide should use the room descriptions massive stalagmites The smooth word lists and the map of the caverns eastern wall has some writing on However younger players may need it cryptic characters that spell some of these aids to help them out THE SPIRITS OF THE FRUIT Spelunker is an interactive game You 4 Pit room A small chamber with an must converse with the program in order immense stalagtite hanging from to explore the caverns and locate their the center of the ceiling directly treasures You can talk in sentences if over the mouth of a bottomless pit you wish but the program will use onl one verb and one noun to 5 South lake shore You stand at the meanin
95. ames Changes sho modity and ru postpaid Orde fr Robert A SHOWN WITH 1007 1 INTERFACE 99 00 K 1008 P VISIBLE MEMORY 243 00 K1005 P 5 SLOT CARD FILE 80 00 K 1008 3C DRIVER SOFTWARE 20 00 CALL OR WRITE FOR OUR FULL LINE CATALOG OF PET EXPANSION PRODUCTS THE FLEXIBILITY YOU HAVE DREAMED ABOUT IS NOW AVAILABLE 320 WIDE X 200 HIGH RESOLUTION EACH DOT INDIVIDUALLY ADDRESSABLE SOFTWARE SUPPORT LEVEL 1 GIVES GRAPHICS amp TEXT CONTROL AT MACHINE LANGUAGE SPEED BUT ACCESSABLE FROM BASIC BY GOSUB AND VARIABLE STATEMENTS DUAL PORT 8K BYTE MEMORY ON BOARD ALLOWS FULL USE OF MEMORY FOR OTHER TASKS SEE YOIJR PROGRAMS IN THEIR DIGITAL FORM IF YOU LIKE DOUBLES THE MEMORY SIZE OF AN 8K PET COMPLETELY TRANSPARENT SCREEN REFRESH NO SNOW OR BLINKING EVER THE PROPER WAY TO D IT MICRO TECHNOLOGY UNLIMITED 841 GALAXY WAY PO BOX 4596 MANCHESTER NH 03108 603 627 1464 6522 Timing and Counting Techniques While many 6502 computerists are becoming familar with the 6522 Versatile Interface Adapter do you really know how all of it features work or how to use them This tutorial will clear up the mysteries of the 6522 Applications that reduire interval timers include everything from the pro duction of simple sound effects for games to the implementation of sophisticated data logging or control processes Because single chip micro computers such as the
96. and Howard s article on the Intel 8253 in Computer Design May 1979 pg 213 The positive pulses clock a 7474 flip flop producing a logic one voltage at the Q output of the 7474 for the time in terval between the leading edges of the two pulses With the T1 timer producing square waves on PB7 the logic one voltage on the Q output gates the pulses to PB6 by means of the 7400 NAND gate where they are counted by the T2 counter timer For example if a square wave whose frequency is 10 Hz T 0 1 second is applied to the 7400 NANO gate and 250 such pulses are counted on PB6 then the corresponding time in terval is 2500 1 25 0 seconds with a resolution of 0 1 second Clearly no software is required to detect the pulses and consequently very narrow pulses can be detected Also the programmer has control over the frequency of the square wave ap plied to the NAND gate The resolution can be changed from 4 0 microseconds to 0 10 microseconds by varying the number loaded into T1 Refer again to Table VI for a choice of frequencies for the free running mode of the T1 timer that might be appropriate for a given application Since the T2 timer is capable of counting to 65536 the maximum time interval that can be measured with a square wave whose period is Tp is 65536 Tp 65536 2 N 2 where Tmax is the maximum time inter val that can be measured T is the period of the square wave T 1 f on PB
97. and win more battles than the computer 12 95 24K POLAR PLOT Plot polar equations in Hi Res Graphics UD 10 32K SHAPE SCALER Utility to generate and animate Hi Res graphic shapes Simple routine provided to inspect position of shapes and specify precise X Y coordinates and scale Needs ROM Disk o a aa a E a E Teer 13 95 32K ZINTAR PROPHET Great party game Under control of the mighty Zintar s edict you take a very special trip to the world of Krintar Heightened visual graphics Needs ROM Disk 16 95 APPLE MONITOR PEELED Everything you wanted to know about the Apple Monitor but couldn t figure out User written manual in plain English clears your confusion 9 95 Garden Plaza Shopping Center Dept 11A 9719 Reseda Blvd Northridge Ca 91324 Telephone 213 349 5560 PROGRAM ID Enter data in form ap Goto mail dos 340 Mail G0 Seceiva tha Personal Gomputar Gatalog S0 End Jona Follow this simple program and you will receive The Personal Computer Catalog The one refpr ence book to fine quality personal software supplies and accessories This valuable catalog is FREE so mail your order today Name Address City tu os ZiD Do you use your computer for Business Personal Education Other NEM NEM
98. as 78652 516 887 1500 612 282 3570 Shuffling Program for KIM 1 Your 6502 might play poker like Amarillo KIM but does it always have to pass the deal Not if you teach it to shuffle cards Entertaining friends with computer games certainly makes all the effort of assembling a personal computer worth while However if you happen to have a small microcomputer with limited mem ory and very few software tools there are not many games available As an example most card games need a ran dom number generator to shuffle cards The standard method to generate ran dom numbers as used in most BASIC interpreters is not suitable for this pur pose Since some of the bare bone puters do not even have the software to perform multiplication it is asking too much for them to generate floating point random numbers To make these small computers more entertaining a simple method to shuffle cards is de Scribed here This method is implement ed in a KIM The machine instructions use about 80 bytes There is lots of mem ory left for playing card games The only drawback is that it requires the operator to press the interrupt key in orderto stop the program The card shuffling program consists of two portions The second portion is the main program that shuffles cards It just keeps on shuffling until the interrupt key is pressed The first portion is an inter rupt service routine used to ensure an orderly
99. be no annoying continuous tone The other pins on J4 are quite useful because they are connected directly to the keyboard matrix The graphics manuai has a short description of how to deactivate the CTRL C routine and how to check for a key depressed If you were to connect lines 1 through 11 on J4 to some switches you could use the pro cedure to determine whether the swit ches were closed In this way one might simulate a joystick By using four switches you could in dicate eight directions North east south and west could be indicated when exactly one switch was closed the switch in that particular direction on your joystick Northeast southeast southwest and northwest could be in dicated by two adjacent switches being closed at the same time By this means you could move a point on the screen in any of eight directions Another very good use for these lines would be to add a numeric keypad in parallel with the keyboard To do so you need only wire the switches on the keypad so they are in parallel with the corresponding keys on the keyboard as shown in the schematic sheet 12 See 17 45 Figure 4 for a diagram of these switcnes By doing this and writing a short BASIC program you could imitate a very power ful calculator The J1 Port This port is what OSI uses for expan sion It has all the data and address lines in addition to several of the control lines that the 6502 produces sug gested in my pr
100. cks for more elaborate microprocessor based designs the stop watch interface and timing program could be used for time and motion studies around the house Just make sure your spouse s motions do not make you lose track of the time Editor Portions of this article are from Dr De Jong s forthcoming book ten tatively entitled 6502 Microcomputing to be published by Howard W Sams and Company and scheduled for release later this autumn 17 39 120 inc ALLAMUCHY N J 07820 201 362 3574 HUDSON DIGITAL ELECTRONICS INC THE HDE MINI DISK SYSTEM The HDE DM816 MD1 Mini Disk System is the per ipheral you have been waiting for No longer bounded by long and unreliable cassette saves and loads your computer becomes a sophisticated system for program development or general purpose use With the HDE Mini Disk you load and save programs in seconds not minutes or hours And since all transfers to and from the Mini Disk are verified for accuracy the data will be there when you need it The DM816 MD1 Mini Disk has been systems engineered to provide a complete and integrated capa bility Software and hardware have been builtas a team using the most reliable components available The sys tems software includes the acclaimed and proven HDE File Oriented Disk System and Text EDitor requir ing only 8K for the operating software and overlay area Systems expanding programs available include the VERS
101. command and the system defaults to NOMON status The hooks at 36 and 37 the print routine now contain 9E81 The routine to restore DOS is now at 9DBF This can be called if page 3 is overwritten The command and error message tables are in different loca tions The command table is the same as in the DOS 3 1 The error messages however are quite different After a BLOAD A is now found at AA72 3 L is now found at AA60 1 When the keyboard input routine 9E81 is called DOS checks the mode If it is in direct mode the DOS reads the keyboard then goes to the print routine The print routine has seven routines of it s own 0 6 It calls the correct one depending on whether the mode is direct deferred execute read or write etc These routines are all inter related In direct mode when a return is detected DOS attempts to match the string in the keyboard input buffer 200 2FF to a command in the table In October 1979 the print mode direct or deferred it stores ali characters in the keyboard in put buffer until a return is detected It then checks for a CTRL D as the first character If not found DOS drops out and returns control to wherever it came from However if Control D is detected DOS attempts to match the string to the command table If a match is not made it prints Syntax Error When DOS matches a command it then checks for names if needed or numbers if needed After getting
102. counting to proceed again if equally spaced 10 hour interrupts are desired October 1979 MICRO The 6502 Journal ee 7590 NS i2 Er 10 square wave of known frequency to the clock input on the 7474 For example if the pulses from the signal conditioner shown in Figure 3 are applied to the 7474 then the time interval should be 1 60 of a second Since 1 60 0 01666 and 0 0001 second 4 0030 from T ble VI then the number 1666 should be displayed for the time bet ween successive positive pulses Be sure to change the bytes at 0221 and 0226 to 30 and 00 respectively in Table X if you make this test Finally if an event can be made to pro duce a single positive pulse for its dura tion the length of the event may be measured using a slightly modified form of the program in Table X and the circuit shown in Figure 6 In conclusion should like to point out that the programs and circuits given are the simplest ones could construct You will want to add more elegant features The purpose of this article was to in troduce a few basic techniques not to present elaborate designs If you come up with a neat design as a result of something you learned here would be very interested in getting a letter from you Better yet write up your circuit and program and publish both in MICRO Although the circuits and programs described here were intended to be building blo
103. ctive high It should be con nected to the CTS on the 6850 that is it should be connected to J2 pin 3 You wil have to switch W11 properly since the CTS goes through this junction You may also have a TTL line which controls the power on off on your peripheral Maybe you would like to control the cassette motor You can do this with the RTS signal It is a signal provided by the 6850 under software control that is your software since OSI doesn t sup port this function Because it is fed through a 7417 buffer which is capable of sinking 30 milliamps you can use it to drive a small reed relay purchased just such a relay which operates on 5 voits at about 20 milliamps and have used it to turn my cassette on and off See Figure 2 for a schematic used to connect a relay to the RTS signal Now ail the connections are made but how do you instruct the computer to 17 43 transmit and receive these signals Remember that the cassette is also con nected to the 6850 and so as far as soft ware is concerned the peripheral will work just like the cassette Whatever you write to your cassette will go to the TxData line and to your peripheral You read your peripheral just as you would read from the cassette after you switch W10 over Let us suppose that you have a printer connected to the TxData line and that it sends a busy signal back over the CTS line when it is working Whenever you give the command to SAVE in BAS
104. decimal and display it Preset the flip flop by toggling PB Measure another interval Set carry for subtractions that follow Find FFFF number of pulses counted Hign order byte stored in CNTHI Now get the low order byte of the count Low order byte stored in CNTIO Conversion of hex to decimal starts here Y contains number of bits to convert Shift one bit at a time into the carry flag X will serve as a counter for a triple precision addition with LEAST MIDST and MOST holding the answer Increment X to zero then three bytes have been added Decrement Y until all the bits have been used When Y 0 conversion is complete Jump to AIM 65 Display Routine Now clear the counter locations tc get the time for the next two pulses Return to the timing program MICRO The 6502 Journal frequency counter and then applying the relation T 1 f where T is the time bet ween successive events and f is the fre quency of the events For low frequency periodic events such as a race the only choice is to measure the time interval directly We will assume that the events pro duce positive pulses and we will not try to describe how the positive pulses can be produced Rather our problem will be restricted to measuring the time bet ween two successive positive pulses A circuit and a program to accomplish this are shown in Figure 4 and Table X respectively The circuit was inspired by Carlin s
105. ds and so on Because of the continuing lack of information available from OSI the manufacturer of the Superboard and the Challenger 1P have decided that it would be good to give some basic and rather general pointers on the use of the Superboard ports Since there are many different peripherals understatement of the cen tury and since each one has its own requirements cannot be very specific about your particular device Instead 1 hope to describe the signals available on the Superboard in some detail so that you will at least know something about its interfacing possibilities The J2 Port There are four ports on the Super board Three of them are 12 pin Molex connectors and one of them is a 40 pin DIP socket They are numbered J1 through J4 shall begin with J2 since you are already using that one to inter face your video monitor and your cassette You will find a listing of the pin outs for J2 in Figure 1 Pins 7 through 10 are used for the cassette Pins 11 and 12 are used for the video output assume that you understand the basic use of these pins and so will on ly mention that the signals generated for the cassette come from an on board in terface consisting of a Motorola 6850 ACIA and a couple of flip flops U64 The audio input goes through an RCA 3130 which triggers a monostable one shot and sets or resets a flip flop This signal is then fed to the 6850 The signals at the 6850 are designated
106. dule 357 95 Gives ane arlication connector port and one SYSTEMS interface Fort MANIFOLD MODULE EXPANDER MODULE CABLE Interconnect Cables T Fs i computer interface to AINL s MANDIS XPANIR1 etc CABLE 24 Intercannect Cable BLT GS 24 inct cable with inlerface connector on one end and an OCON nt on the other 1 Manual and Uiselay Module THA Connect between Lhe 6 and computer interface Allows computer of Lhe Displaws channel number nd dala 438 Interface TRA Allows he DAM SYSTEMS MODULES Lo be used wiih the GPIB bus instead of a computer s ather 1 0 Porls RS232 2 Interface Module Allows DAM SYSTEMS MODULES Lo be used wilh an RS 232 ar tere nal XPANDFL Exranden Module TRA Allows 1 gt Lo 128 8 bit analog inputs 8 AIMIG Modules lo be connect j lo one sustes YSTEMS sets AIM16 Starter Set i 189 00 Include one 61 one POW one ICON and one OCON AIM1461 Starter Set 2 239 00 Include one AIMI E one one MAMHDDI and one OCON FETSET1a 295 00 Include one PETMOD one CABLE A24 me AIMI6i one POI and one Di KIMSET 1 285 00 Includes one KINOD one CABLE A24 one one and Di SYM 1 6532 Programmable Timer The 6532 interval timer is u
107. e 4 1 buffered expansion slots Mounts like KIM 4 or with CPU board stand ing up Accepts KIM 4 compatible boards 40 slot Motherboard expansion available e Full access to application amp expansion SEAWEL L s Maxi Mother connector _ LED indicators for IRQ NMI and power on zal du c CL cde e e Also compatible with 5 1 SEA 46 the w 4K 25221 PROMMER SEA PROTO SEA ISDC and more ssempied For further information contact SEAWELL Marketing Inc SEAWELL Marketing Inc 345 N W 85th P O Box 17006 Seattle WA 98117 Seattle WA 98107 206 782 9480 POWERSOFT INC products for the P O BOX 157 PITMAN NEW JERSEY 08071 APPLE 609 589 5500 APPLESOFT UTILITY Diskette Only 12 45 The Applesoft 1 Utility program provides the user with the following features Complete automatic renumbering of any Applesoft 11 program b The creation of an EXEC File for subroutine file creation This feature allows you to incorporate the same subroutine in various pro grams c No modification of the program in machine memory RAM d Automatic running of the program No programmer should be without this excellent utility program REQUIREMENTS Disk il Applesoft 11 16K of memory REAL ESTATE ANALYSIS PROGRAM 14 95 The Real Estate Analysis Program provides the user with three features a A pcwerful real estate investment analysis for buy sell decisions and time to hold decisions for optimal
108. e at 9DEA to set return addresses correctly INT makes certain the ROM card is off then goes to 9D84 to set return ad dresses correctly If a person wishes to use DOS from a language or operating system not stan dard to the APPLE there is no problem unless an error is detected If you do not wish an error message to cause a return to BASIC or Applesoft the address at 9D5E and F can be changed for your particular system Whenever a change in language is done DOS updates it s return address stack fronr the stack for that particular language All commands except PRH IN MON NOMON INT FP if in ROM and MAXFILES go through routines that use fiie buffers 17 7 All commands may be called from monitor or machine language provided 1 A language change is not needed 2 the file names have been placed into the name buffer s and 3 that any other parameters have been properly placed into their locations as needed The disk controller card contains two 2 PROM s 256 bytes each One PROM contains the program to start the booting of the DOS The other is used for a program that together with some other IC s actually controis the head position reading a bit writing a bit sen ding the byte to the APPLE bus and get ting a byte from the APPLE bus The following locations control the hardware functions Add 0050 to each address S the slot number of the controller card C080 87 These addresses sequen tial
109. each is called from You are even alerted to calis to lines no longer in the listing Optional descriptors are for each line number REPLACE allows you to easily rename any or all oc curances of any variable in your program Even change variabla types Can also be used to replace constants or referenced line numbers within the listing The Literal Mode allows you to replace any set of characters or BASIC statements with any other set This program is especially useful when appending subroutines with conflicting variable use Price 59 95 for cassette 13 95 for diskette California residents must add 6 per cent sales tax Includes Three programs plus documentation Author Roger Wagner Available from Local Computer Stores or Southwestern Data Systems P O Box 582 CA 92071 714 562 3670 SASE for free information October 1979 Name Roger s Easel System Apple II Memory 16K for Integer and Applesoft ROM 20K for Ap plesoftiRAM Description Set of three programs Roger s Easel Lo Res Link Integer and Lo Res Link Appiesoft paddle oriented sketching program using the color graphics of the APPLE II The unique features of this set include the ability to store and retrieve user created pictures from tape or disk ability to erase with a single keystroke resuming original color when done and immediate ac cess to a detailed help list while in the program The most outstanding feature is
110. eal Gas pgs 26 41 Use your PET to experiment with physical models Meushaw Robert V The Standard Data Encrypiion Algorithm pgs 110 126 Using the KIM 1 in encryption 480 KB Microcomputing formerly Kilobaud No 29 May 1979 Lindsay Len PET Pourri pgs 6 7 New PET versions of the Microtechnology Unlimited KIM music board and visible memory are in the offing More on tape head alignment on the PET A TAPE TEST program from Jim Butterfield is listed Anon OSI Small Systems Journal pgs 8 11 The OS Small Systems Journal is now published as section of Microcomputing Anon Products pgs 14 25 A new control board for PET An ADC Adapter module for PET and Superchip for the APPLE Knox Thomas Brazil Ray H and Richardson Robert M Letters to tne Editor pas 23 24 October 1979 Letters discuss advantages and disadvantages of APPLE and TRS 80 Pepper Clement S pgs 34 38 This KIM 1 frequency counter timer can be used with any m cro with comparable features 481 Southeastern Software Newsletter No 8 April 1979 McClelland Geo A Fast Circle Drawing Program og 2 On the APPLE Use FDOC RDKEY With several exam ples a good tutorial Also explains exclusive OR McClelland Geo Program to Print Applesoft Tokens pg 4 Listing of a program to supplement an earlier program to print Integer BASIC tokens McC elland Geo Searchin
111. eductible classification and single disk drive copy backup o protect against data loss The program sup ports systems equipped with a printer and can provide user sele sted permanent listing via a unique page print mode is software package is the most complete easy to u se home financial program available today Copies 20 Price 3 95 plus 1 00 postage and handling California residents must add 6 per cent sales tax Includes software supplied on a program diskette with complete 32 page user s manual Author Jeffrey Gold Available from Softwaie Concepts 1172 Cuperti 10 CA 95014 MICRO The 6502 Jour 1al 17 49 Name Belais Master Index to Computer Programs in BASIC System All Memory Language BASIC a few programs require machine language routines Hardware N A Description directory of computer programs written in BASIC The programs are ones that have appeared in ten major home computer magazines They cover both business and personal applications All major computer systems are included Many of the programs are written specifically to take advantage of the capabilities of such 6502 based computers as the PET and the APPLE The reviews provide detailed information about what each program does and what hardware and software it needs Program listings are not provided but informa tion is given on where to get them Price 9 95 pilus 1 00 shipping California reside
112. eload the two counter registers from the numbers stored in its latches T1LL and The last instruction Table V is an in finite loop that simulates the user s pro gram intended to run concurrently with generation of the square wave Table lists some values for N that are frequent ly used in timing applications If you have an oscilloscope run the program with various values of N and connect the Continued on page 34 17 31 PERSONAL COMPUTER COMPUTER SYSTEMS DELIVERS NOW ATARI 400 ATARI 8007 PERSONAL COMPUTER PERSONAL COMPUTER SYSTEM SYSTEM PRICE INCLUDES PRICE INCLUDES computer Console Computer Console ASIC Language Cartridge BASIC Language Cartridge Education System Master Cartridge BASIC Language Programming BASIC Language Programming Manual Wiley Manual Wiley 400 Operator s Manual with 800 Operator s Manual with Note Book Note Book ATARI 410 Program Recorder Power Suppiy Guide to BASIC Programming Cassette TV Switch Box 8K RAM Module Power Supply TV Switch Box 554999 11 5000999 WE PROMISE DELIVER We GUARANTEE ship dates on prepaid Computer Systen orders Send your orders in now e f for reasons beyond our control we miss a ship date ve will REFUND the shipping and handling harge and give you a 10 DISCOUNT on any future software purchases for your ystem For prepaid system orders get a FREE Accessory Contrc Iler of yo
113. ette plus 1 25 shipping Includes User manual and documentation Author Gary E Haffer Available from Software Technology for Computers P O Box 428 Belmont MA 02178 17 50 MICRO The 6502 Journal Name Black Box Systein APPLE Il Memory 16K Language Integer BASIC Hardware Cassette Descr ption The program Black Box is based on the Parker Brother s game of the same name The object of the is to guess the positions of marbles that are hidden an eight by eight board To help you find the marbles rays are sent into the box These rays can hit a marbie be deflected by a marble be absorbed into the box any combination of these There are full instruc tions inside the program and a sample game to get you going Test your reasoning power against the mystical Black Box Price 8 00 Includes Verified cassette postage and handling Autho Robin Hodgson Available from The AppleCorp 103 Horizon 14 723 14th St N W Calgary Alberta Canada T2N 2A4 Name APPLE DOC Syster1 APPLE Il 3 5 to 5 8K depending on options Langu age Applesoft II Descr ption Set of three programs VARDOC LINED OC and REPLACE produces list of every variable used in your program and all the lines each is used on Screen and or printer output can include optional descriptors of each variable LINEDOC produces a list of every line called by a GOTO GOSUB etc and all the lines
114. evious article that this socket could be connected to a KIM type connector to make a KIM expansion port That is more or less true but as you will see from checking the signals available on J1 and the required signals on the KIM expansion port there are a few missing The most important ones are there and it just may be that the ones you need to operate your peripheral memory board or whatever are present Pin 3 the DD line needs some ex planation This line is an incoming signal that is used to control the data buffers U6 and U7 This line must be driven by the R W signal so suggest that you connect both the signal that you get from U21 pin 6 and the line from J1 pin 3 to the pin on the KIM expansion connector d 2 PRESENTS APPLE BUSINESS SOFTWARE 48k amp disk required APPLE DMS Apple data management system form systems You define the name and length of fields within each record Multi disk capability gives you access to thousands of records at once with the included sort edit features The print format is aiso defined by the user for custom report generation Uses include mailing inventory personnel data and other record labels keeping functions APPLE SCRIBE 2 Text processor PROGRAMMING disk or cassette the perfect addition to any business think a 40 wire ribbon catie with a DIP plug on the end of it woud be the best thing to make the connec ion from
115. expand contract or move it anywhere on your video screen with lew simple keystrokes Save individual figures or complete draw ings on disk and recall them later U DRAW 1 automatically builds and edits multi figure shape tables that are directly transferable to your BASIC programs You won t tind better graphics capabilities at 100 times the price APPILOT EDU DISK 32k 49 95 A complete muiti program 1 system for the APPLE includes program editor and APPILOT interpretor on diskette with exten sive on line HELP tessons plus documentation manuai THREE MILE ISLAND 48k 39 95 Is the technology of a nuclear reactor too complex to nandle Now you have the opportunity to decide for yourself with THREE MILE ISLAND areaiistic simulation of a pressurized nuciear reactor Four spectacular displays monitor the containment building turbines fiters condenser reactor core and the pump house Vaives pumps turbines filters and control rods are ndrvidually activated by keyboard command The comprehensive documentation describes Ir detail operating mechanisms and component interactions Order by phone 301 661 8531 SUPER LOAD CASSETTES U DRAW 16k 17 95 ELECTRIC CRAYON Bk 17 95 MAZE GAME 8k 12 95 ESCAPE 16k 12 95 SIDE SHOWS Bk 12 95 TANK WAR 16k 12 95 MUSIC BOX 8k 12 95 BASEBALL 16k 14 95 UNCLE SAM S JIGSAW 32k 12 95 GLOBAL WAR 32k 17 95 Plus APPLESOFT M US
116. features 3 BIKE An exciting new simulation that puts you in when combined with the fun of the number 1 arcade game equals ar action packed video spectacle for your computer Bumpers chutes flippers free balls gates a jackpot and a little luck guarantee a great game for all 9 95 Authors Our royalties are unbeatable SPECIAL add an exciting new dimension to your PET computer SOUND with Soundware s soundsatior al music box and sonicsound software from Sofiside amp Soundware THE SOUNDWORKS MUSICAL SOFTWARE x The Soundware music box for your PET ACTION PACK Breakthru Target comes complete with controllable volume Catterp non stop graphic action 9 95 an earphone jack a demo tape with two PINBA L a video action spectacle with programs an instruction book and a one real tin e flippers chutes gates bumpers year warranty this sturdy unitis enclosed taps SANUS 9 95 in an attractive plastic case Notes tell CLASS CS Checkers Backgammon how to program your own sound effects Board Piano Player checkers vs com All this during our musical madness for puter o friend Piano plays Minute Waltz JUSE cederet eem sie cate b E 29 95 9 95 MUSIC MANIA Try to repeat a growing WORD FUN Speller fun ways to practice sequence of tones With graphics Chal spelling Scramble Flashcards 9 95 lenge the best ear 9 95 Yo MUSICAL MADDNESS
117. file down 9E51 Stack for the above routine 982D 9 81 Keyboard input routine 9AA6 Data 9EBD Calls correct internal print routine depending 9BA6 Track and sector upon mode 9CA6 Miscellaneous 9ED1 Restores keyboard and print hooks 9CD3 Name 9EEB Internal routine for information from the disk 9CF1 2 Address of start of miscellaneous info buffer 9F12 Internal routine for printing 9CA6 9F23 Prints and exits DOS 9CF3 4 Address of start of track and sector buffer 9BA6 9F2F Keyboard input internal routine 9CF5 6 Address of start of data buffer 9AA6 9F52 Internal routine for sending information to disk 9CF7 8 OM of start of name buffer of next file down 9F61 Routine to correct internal routine 9CF9 _ ges 9F71 Used by the EXEC command 9CFF 9F83 Mask MON status print and exit MICRO The 6502 Journal October 1979 9FC8 9FCD A229 22 233 230 251 263 271 275 270 281 298 A2A3 A2EA A331 A35D A38E A397 A413 A4D1 4 5 4 A4FC 506 510 51 54 56 57 59 5 6 ASDD A60E A626 A644 A65E A679 A682 690 6 4 A6C8 A6CC A6DO A6D5 71 743 74 A764 October 1979 Does a RETURN Start of section that attempts to match to a com mand and get all information needed and all op tional information given Checks syntax and ranges before execution PR routine IN routine MON routine NOMON routine MAXFILES routine Start
118. for the interval timer to time out is T 1 Tc where is the 16 bit number loaded into the counter and T is the clock period typically one microsecond If the branch instructions LDA IFR AND 20 BEQ WAIT are taken into ac count then the total loop time TL is given by the expression N lt T lt 14 T The uncertainty of eight cycles in the loop time arises from the uncertainty of where the T2 counter timer actually times out in the series of test and branch instructions within the loop For the numbers that were used in Table Table Il Memory Assignments and Functions of Some of the Registers of the 6522 VIA WRITE STA TILL READ LDA WRITE STA T1LH READ LDA T1CH WRITE STA T1LL READ LDA TILL WRITE STA T1LH READ IDA TiLH WRITE STA T2LL READ IDA T2CL WRITE STA T2CH READ LDA T2CH FUNCTION Load an eight bit number to the low order byte of the latch Read the contents of the lo order byte of the T1 counter and clear the interrupt flag b t six of the IFR Load an eight bit number the high order byte of the 1 latch transfer the contents of bth 1 latches to the 1 counters clear the 1 interrupt flag and start the counting process Read the contents of the h gh order byte of the T1 counter Load an eight bit number into the low order byte of the T1 latch Read the contents of the low order byte of the
119. free LSRA TO BE TRANSMITTED BEC WAIT WAIT LOA STATUS WAIT FOR ANDIM 08 PRINTER BNE WAITI READY READY WHEN READY STA DATA OUTPUT DATA 49 00 RTN RTS CASOFF LOAIM 51 STATUS RTS CASON LOAM 11 STA STATUS RIS Figure 3 October 1979 EVE GOT YOUR COMPUTER C1 P 349 A dramatic breakthrough in price and per C1 P M F 995 First floppy disk based computer formance Features OSI s ultra fast BASIC in ROM full graphics for under 1000 Same great features as the C1P plus more display capability and large library of software on cassette and memory and instant program and data retrieval Canbe disk including entertainment programs personal finance expanded to 32K static RAM and a second mini floppy small business and home applications It S a complete pro Italso supports aprinter 4 M grammable cornputer system ready to go Just plug in a video modem realtime clock 4 monitor or TV through an RF converter and be up and running and AC remote interface 15K total memory including 8K BASIC and 4K RAM well as OS 65D expandable to 8K V3 0 development disk operating system 2 598 The professional portable that has over 3 times the display capability of 1P s Features 32 x 64 character display capability graphics full computer type keyboard audio cassette port and 4 slot BUS only two used in base machine It has 8K BASIC RAM and can
120. g 8 A listing of the 255 PET Tokens Butterfield Jim Thoughts on PET BASIC pgs 10 12 Hints for PET users GET statements the PET timer precautions for amateur mechanics print suppression etc Sherman H Machine Language Load Program pg 14 A BASIC program which loads a machine language routine into the PET Anon pg 18 A machine language program for tracing the progress of a BASIC program Strasma Jim Installing a Second Keyboard pgs 20 21 Instructions and discussion of the keyboard installation Butterfield Jim Unlist List Protection pg 21 How to protect your program listing Albrecht Bob and Karl PET BASIC for Parents and Teachers pgs 24 25 Part 6 of this continuing tutorial Butterfield Jim PET Memory Locations pgs 26 28 Listing of a large number of key locations and functions Butterfield Jim Head Alignment pg 32 Procedure and program listing of a tape test to help solve this important problem 486 Design News April 23 1979 Stefanides E J Personal Computers Become Tool of the Average pgs 42 48 17 62 MICRO The 6502 Jounal 487 Byte 4 No 5 May 1979 Pfeif er Erich A Aids for Hand Assembling Programs pgs 238 244 The article s assembly method is used for program development on a 1 microcomputer 488 Southeastern Software Newsletter Issue No 9 May 1979 Hartley Tim Stop Li
121. g For this reason it is best to edge of a misty lake that stretches converse in verb noun phrases In the endlessly out before you to the case of moving from chamber to north chamber for example enter GOW 6 lake shore You are standing simply W and the verb GO will be on a damp sandy shoreline with a implied The Spelunker program will very low passage leading off to the move you into the next room to the west west A clammy draft issues from upon receiving this command Other ex the low ceilinged passage amples might include TAKE LIGHT or JUMP DOWN 7 Worth lake shore A small sandy beach on the northern edge of Misty With this brief introduction you Lake should be ready to explore the caverns of Spelunker While you are about it try 8 Maze room Also known as the drawing a map of the cave You may also Swiss cheese room You loose your wish to discover exactly what sense of direction because twisting vocabulary is understood by the pro passages are coming and going at gram The material that follows is for the all points of the compass 29 don t ruin your first 9 Frozen river room What appears to y peeking at it b 222 e a petrified river bed slopes gent For the Guide Only ly upward leading toward he west it In the 16K APPLE Il version of hasa low fourfoot ceiling Spelunker the chamber descriptions are 10 Swift river room You hear swiftly not part of the program beca
122. g for a Small String Embodied in a Larger String pg 5 Simple listing to use with files or data statements etc McClelland Geo Running Disk Programs the Easy Way pg 6 Use of the cursor makes reading in those program titles easy 482 6 02 User Notes No 14 April 1979 Zube Jim KIM 1 Banner pgs 1 9 Designed for a 40 column printer Larrabee Robert D Check Out pgs 9 14 How to check out a new program on the KIM without having to continually hit the plus key Back up feature And ability to ADD some material in the middle of a pro gram Schilling Heinz Joachim BASIC Mod and Programming Hirt pg 12 A modification to correct a problem of reloading programs on the KIM using Microsoft BASIC Grabowsky Dick BASIC Output Paging Mod pgs 12 13 How to limit program listing to 16 lines at a time on the KIM using Microsoft BASIC McKenna Sean Automatic Line Number Entry Prompt for BASIC pg 13 An automatic line numbering input routine for 9 digit KIM BASIC Herman Harvey Renumber Addendum and Some Mods pg 13 Hin s for KIM Microsoft BASIC Grabowsky Dick New Command for BASIC pg 15 Implementing the GET command in KIM BASIC Anon Computer Language Forum pg 17 Notas and discussions of FOCAL Tiny BASIC FORTH and XPLO MICRO The 6502 Journal 17 61 Mackay Accessing the SYM Displays pg 18 A program to output characters on the display
123. he Cashier Retail Store Management 239 90 Checkbook Cassette Appiesoft I Language amp Demo RAM Test Tape with Manual Finance 1 2 Cassette Package Datamover Telepong Cassette amp Modem Req d Microchess 2 0 Chess Tape Bowling Program Tape Pascal witn Language System 48K RAM amp Oisk II Required MISCELLANEOUS vinyl Diskette Holder Pages Pkg of 1 Diskette Boxes Plastic Diskettes Apple Box of 10 Verbatim of 10 Dysan of 5 Decais Rainbow Apple inside Window 2 Outside Window 127 Outside Window 17 Apple Logo Rainbow T Shirts Specify Men Women child small medium or large Apple Owners PSU Apple Reference Manual Apple Soft Manual Programmer s Gulde Computer Station Apple il Monitor Peeled Software Directory for Appie Business Finance Utility Games Demo Utility Best of Contact PBs rin TE M MADE POOR 2 50 Programming In PASCAL 9 90 Commodore PET Service Kit 5 when tape is Loaded music with PET Video Buffer Attach another display Combo Petunia and Video Buffer SOFTWARE FOR PET cneckers and Baccarat 7 95 The 19 95 Real estate 1 amp 2 Series and Parallel Momentum and Energy Circult Analysis Projectite Motion Home Accounting 9 95 BASIC Math 29 9 Dow 95 game playing with BASIC Petunia Playe
124. hese are coupled through resistors and a Capacitor to pin 12 of J4 The main problem is that the resistors are not installed nor are their values given have not experimented enough with these to determine what values would work best to give four bit analog output The main reason have not done this experimentation is that have not thought the noise would be very useful because it is coupled to the keyboard For this reason whenever the keyboard input routine is called a tone is generated by a loop in that routine which sets and resets the keyboard iat ches If you wanted to produce some music you could do so by choosing proper values for these resistors and then writing a small program to turn on and off these latches by writing to address DFOO would advise installing a switch between the output of pin 12 and your amplifier since you will want to turn off this noise whenever you are not generating some music or gaming sound effects The keyboard routine s continuous tone is rather annoying after a while If you want a beeper to signa various conditions audibly then recommend that you use the RTS output at J2 it comes from a heavy buffer which could be connected through a 100 ohm resistor and a small speaker to the 5 volt line When this RTS signal is turned on and off at the proper rate it would make a nice beeper without the need for the amplifier that the output at J4 pin 12 re quires Also there would
125. ieces 9 95 SINGLE DRIVE COPY is a special utility program written by Vince Corsetti in Integer BASIC that will copy a diskette using only one drive It is supplied on tape and should be loaded onto a diskette It automatically adjusts for APPLE memory size and should be used with DOS 3 2 19 95 SAUCER INVASION lets you defend the empire by shooting down a flying saucer You control your position with the pad dle while firing your missile at the invader Written by Bob Bishop 9 95 HARDWARE LIGHT PEN with seven supporting routines The light meter takes intensity readings every fraction of a second from 0 to 588 The light graph generates a display of light intensity on the screen The light pen connects points that have been drawn on the screen in low or high resolution and displays their coordinates A special utility displays any number of points on the screen for use in menu selection or games and selects a point when the light pen touches it The package in cludes light pen calculator and light pen TAC TOE Neil D Lipson s programs use artificial intelligence and are not confused by outside light The hi res light pen only requires 48K and ROM card 34 95 TO ORDER Send check or money order to 0 Box 273 Plymouth Meeting PA 19462 PA residents add 6 sales tax U S and foreign dealer and distributor inquiries invited All programs require 16K memory unless specified The MICRO Software Catalog XI
126. ions to disk add 5 California residents add 6 sales tax Sorry we can not ship to P 0 Boxes VISA MASTERCHARGE Welcomed RAINBOW S CASINO 9 gambling games Roulette Blackjack Craps Horserace and a few originals that Vegas hasn t heard about Needs 16 29 95 16K SPACE WAR Yau in your space capsule battle against the computer s saucer hi res graphics 12 16K MEMORY VERIFY Diagnostic routine to check range of mem ory Indicates faulty addresses data in memory cell and faulty data d Ren eis 5 16K APPLEODION Music synthesis composes original Irish jigs Enter your own music and save on tape or disk Includes 3 Bach fugues 10 16K APPLEVISION Demo for Hi Res graphics and music Tapes Sree Ses Bye ae 10 32K COMPU READ 5 programs to teach you speed reading in stages Includes synonym and antonym identification You control 48K PERCEPTION II 111 random shapes and sizes must be matched In IIl you control format and display time and get weighted scores Needs ROM Each Disk 24 95 32K STORY TELLER Use your bizarre imagination and input key words for fantastic and funny tales Never the same story twice ERE d eus 12 95 32K WAR RESCUE Engage in 10 battles with your infantry against the Apple robots Calculate Apple s strategy
127. ith DOS Language Integer and Applesoft BASIC Disk drive Descript on Set of nine programs on disk Programs include sheckbook update to DOS update electronic index fil auto write instructions find hidden control characters slow stop list disk space listing headers and exec reader A complete listing is provided for all program and programming Checkb ok update rewrites your original checkbook program for use with the disk drive Routines have been added to change accounts or list bank names with unt numbers etc Index update rewrites Bob Bishop s electronic index file for complete automation A printing routine has been added for hard cory Auto write appends subroutines to existing programs converts integer BASIC listings to Applesoft or vice versa Auto write documentation gives detailed instructions for using the program to patch in lines in any part of a program or delete itlegal lines such as 65535 etc Find hidden control characte displays any control character burried in a catalog name or any listing for both integer or Applesoft BASIC Disk space is written in Applesoft and gives sectors and bytes left on a diskette No text files are created by the program and operating time is three seconds Slow stop list may be loaded in and used continuously after switching disks or languages Exec reader will read text files for all of the abov2 with the exception of index file Price 13 95 I
128. ive or all Block operations copy delete or save to disk Select multiple or single screen mode ADVANCED FILE HANDLING Requires only two keystrokes to load or save a file to disk The file name does not have to be entered which eliminates misspelling MATH Automatic column totals Formula computations User selectable number of decimal positions Automatically switches to scientific notation when necessary 14 significant digits PRINT CONTROLS Upper and lower case printing without acditional hardware Automatic paragraph indentation Single ordouble space printing Selectable right justification of text Variable page length and width Automatic page numbering Selectable chapter relative page numbering Automatic print tabbing Right or left justification of columnar data Single sheet or continous form printing Superscripting and subscripting Undersco ing Line centering Automatic link and printing of multiple text files 48k 99 95 MICRO INFORMATION 48k 99 95 is a breakthrough in effective in lorma ion systems of any size This one system handles accounts payable receivable inventories appointment calendars cost estimating real estate listings sales solicita tons manpower accounting selective mailings and label printing dietary informa phone directories and more On diskette U DRAW 32k 39 95 a complete graphics package for the Apple II with disk You can create a figure and rotate
129. k Caler dar Auto Start Rom Package For Apple olgktizer a by Talos tKitformi High Resolution Lignt Micromodent D C Hayes 12 B W Leebex Mpnitor Cable from Monitor to Apple 13 Color T Compatible with Appie It Sup R Modulator RF SOFTWARE OR APPLE II PASCAL fror Programma FORTH LISP from Apple Software No 3 LISA Interzctive disk assembler WHATSIT Excetlent conversational data base manager 32K 100 00 48K 125 00 SARGON of 2nd West Coast Computer Falre APPLE PIE xcelient text editor FORTE Music editor In hires FASTGAMMON Excellent backgammon game with graphics 20 00 Disk 25 90 APPLE 21 blackjack game 9 95 BRIDCE CHA LENGER Computer i bridge 14 95 FINANCIAL MANACEMENT SYSTE Accounts Payable Processing Accounts Recelvable Pay roll 800 Comptete Inventory Controi 10 for Manual 200 Eacr Package PRINTER SPECIALS FOR APPLE AND PET TEM 100 with Interface for Apple or PET 450 00 PEN used with or monitor Music Synthesizer Boards Supertalk Anadex OP 9000 with tracter 8 paper width and interface to Apple 1050 00 Centronics 779 2 for Appie tl with parallel interface 1245 00 SOFTWARE Send for complete software Catalog 1 00 Dow Jones Portfolio Evaluator 32 ed Controller ence Business apoie Post Mailing List System Bowling Program Diskette T
130. ly step the motor that moves the head back and forth Odd addresses step one way and even ad dresses step the other way C088 Turns off the drive motor C089 Turns on the drive motor C08A Enables drive two C088 Enables drive one 08 Control connecting the AP PLE bus to the hardware for strobing the byte in or out of the 74LS323 IC shift regis ter depending upon the pre viously set status of COBE F COBE F Read Write control have documented all routines sub routines buffers and other locations to the best of my ability in the memory maps that follow Notes tell the function and usage of each On most items have given only the starting address The end address is implied to be the next documented location minus one On stacks of addresses the parenthesized number is the number of addresses con tained in that stack Remember that any two byte items are always stored low byte first Documentation of addresses the BOOO BFFF area may be in error because that area got too complex for me to retain my sanity My thanks to my family for their time and patience to other persons for their articles on DOS functions APPLE for their excellent documentation without which 1 would have had no idea what was going on and to Terry and Kent at Computerland of Portland for use of their printer to obtain 60 feet of hard copy and their moral support EEE ical APPLE DOS 3 2 Memory
131. n 0 1 centers for designing your own circuits APB 1Protoboard 17 95 APPLIITIME a Real Time Clock for the A pple ll Plugs directly into any slot and keeps time even when computzr is off Features 12 24 Hour ECD ASCII data format and AC Cry tal time base selection Include software examples for machin language and BASIC pro grams Completely assembled and VERBATIM 514 DISKETTES tested SoftSector Box of 10 34 50 APT 1 Real Time Clock 79 95 plastic file case included west side electronics Box 636 Chatsworth CA 91311 Se We pay all shipping in Continental U S Others add 10 California residents add 696 tax PVENTURE GAMES OF HIGH ADVENTURE FOR THE APPLE II FROM SYNERGISTIC SOFTWARE 5221 120th Ave S E Bellevue WA 98006 The Apventure games combine the exciting graphics and sound effects capabilities of the APPLE Il with the fas cinating complexity of a mythical adventure game Monsters hazards obstacles weapons magical devices and vil powers confront the player at every turn as you jather treasure and try to reach your goal Two adve are now available DUNGEON CAMPAIGN Full color graphics subterranean adventure 16K required CASS 12 50 DISK 15 00 NILDERNESS CAMPAIGN HIRES graphics surface adventure 48K required CASS 15 00 DISK 17 50 GET BOTH ON ONE DISK FOR 30 00 WA Res add 5 3 sales tax Real Time Clock for OSI Disk Systems
132. ncludes One diskette plus documentation Author Dr Nick Romano Available from Softtouch Box 511 Leomirister 01453 MICRO The 6502 17 51 E D Morris H ypocyc D i d S 3200 Washington Street Midiand MI 48640 A Warning _ The MacroTeA is for Professional Programmers and Very Serious Amateurs Only Now a machine language pro gramming powerhouse for the knowledgeable programmer who wants to extend the PET s capa bilities to the maximum The MacroTeA the Relocating Macro Text Editor Assembler from Skyles Electric Works technique may be used on any micro The Skyles MacroTeA is a super powerful text editor 26 powerful editing commands String search and replace capability Manuscript feature for letters and other text Text loading and storage on tape or discs Supports tape drives discs CRT printers and keyboard The Skyles MacroTeA is a relocating machine language assembler with true macro capabilities A single name identifies a whole body of lines You write in big chunks examine modify and assemble the complete program And when loading the MacroTeA goes where you want it to go Macro and conditional assembly support Auto matic line numbering Labels up to 10 characters long The Skyles MacroTeA is an enhance Monitor 11 powerful commands to ease you past the rough spots of program debugging
133. nd allows the user to locate the actual address range of a line in memory so as to be able to insert CLR HIMEM etc It can also be used on occasion to recover programs garbaged by dropped bits Address HEX Converter converts between the HEX Integer and Applesoft address formats It also provides the two byte breakdown of numbers greater than 256 for use in pointers etc Screen Find is used for printing directly on the screen by POKEing appropriate values into the proper locations in memory Screen Find gives these values and locations when the characters desired and the horizontal and vertical screen positions are input Memory Move allows one to move blocks of memory October 1979 up or down any number of bytes from Integer or Applesoft The Monitor has a routine similar to this but it cannot be used to move blocks up a small distance and it is not possible to use it directly from Applesoft STR simulates the function of this name in Applesoft for use in Integer programs STR in Applesoft converts a number to a string VAL is similar but converts strings to numbers Copies Just Released Price 16 95 Calif residents add 6 per cent sales tax Includes Two cassettes or one diskette pius doc imentation Author Roger Wagner Available from Local Apple dealers or Southwestern Data Systems P O Eox 582 MC Santer 92071 714 62 3670 Softtouch Utility Pac Il System APPLE Memory 24K w
134. nt cable assembly No soldering or drilling is required The Basic Switch mates with a cable assembly at your primary board and does not use the physical connectors of ar y Pet ports Model 15 A allows you to use the BASIC Prograrr mer s Toolkit without the need for the additional 25 00 board or tying up your perts And since we ve designed the 15th socket to be readdressable watch for ROM pacs later in the Fall The Basic Switch With installed ROM With BASIC Retrofit Kit from Programmer Toolkit Commodore Model 14 E 564 95 149 95 Model 14 D 77 95 162 95 Model 15 A 99 95 184 95 149 95 Model 15 A with installed ROM Retrofit and Basi Programmer s Toolkit 229 95 Model 15 A with installed ROM Retrofit and both Toolkits 274 95 Old Pets were shipped with 24 or 28 pin ROMs ou must check which you have and specify at time of order Small Sysiem Services Inc The Basic Switch is a product of Sprin3 Garden Street Greensbo North Carolina 27403 Telephone 919 272 4867 Pet is a trademark of Commodore Business Mc chines Inc of Santa Clara The BASIC Programmer s Toolkit is a product of P alo Alto A Division of Nestar Systems Inc North Carolina residents add 4 sales tax All rs add 2 50 shipping s ue ees me is SUPER TEXT is a professional word processing system for the Apple and Apple Plus computers SUPER TEXT is the mos
135. nterval chosen for the listing in Table X is suitable for stopwatch functions and a suitable stopwatch in terface to the circuit of Figure 4 is given in Figure 5 This circuit simply de bounces the switch when it is momen tarily closed at the beginning and the 0200 A9 LDA 01 0202 8D STA 002 0205 8D STA A000 0208 DEC A000 20 A9 LDA E0 20 8D STA AOOB 0210 A9 LDA 4D 0212 8D STA 006 0215 9 LDA 03 217 80 STA A005 21 A9 LDA 9F Q21C 8D STA A008 021 A9 LDA 8C 0221 8D STA A009 0224 A9 0226 STA 0229 58 CLI Set up T2 Start counting Note Start T1 running end of the interval to be timed Phototransistor circuits can als be us ed to produce positive pulses wt en light beams are interrupted A photo plethysmograph be used to the time interval between heartbeats turning the circuit of Figure 4 into a cardiotachometer One way to test the circuit of l igure 4 and the program in Table X is to apply a Set up the Port B DDR with a one in bit zero Start with pin PBZ 1 to preset 7490 Allow 7490 to count Initialize ACR to put T1 in free running mode T counts Frequency of square wave on PB7 10 Hz 0 1 second 20 N 2 gt im Set up interrupt enable register IER to allow in interrupt request IRQ when T2 times out The interrupt routine should reload T2CH with 8C to clear tie IFR and allow
136. nts must include 6 per cent sales tax Includes Book Order info VISA Master Charge accepted give account number expiration date and signature Author Paul Belais Available from Falcon Publishing Dept Y P O Box 688 Ben Lomond CA 95005 Name Mailing List Program Memory 48K with DOS and Applesoft ROM Language Applesoft II Hardware APPLE Il disk drive printer Description The mailing list program is a disk based menu driven program written in Applesoft Il In order to use the program a 48K system with Applesoft firm ware along with one disk drive and DOS 3 2 is required If your system does not have Applesoft 11 on firmware the mailing list program can still be used but the number of entries will be greatly reduced The program is able to maintain a complete mailing list The mailing list data base can be changed sorted searched added deleted and reformatted There are five types of sort and five types of search Labels can be printed out on a 40 80 or 132 character printer and also viewed on the screen for rapid editing The program ac comodates zip codes with seven digits for use outside the U S A There is a routine for lining up the labels and for set ting the spaces between the labels Provision has also been made to make a backup copy of the data with a single disk drive The mailing list program makes generation and maintenance of a mailing list very quick and simple Price 34 95 for disk
137. number 2 Control D Mode direct deferred etc Value used for language e g INT 0 FPRAM C0 FP ROM 80 The name Applesoft Address of start of used by RWTS Address of start of buffer for track sector list us ed by RWTS Address of start of buffer for data used by RWTS Top of total RAM in the APPLE II Address stack for hardware routines 14 Address stack for hardware routines 6 17 9 AAF 1 AAFD AB28 ABDC 06 58 AC70 AC87 AC93 AC96 ACAB8 ACBB ACBE ACC7 ACCA ACDA ACEF ACF6 AD12 AD18 AD2B AD54 098 AE42 AE6A AE7E AE8E AF08 AF1D AF34 AF4B AF5E AFDC AFE4 AFF7 AFFB B011 17 10 Address stack for hardware routines 6 Goes to the correct hardware routine Reads VTOC and reads directory attempting to find an entry with the same name as the one given If not found checks the table of masks to see if it is allowed to create a file if it may it does so and if not it exits with FILE NOT FOUND or LANGUAGE NOT AVAILABLE Clears miscellaneous info hardware buffer sets volume number drive number and slot number Close routine Updates VTOC track bit map and sector count of directory entry as needed Rename routine Finds directory entry stores new name in entry then writes that directory sector back to disk Goes to correct hardware routine Goes to correct hardware routine Sets parameters for following ro
138. ocated at FFBA checks the load flag at 0203 If it is zero the routine jumps to the keyboard input routine at FDOO to input a character from the keyboard If the flag is non zero the input routine checks to see if the spacebar is pressed and if not it inputs one character from the 6850 and returns the spacebar is pressed it sets the load flag to zero and inputs a character which wil be a space since the spacebar is pressed from the keyboard This is why pressing the spacebar will stop reading from the cassette 17 44 The output routine located at FF69 jumps to the CRT simulator routine at BF2D which outputs a character to the screen and then checks the save flag at 0205 If the save flag is O it returns If the save flag is non zero it outputs the character to the 6850 If this character was a carriage return that is 0D then it also sends out 10 nulls 00 The load routine located at FF96 sets the save flag to 1 When you give the SAVE command BASIC jumps to the save routine which sets the save flag Then whenever you output any character BASIC jumps to the output routine which sends the character not only to the CRT but aiso to the 6850 This wil send it to the cassette and also to your printer If you don t turn on your cassette the character will only be printed by the printer But still haven t described how you know when the printer is busy You can PEEK at the 6850 control status regi
139. of DELETE routine Start of LOCK routine Start of UNLOCK routine Start of VERIFY routine Start of RENAME routine Start of APPEND routine Start of OPEN routine Start of CLOSE routine BSAVE routine BLOAD routine BRUN routine SAVE routine LOAD routine Run routine Runs Integer BASIC program CHAIN routine Runs FP ROM program Runs FP RAM program WRITE routine set up Read routine set up INIT routine Catalog routine FP routine INT routine EXEC routine Position routine Starts the read process Starts the write process Stores data coming from text file into keyboard buffer Used by the EXEC command Error checking Closes files exits DOS Goes to hardware routines Sets up address of name section of next file Close the buffer last used Prints SYNTAX ERROR Prints NO BUFFERS AVAILABLE Prints PROGRAM TOO LARGE Prints FILE TYPE MISMATCH Prints other error messages by message number contained in AA5C Moves parameters given to locations for use by hardware routines Moves name from the name buffer to the name section of the file buffer Moves addresses of sections of file buffers to locations for use by hardware routines Attempts to find a file buffer already in use by the name given A74F A7C4 A7D4 A851 A884 A909 A941 A94A A995 A971 4 50 51 52 53 4 55 6 57 58 59 AASF AA60 61 62 65
140. ol table listings with optional line printer output Copies 200 Price 55 00 plus 1 00 shipping and handling California residents add 6 per cent sales tax Includes All programs on a diskette and a complete 60 page user s manual Author Jeffrey Gold Available from Software Concepts Box 1112 Cupertino CA 95014 October 1979 Name Flousehold Finance Program System APPLE II Memory 32K Languat e Integer BASIC and Machine Language Hardware APPLE 11 32K and Disk Description The household finance program is a com prehensive household record maintenance and budget manageinent program This disk based system provides the cap bility to maintain 175 records a month for 12 months that s over 2000 records on a single diskette With a s mple to use data entry mode a user can enter check transactions deposits and cash expenditures Error ccrrecting is a simple matter with a complete set of editing features Twelve user definable budget catagories are available to allow a family to plan and analyze spending patterns Check and cash expen ditures can be assigned to any budget category Both month to date and year to date budget summaries are available Additionally the program will provide data on how well the family is keeping to its established mon thly budcets Previously entered financial records can be retrieved via a comprehensive data listing mode Other program features include checkbook balancing tax d
141. ou are not careful you will run out of Sky Bob Bishop s program changes the contour of the land every time you play the game 9 95 SPACE MAZE puts you in control of rocket ship that you must steer out of a maze using paddles or a joystick It is a real challenge designed by Bob Bishop using high resolution graphics and full color 9 95 MISSILE ANTI MISSILE displays a target on the screen and a three dimensional map of the United States A hostile sub marine appears and launches a pre emptive nuclear attack controlled by paddle 1 As soon as the hostile missile is fired the U S launches its anti missile controlled by paddle 0 Dave Moteles program offers high resolution and many levels of play 9 95 MORSE CODE helps you learn telegraphy by entering letters words or sentences in English which are plotted on the Screen using dots and dashes Ed Hanley s program also generates sounds to match the screen dispiay at several transmission speed levels 9 95 POLAR COORDINATE PLOT is a high resolution graphics routine that displays five classic polar plots and also permits the operator to enter his own equation Dave Moteles program will plot the equation on a scaled grid and then flash a table of data points required to construct a similar plot on paper 9 95 UTILITY PACK 1 combines four versatile programs by Vince Corsetti for any memory configuration POSTAGE AND HANDLING Please add 1 00 for the first item and 50 for
142. pse while the timer is running During that time between 25 000 and 10 000 in structions could be executed by the 6502 These instructions would be placed between the STA T2CH and the 12V to 15V LDA IFR instructions This is the prin cipal advantage of the counteritimer im plemented delay loop that is the micro processor can be performing meaningful tasks during the timing out process Counting Pulses A 24 Hour Clock The T2 timer can also be usec to count pulses from an external source This is useful for frequency counting MICRO June 1979 pg 41 or any other event counting application such as radio active half life measurements The T2 timer is placed in its pulse counting mode by setting bit five in the auxiliary Table Ill A Simple Delay Loop Using the T2 Timer the 5522 0300 9 START 48 0302 8 08 AO STA T2LL 0305 9 C3 LDA C3 0307 8D O9 AO STA T2CH 0304 AD OD WAIT LDA IFR 030D 29 20 AND 20 030F FO F9 BEQ WAIT 17 30 Load the byte for the T2 latch low then transfer it into T2 latch low T2 L Load the byte for the T2 counter righ then transfer it into T2 counter righ T2CH Read the flag register IFR Mask all bits Check to see if bit five except bit five is set No then wait Yes loop is finish MICRO The 6502 Journal control register ACR to logic one and applying the TTL level pulses to bit six of port B PB6 To illustrate this mode and to
143. r Sftwr x vol i 9 95 each Pius many more send for 1 00 Prices subject to change COMPUTER COMPONENTS OF ORANGE COUNTY 6791 Westminster Ave Westminster CA 92683 714 891 2584 Telex 182274 Hours Tues Fri 11 00 AM to 8 00 PM Sat 10 00 AM to 6 00 PM Sun 12 00 to 4 00 PM Closed Mon Master Charge Visa B of A are accepted Allow 2 weeks for personal check to clear Add 2 00 for handling postage For computer systems please add 10 00 for shipping handling insurance California residents 6 Sales input of the oscilloscope to PB7 to monitor the square wave You can use the program to calibrate your oscilloscope sweep time If you have a frequency counter measure the frequen of the square wave at PB7 to verify the equation using the values for N given in Table Vi is the number to be loaded into T1 Note that the frequency of the square wave produced at PB7 by the program listed in Table V is as precise as the crystal oscillator frequency used for the system clock This is because the square wave frequency is independent of any instruction length The principal advantage of the free running mode of the T1 timer is that the time between in terrupt flag settings or the frequency of the square wave on PB7 is independent of any instruction length Thus one can construct very precise time keeping routines MICRO March 1979 pg 5 or time measuring routines
144. r hardware routines Miscellaneous info section of currently used file Buffer Purpose Reads drive 1 current slot B1 sectors track O sector A into RAM starting at 1800 Boot routine Writes 0A sectors starting from B600 then 1B sectors starting at 1800 beginning at track 0 sector 0 Increments track sector as needed and data ad dress for above two routines Calls RWTS checks status upon return Sets address of data buffer and sets expected volume number Stores zeroes in one page starting at the address in 42 43 Start of IOB and device characteristics table Part of RWTS Temporary storage for RWTS One page buffer RWTS One page buffer RWTS Start of RWTS End of RWTS Various endings sections for the hardware routines End of RAM October 1979 Hooking PET to Ma Bell The dream of many microcomputerists to use their system as a terminal connected to a large computer system can become a pratical reality The 50 00 hard ware for any 6502 based system and the software for a PET are fully described Having worked with my 8K PET for almost a year have become hooked on microcomputers and am enjoying learn ing and experimenting with a great machine Like most microcomputer enthusiasts dream of more memory disks printers etc However attempting to raise a family on a teacher s pay means that have limited funds So I wired up a PET to RS 232 modern inter face plugged in
145. rd games One or two hundred shufflings are sufficient When the interrupt key is pressed the interrupt service routine sets a rnemory location hex 0038 that serves a flag to signal the end of the shufflir g This routine also restores the accu nulator and the X and Y registers It is im2ortant that the user initialize the interrupt vec tor to address the service rou ine in stead of the operating system The sequence of cards being shu tied is actually predetermined because it is calculated from a prescribed se ies of operations However if the stop com mand is activated by a human operator the cards be very random takes about 10 second to do one shuffle The t me to activate the stop can easily vary by more than 0 1 sacond Thus the number of shufflings be uncertain by about 1000 which s suf ficient to generate a deck of random cards KIM SYM AIM 65 32K EXPANDABLE RAM DYNAMIC RAM WITH ON BOARD TRANSPARANT REFRESH THAT IS COMPATIBLE WITH KIM SYM AIM 65 AND OTHER 6502 BASED MICROCOMPUTERS BETA COMPUTER DEVICES 3465 ORANGE CALIFORNIA 92665 714 633 7280 PLUG COMPATIBLE WITH KIM SYM AIN 65 MAYI Be CONNECTEOTORET ADAF TOR CABLE 5544 NNECTOR USES 5V ONLY SUPPLIED FROM Hi ST COMPUTER BUS 4 WATTS MAXIMUM x BOARD ADDRESSABLE IN 4K BYTE BLOKS WHICH CAN BE INDEPENDENTLY PLACEN ON 4K BYTE BOUNDARIES ANYWHERE IN A 34K BYTE ADDRESS S
146. ridge State 21 590 Comm Ave 168 288 Norfolk St i across from B U 603 473 2323 near M I T 247 0700 661 2670 1 PROGRESSIVE SOFTWARE Presents Software and Hardware for your APPLE SALES FORECAST provides the best forecast using the four most popular forecasting techniques linear regression log trend power curve trend and exponential smoothing Neil D Lipson s program uses artificial intelligence to determine the best fit and displays all results for manual intervention 9 95 CURVE FIT accepts any number of data points listributed in any fassion and fits a curve to the set of poimts using log curve fit exponential curve fit least squares or a power curve fit It will compute the best fit or employ a specific type of fit and display a graph of the result By Dave Garson 9 95 PERPETUAL CALENDAR may be used with or without a printer Apart from the usual calendar functions it computes the number of days between any two dates and displays suc cessive months in response to a single keystroke Written by Ed Hanley 9 95 STARWARS is Bob Bishop s version of the original and best game of intergallactic combat You fire on the invader after aligning his fighter in your crosshairs This is a high resolution game in full color that uses the paddles 9 95 ROCKET PILOT is an exciting game that simulates blasting off in a rocket ship The rocket actually accelerates you up and over a mountain but if y
147. rogram in Table will work in exactly the same way ex cept that the T1 timer is being used The same equation gives the loop time and as in the case of the T2 timer the maximum delay is about 0 065 seconds The T1 timer cannot however count pulses Consequently it cannot replace the T2 timer in the program listed in Table IV In place of the pulse counting mode the T1 timer has a free running mode and it is capable of toggling the logic level on pin seven of Port B PB7 The initialization of the free running mode with PB7 toggling is illustrated in a simple program shown in Table V This program will produce a square wave out put on PB7 The period of the square wave is given by the equation Tp AN 27 where is the period of the square wave N is the 16 bit number loaded into the T1 timer and is the period of the system clock Typically one micro second The frequency of the square wave is f To initialize this mode bits seven and six of the auxiliary control register ACR must be set Thus the program in Table V begins by loading CO into the ACR Timing is initiated by loading the high order byte of N into location A005 which corresponds to T1LH Once started the square wave will run forever no matter what else is happening in the program provided the registers that controi the behavior of the T1 timer are not changed That is after the timer times out it will automatically r
148. ruct ons and stop MICRO The 6502 Journal 12 CONNECTOR TXD GND RXD I UI O 4 Since the answer modem at Arkansas State University uses seven bits pius parity plus two stop bits line 190 pro grams the ACIA to transfer data in this mode Reference 1 explains how to pro gram other modes Also since the Arkansas State University computer in itially waits for a control G line 195 has a delay and then POKEs a 7 ASCII CTRL G to the modem Lines 200 300 then wait to get a character from the keyboard convert the character to ASCII and POKE it to the ACIA Hardware The MC6850 is wired directly to the CPU bus through the memory expansion port use page B by wiring CS2 to SELB Details of programming the ACIA can be found in reference 1 The 1 229 megaHertz cystal and the C4060 counter put out a 4800 Hertz square wave to the ACIA The ACIA fur ther dividesit by 16 to obtain a baud rate of 300 Reference 2 indicates how to get October 1979 other baud rates The 741 op amp MICRO WARE ASSEM3LER 65XX 1 0 PAGE O converts the RS 232 logic from the modem to TTL as described in reference 3 0010 0020 1o need 12 ecd volt powe 0030 0334 ORG 0334 Supply you use a 0040 AE F6 BF LDX BFF amp GET STATUS REGISTER CF modem you won t need the 712 volt 0050 033D 30 03 BMI 0342 BRANCH IF 7 SET supply and you can get 5 volts from the 0
149. s been laid for all sorts of adventures whatever one can imagine And now that have more memory can expand the scope and capabilities of the program Monster Table Monster name Ogre Bats Ghost Ice Bones Monster number 24 21 23 20 36 22 Reward Gold Chest Pearl Lamp Reward number 26 25 0 27 28 0 Move delay 0 0 0 1 1 1 Move increment 2 4 6 0 0 0 Attack count 0 0 0 0 0 0 Kill probability 60 60 0 90 0 0 Steal all probability 30 40 0 60 60 0 Steal own probability 55 90 0 65 0 0 Home room number 14 16 17 18 12 15 Life force quotient 100 40 50 60 25 75 Weapon Table Weapon name Ax Bomb Fire Knife Light Ice Weapon Number 15 16 18 19 33 36 Power 100 150 30 50 30 40 Attacks Monster No 1 24 24 21 24 23 21 Attacks Monster No 2 22 22 20 Attacks Monster No 3 36 36 Program Flow Initialize 30000 s Dimension and set up data for nouns verbs noun types verb types status or location of nouns noeth south east and west tunnel connections monster life force tables and weapons table Output 4000 s Print room descriptions possible exit directions and room contents as well as your possessions Input Decode 1000 s Read your typed in command select each word and scan it against the noun and verb lists The first valid noun and verb are edited and used to control the rest of the program Actions 2000 s This routine handles takes and puts special verbs and nouns your attacks on life forces and movement through
150. s on screen It s great for grap ting plotting and gaming Graphics Pac allows you to plotin any combination of two modes t Quadrant graphing with 0 0 center screen and Standard graphing with 0 0 plotted in the upper left hand corner Complete docu mentation shows how you can merge this useful routine with any of your own programs with out retyping either All this on a high quality for only 9 95 ASSEMBLER 2001 A full featured assembler for your PET microcompu ter that follows he standard set of 6502 mnemonics Now you can taxe full advantage of the computing abilities of your PET Store and load via tape run throug h the SYS or USR functions List and edit too with this powerful assembler No other commercial PETassembler gives you all these features plus the ability to look at the PET S secret Basic ROMs all in one program This valu able program is offered at 15 95 charge of bic cle manufacturing empire Juggle inflation breakdowns seasonal sales variations inventory workers prices machines and ad campa gns to keep your enterprise in the black Bike is dangerously addictive Once you start a game you will not want to stop To allow you to take short rest breaks Bike lets you stor the data from your game a tape 50 you can continue where you left off next time you v ish to play Worth a million in fun well offer BIKE at 995 4 PINBALL Dynamic usage of the PET s graphics
151. s sector suc cessive entries into this subroutine read suc cessive sectors from the disk When all sectors MICRO The 6502 Journal B037 B052 BOAO BOA1 BOB6 B134 B15B B194 B1A2 B1B5 B1C9 B21E B224 B2C3 B2DD B300 B35F B397 A6 B3A7 B3AB C B3AD BA B3BB B4BB B5BB DO B5D1 B600 B700 B74A B793 B7B5 B7C2 B7DB B7E7 B800 BA90 FF 00 BCOO BFD4 BFD5 BFFF have been read and the subroutine is called again it will merely exit with the carry set Writes current directory sector from buffer to disk Sets up for directory sectors goes to RWTS End of above if no error Start of error handling routine for above Checks position in file reads writes next sector as needed Initializes data section of file buffer to all zeroes Sets next position in file Increments position in file Sets next RAM address Calculates how much RAM is left Reads VTOC and successive entries attempting to find the specified file name Puts name of file into directory Sets next sector updates VTOC buffer Updates VTOC Calculates track bit map for VTOC Sets checks parameters for file Routine with different entry points to exit the hardware routines with error Temporary storage for hardware routines T A B Used by catalog for file types In reverse order the string DISK VOLUME VTOC buffer Directory buffer Temporary storage fo
152. sasisasuds 6935 18 CLC 9010 72 138 272 152 22 32 14 105 6936 69 01 ADCIM 01 9020 104 168 104 120 104 64 120 6938 8D 79 69 STA MIN 9030 DATA 24 173 123 105 105 1 141 123 693 38 5 9040 DATA 105 56 233 10 208 54 141 123 105 693C E9 60 SBCIM 0060 9050 DAIA 173 122 105 24 105 1 141 122 693 14 BNE 9040 105 56 233 60 208 32 141 122 6940 8D 79 69 STA MIN 9070 105 173 121 105 24 105 1 141 6943 AD 78 69 LDA HOURS 9080 DAT 121 105 56 233 60 208 20 141 6906 18 CLC 9090 DATA 121 105 173 120 105 24 105 1 6947 69 01 ADCIM 01 9100 141 120 105 55 233 24 208 3 6949 8D 78 69 STA HOURS 9110 DATA 141 120 105 216 96 S94C 38 ae 24 9120 8 TURN OFF THE CLOCK 694D E9 24 EN DO 03 E EOD aS n ii C E 6951 8D 78 69 END 6324 08 END My 6955 58 CLI 6955 60 RTS MOVING Please notify MICRO of any change of address so that you will not miss any issues If we receive the change of address informa tion by the 10th of the month then the next issue of MICRO will be Sent to the new address We can not be responsible for replacing issues which are missed due to changes of address which you do not send in time The Post Office does NOT return the undeliverable copies so we lose both the 0 postage and magazine 2 22 1 Q 22 Y MOVING Send change of address to MICRO 65
153. seful as a backup timekeeper as a loop controller It can be accessed in two ways independent of the interrupt system and employ d to meet a variety of realtime program requirements In addition to the programmable ports and interval timers located in the 6522s the SYM 1 has interval timer in the 532 The 6532 style device is also used on the KIM 1 and so knowing how to use the SYM timer properly will help in understanding programs and enable the SYM programmer 6 adapt KIM programs for use on his SYM more easily 6532 timer does not have its IRQ line connected to the IRQ input of the 6502 Therefore lacking direct access to the interrupt structure we are unable to get as precise a level of timing as with the onboard 6522s However if an extra timer or loop controller is required the 6532 may prove to be useful Before using the timer in the 6532 one must first clear the interrupt flags Since all of the features we intend to use are part of the write protected memory we must first of all allow access to this area This is accomplished by 20 86 8B JSR ACCESS Then to clear the interrupt flag PA7 we will read the interrupt flag register This may be accomplished by reading any one of four locations A405 A407 A41D or A41F typically by execut ing the instruction AD 05 A4 LDA INTREG After this instruction is executed the interrupt flag register will contain 80 This regis
154. st pg 1 Stop List which works with Applesoft Hartley Tim and McClelland Geo Character Set pg 2 A machine code program to print the entire character se Also a discussion of how the program works and the us of the disassembler Applesoft Merge Program pg 3 Fo disk or tape versions ROM version AS Il Hartl Tim Drawing Program pgs 4 5 Wr tten for a disk system with the AS 1 ROM card but mcds are given to change it for use on other combina tio 15 Anon Correcting Disk Files pgs 5 7 An addition to the NAMES FILES program given in eailier issues 489 MI 2RO No 12 May 1979 Burnt tt Joe 65 User s Notes pgs 5 7 No es on getting started with the AIM 65 Carpenter Chuck 5 Assembler Super APPLE Il Assembler pgs 9 11 Mashine or assembly language coding is as easy as with this assembler Dona o Joseph PET Hex Dump Program pgs 13 15 Nov you can look at your BASIC in ROM or other interesting codes in machine language Giery c Jack Super HI LO for the SYM 1 pgs 17 22 HI O with new twist to the game Williams 100 us 16 Channel Analog to Digital Converter for 65XX Microcomputer Systems pg 25 29 How real time games can be written for the OSI systems which use a serial terminal run from the ACIA Tripp Robert M ASK the Doctor Part IV
155. ster to see whether the CTS bit is low Then you will know the the printer is ready But this is not a very good way to do it since you would have to do such PEEK ing prior to every print command The better way is to write a short output routine which checks this bit for itself The 6850 occupies two address loca tions F000 and 001 The first of these is the control register of the 6850 and by writing and reading this address one can send and receive control signals F001 is the data register and by writing or reading this address one can send and receive data from the 6850 18913 Figure 2 J2 PIN 6 RTS MICRO The 6502 Journal The short output routine shown here illustrates how one might check for a printer busy signal The listing includes two small programs that turn the RTS signal off and on The latter might be employed to write a SAVE routine that could be called from BASIC and would turn the cassette or printer on automatically Remember that you will have to put the addresses of your routines in locations 0218 0214 021E and 0220 after each time you depress the BREAK key The J3 Port The main purpose for J3 is to interface peripherals which require RS 232 signals As can be seen in Figure 1 pins 2 and 3 are the data out and in pins Pin 7 provides a negative voltage for the RS 232 interface To use this however you will have to open the ground at jumper W10 the lower one under Q1
156. t and we will describe the use of a few of these features as the need arises Our principal interest is in the two counter timers that are available on the 6522 called T1 and T2 respectively Of course the various registers needed to detect timing out and to select the various tim ing modes will also be of interest In most 6502 microcomputer systems the 6522 will be interfaced to occupy 16 contiguous memory locations The 65 and SYM 1 for example use loca tions with addresses A000 to AOOF for the 6522 Table summarizes the names of each of these 16 locations while Tabie lists the functions of the registers Of particular interest are the timer locations A004 through 009 the interrupt flag register IFR and the control register ACR These correspond precisely with the registers mentioned above in connection with Figure 1 That is the IFR is the flag register and the ACR is the control register Both counter timers T1 and T2 on the 6522 are 16 bit devices that is a 16 bit number is loaded into the counter register and then decremented until time out Because the counter registers are 16 bit registers two WRITE opera tions are needed to load the counter since only eight bits of data can be writ ten at one time To prevent one eight bit number the low order byte from being decremented 17 28 20 94 L J Figure 2 Flowchart of Simple Interval Timer Delay Loop MICRO
157. t innovative word processor available on any personal microcomputer and includes features previously found only on word processing systems costing thousands more An advanced multiple paging system allows you to view two text screens simultaneously You may keep notes or instructions on one text screen while you edit on the other SUPER TEXT is a character oriented editor with complete cursor controls to easily move the cursor to any position in the text with a minimum of keystrokes Built in floating point math and automatic tabbing facilitate the preparation of all manual reports including financial reports insurance forms real estate settlements and more SUPER TEXT is easier to operate than a typewriter yet challenges the flexibility of pencil and paper SELECTED FEATURES EDITING Full floating cursor Cursor control left FILE NOT FOUND errors Save entire text or portion of to disk Complete file merging capabilities right up down or to center of screen Add or insert a character word or line Automatic carriage return eliminates a word breaking at the end of the screen line Delete a character word line or screen Automatic on screen tabbing and right or left justification of columns Unlimited text movement Scroll either a page or a line forward or back Move to the beginning or end of the text or screen Move to the last change made in the text Move to a block marker Global search and replace select
158. tch the RxData line going to the 6850 between RxData1 which is the cassette input RxData3 whicr is the TTL level input from J2 and the RS 232 input which will be described shortly The other pole of this switch can be used to switch CTS appropriatel To in stall this switch you only have to cut the trace connecting the RxData line to Rx Data1 at W10 With this switch installed you can switch lines between three sourc s of in MICRO The 6502 Journal Bruce Hoyt Route 1 Brighton TN 38011 put the cassette your peripheral on TTL level lines at 42 and some other peripheral that uses RS 232 on J3 One more change may be needed at jumper location W5 also on sheet six of the schematic Here the TxCLK is wired to the RxCLK To separate them you merely have to cut the diagonal trace connecting them and install another switch to switch the RxCLK line on the 6850 between the TxCLK line and the Rx CLK input recommend however that you not make this modification unless you need separate clocks for your peripheral If your peripheral is pretty stable and close to 300 baud you can probably get by as is But if you have a peripheral that has a clock rate different from 300 baud you will need to make this modification You may now ask what the RTS and CTS signals are used for your peripheral is a printer it may send out a busy signal whenever it is not ready to receive another character This signal should be a
159. ter will be cleared to 00 when we write a value into the timer register We may then go back occa sionally during program execution test to see if the flag register is still zero and branch if it is not zero As another alternative we can do a BIT test on the flag location checking only the timer flag for the branch condi tion This method has been used in the sample program If the BIT test is used it iS not necessry to read the interrupt register in order to clear the PA7 flag because this flag will not be tested The initial read instruction then becomes redundant October 1979 At this point we must decide how many clock cycles are to elapse before the timer flag becomes set The 1 we will write the selected value into the counter There are four different points at which to enter data into the counter 41 410 A41E and A41F T ese are indicated in the manual as 1T 8T 64T and 1024T These multiples that any data which is entered nto the counter will begin at that particular count and decrement at the ra e of the clock frequency 1T or at on decre ment for each eight clock cycles 8T one decrement for each 64 cycles 64T or one decrement for 1024 clock cycles 10247 There is only one timer regi iter but the four addresses mentioned a vove the means by which the freque cy pre divider is set For example if ve write 01 into location A41E the tim
160. than originally belonged to the monster The weapons table details the power of each of the player s weapons and determines which monsters they are ef fective against The next action routine was ready to implement the ATTACK routine This is invoked whenever a weapon is used put thrown and so on Any monsters in the room are attacked and their life forces are decreased by a random amount limited by the force of the weapon used When a monster s life force is reduced to zero it is eliminated Of course it is not fair to let the player cut the demons to shreds without allow ing them to fight back Thus came the REACTION routines Happy monsters are those that have their own treasures in their room and have not been attack ed Any monsters that are not happy will seek someone to vent their anger upon and that person is the player A very in tricate set of probabilities decides the outcome of this anger The more the monster has been hurt by the player s at tacks the weaker his counterattack will become But also the more times he has countered in vain the madder he gets Nothing is more deadly than a mad monster October 1979 Noun Table Noun Type Status Location 1 N Direction 0 2 NE Direction 0 3 E Direction 0 4 SE Direction 0 5 5 Direction 0 6 SW Direction 0 W Direction 0 8 NW Direction 0 9 UP Direction 0 10 DOWN Direction 0 11 CAVE Location 0 12 LAKE Location 0 13 RIVER Location 0 14 TREE Location 0
161. the hardware may be implemented is shown in Figure 1 A 0 1 Hz clock pulse from the third PIA PORT B BIT 14 5 Figure 1 October 1979 MICRO The 6502 Journal Robert T Kintz 104 Council Rock Avenue Rochester NY 14610 74390 is fed into both inputs of a two input nand gate 7400 after passing through a switch located on the front panel The 7400 may be convenientiy tocated in the prototyping area just beiow the three 74390 s on the 470 board The second input to the two nand gates is taken from bit 0 of a 6821 PIA located on the 500 or 510 CPU board The outputs of the two 7400 gates are fed to the NMI bus line and a front panel LED respectively The brightly flashing LED serves as a reminder that the clock is running following turning the switch on and setting bit 0 high The actual interrupt handling and clock routines have been written in machine language as shown where they have been assembled to start at 6900 26880 Of course relocation of these routines as well as the clock counters is entirely optional Be sure however that they are located above the workspace occupied by BASIC or other applications programs A BASIC demonstration program in corporating the clock is also shown Lines 50 70 set up the PIA on the CPU board 63232 so that ports A and B are configured as inputs and outputs respectively Since OSI s PROM monitor vectors to 0130 on receipt of an NM
162. the option of permanently linking up to 41 pictures to any Integer or Applesoft pro gram for instant recall at any time Besides being just plain fun applications range from putting more creative Screen images in your game programs to educational programs for younger children involving shape or color recognition Price 9 95 on cassette 13 95 on diskette California residents add 6 per cent sales tax Includes Three program set with ten page manual Author Roger Wagner Available from Local APPLE dealers or Southwestern Data Systems P O Box 582 MC Santee CA 92071 714 562 3670 Name Programmer s Utility Pack System APPLE Il Memory 4K to 6K for the prog itself depending on the program used Language Integer and Applesoft Hardware APPLE II with cassette or disk drive Description Set of 11 programs Appends STR and VAL are on printed documentation with the tape version Programs include Renumber Integer amp Applesoft Append Integer and Applesoft Line Find Integer and Applesoft Address HEX Converter Screen Find Memory Move and the STR and VAL function simulations for Integer By using the various programs one can renumber integer and Applesoft programs with all GOTO s etc being renumbered and the user alerted to unusual situations in the program These include reference line numbers not in the program lines referenced by a variable or expression and a number of others Line Fi
163. the sequence of operations takes seven machine cycles then after 77 cycles the timer will still be at 01 and after 77 7 84 cycles the timer will contain a count of zero since more than 80 cycles have elapsed right Wrong Unfortunately it will contain FC in stead The limitation of this counter is that as soon as zero is reached and the flag is set the counter continues to decrement but it no longer matters which counter multiple was being used because as the counter immediately begins to decrement at the 1T rate To overcome this limitation since we do not use the IRQ and since we only sample occasionally we will generally read the interrupt register testing for a non zero figure rather than reading the timer and looking for zero contents as shown above Now we come to an example program which ties everything together and demonstrates the use of this timer Location 20D may be set for any desired timer value Location 20F may be set to 1C 1D 12 or 1F depending upon whether you want to operate the timer with a predivide of 1T 8T 64T or 1024T You will notice that the loop of instruc tions between locations 211 and 224 takes a total of 28 machine cycles to ex ecute Begin program execution at location 200 The display will light upon comple tion indicating how many times the pro gram was able to traverse the loop before the timer flag became set 17 55 P OGRAMMABLE TIMER DEMONSTRA
164. tions between user and program Expected users are engineers mathematicians and researchers the natural and social sr iences in addition teachers and students can use the program to approach topics in for example algebra trigonometry and analytic geometry in a visual intuitive and experimental way which complements the traditional primarily symbolic orientation REQUIREMENTS 16K of memory with Applesoft ROM Card or 32K of memory without Applesoft ROM Card 4 000 2 090 66 060 1900 gene 1e eee Available at your local compute store Call or write for our free SOFTWARE 4 ACCESSORIES CATALOG DEALER INQUIRIES INVITED Check or Money Order n 9 include 1 00 for 79 shipping and handling C O D 1 00 add tl charge cf d PO WEESOFT INC Master Charge and VISA P O BOX 157 Orders accepted n 9 New Jersey residents add Apple 11 is a registered PITMAN NEW JERSEY 08071 5 sales tax trademark of Apple Computer Inc 609 589 5500 Programs Available on Diskette at 5 00 Additional LIN Ge SOUNDWARE softside_ soitware 1 305 Riverside Drive New York N Y 10025 p t program GRAPHICS PAC 2 Quadruple your PET s graphic resolution Why be New Version stuck with the PET s cumbersome 25 x 40 1000 point display With Giaphics Pac you can directly control 1 and clear 4000 point
165. to a modem and bingo by dialing up the computer System on the campus of Arkansas State University have all of these plus much more hooked to my PET If you have telephone access to a computer System or a friend with an answer modem on his computer here is the hardware and software to get you started communicating on the telephone The interface shown in Figure 1 can be built for under 50 including connec tors wiring etc and can be plugged into any RS 232 modem have U S Robotics Model 310 which lists for 149 A TTL compatible modem can be wired STATE UNIVERSITY ARKANSAS 173 246 191 48 3 76 133 230 173 247 191 88 41 127 170 169 32 172 226 0 10 REM TERMINAL PROGRAM 20 REM BY C H SCANLON 30 REM BOX 22 40 REM 50 REM 72467 60 REM 101 DATA 102 DATA 145 224 138 32 210 255 169 160 172 226 0 145 224 76 133 230 105 FOR I 826 TO 861 READ X POKE I X NEXT 110 POKE 537 58 POKE 538 3 115 POKE 49142 3 120 POKE 59468 14 130 PRINT TERMINAL x x 140 PRINT cd cd RUN 190 but don t hit the return yet 150 PRINT cd Dial 935 9372 and wait for the tone 160 PRINT cd Place receiver in holder and hit return 180 STOP 190 POKE 49142 129 195 FOR I 1 TO 30 NEXT POKE 49143 7 200 GET AS IF A GOTO 200 210 IF ASC AS shift 5 THEN PRINT cs 215 IF 5 5 lt 192 GOTO 300 220 IF ASC
166. ur choice Order must be prepaid by Cashier s Check made out to Computer Comp inents of Orange County ATARI USER S GROUP INFORMATION CALL 714 891 2584 PERIPHERALS AND ACC SSORIES ATARI 8107 ATARI 820 ATARI 410 DISC DRIVE 749 99 PRINTER 5 9 99 PROGRAM RECORDER 89 99 DISKETTES ACCESSORY CONTROLLERS ADD ON MEMORY 800 ONLY CX8100 BLANK DISKETTES CX2C 01 DRIVING CONTROLLER PAIR CX852 8K RAM MEMORY MODULE 124 99 CX8101 DISK FILE MANAGER CX30 04 PADOLE CONTROLLER PAIR CX853 16K RAM MEMORY MODULE 249 99 5 00 ea CX40 04 JOYSTICK CONTROLLER PAIR 19 95 ea ROM CARTRIDGES GAMES 49 9 ea APPLICATION 69 99 CXL4001 EDUCATION SYSTEM MASTER CXL4004 BASKETBALL qi CXL4002 ATARI BASIC CARTRIDGE 34 99 CXL4OO5 LIFE modes 2920 CXL4003 ASSEMBLER DEBUC KEY J uses Joystick controller CXL4006 SUPER BREAKOUTTM CXL4007 MUSIC COMPOSER p uses paddle controiler CX4008 SUPER BUGTM 220 Ad CXL4009 COMPUTER CHESS d uses driving controller BASIC GAME AND EDUCATION SYSTEM CASSETTE PROGRAMS 39 99 ea PROGRAM CASSETTES CX6001 U S HISTORY CX6009 GREAT CLASSICS ENGLISH CX4101 GUIDE TO BASIC PROGRAMMING CX6002 U S GOVERNMENT CX6010 BUSINESS COMMUNICATIONS CX4102 BASIC GAME PROGRAMS CX6003 SUPERVISORY SKILLS CX6011 BASIC PSYCHOLOGY CX6004 WORLO HISTORY WESTERN 6012 EFFECTIVE WRITING 29 95 ea CX600
167. use of running water as you enter this limited memory size These room room and you see a narrow churn descriptions have been prepared for the ing underground river flowing to adventurer s guide The guide may read the south each room description as the adventurer enters the chamber for the first time 11 Hub room A magnificently decorated chamber with crystaline 1 Mouth You are at the mouth of a designs and intricate rock forma large cavern The sides of the en tions narrow fast moving river trance slope steeply upward and a flows through the hub room mysterious passage leads west into the cave 12 Ice room Mysteriously ice forms October 1979 MICRO The 6502 Journal 13 14 15 16 17 18 19 Thomas R Mimlitch 1547 Cunard Road Coiumbus OH 43227 very quickly in this chamber encap sulating anything left there for too long There is so much ice that you can t even get into the room however you see an exit on the other side of the chamber Chimney room A small smoke fill ed chamber with a fire burning in a natural fireplace in the north wall Apparently a chimney leads far up through the rock and out of the cavern Gold room As you enter this room the first thing that you notice is a pile of golden treasures nestled into a nook on the far side Before you take another step a foul smelling ogre jumps out from a hole in the side wall and rushes forward to pro tect his gold
168. utine Actually reads text file Sets parameters for following routine Reads program or binary file Puts byte being read into buffer Sets parameters for following routine Writes into text file Sets parameters for following routine Writes program or binary file Gets byte being written from buffer Lock hardware routine Unlock hardware routine Sets parameters for following routine Verify hardware routine Delete hardware routine Part of delete routine frees sectors used by deleted file Catalog hardware routine Part of catalog prints the number in 44 as three digit Moves miscellaneous info from the file buffer to the hardware buffer Moves miscellaneous info from the file buffer to the hardware buffer Initialize hardware routine Sets 42 and 43 as pointers to sections of the file buffer Writes data section of file buffer to disk Writes track sector list section of file buffer to disk Sets hardware pointer to the track and sector list section of the file buffer being used Checks position in file If out of current sector reads writes next sector updates VTOC buffer updates track sector list section of file buffer if in write mode Reads from disk into data section of file buffer Sets hardware pointers to data section of file buf fer being used Reads VTOC to its buffer B4BA Writes VTOC from its buffer Reads a directory sector into its buffer B4BB B5BA Initially read
169. with bit seven of the IER also set to logic one At the end of the timing interval not only will bit five of the IFR be set to one but also the IRQ pin on the 6502 micro processor will be pulled to logic zero producing an interrupt request The next instruction after enabling the interrupt from the T2 timer is the CLI in struction that allows the 6502 to recognize these interrupts The last in Struction in the main program should not be taken literally It is simply an infnite loop that represents the user s main program a FORTRAN interpreter for example The interrupt routine is also given in Table IV Timekeeping routines have been described in several other articles MICRO March 1979 pg 5 so the details will not be repeated here Note that in order for the program to execute the IRQ vector must point to the starting address of the interrupt request routine in our case 0300 Note also that the program could be easily modified to keep track of seconds by counting only 60 pulses something that can be done with an eight bit counter like the one on the R650 1 The hours minutes clock re quires only about 50 microseconds per October 1979 E minute of computing time truly a low overhead clock To display the minutes and hours the user must provide a display routine that takes the contents of locations 0000 and 0001 and displays these numbers Such a routine is not included in Table IV since the instructions
170. ytes total 23 551 shipping and handling 5 00 each 24KB Memory Expansion System s at 650 each Adds 14 576 bytes total 31 743 shipping and handling 7 00 each ____74 Big Key Board s at 125 shipping and handling 5 00 each SPECIAL DEAL S 8KB Memory 74KB KeyBoard at 350 complete SPECIAL DEAL S 16KB Memory and 74KB KeyBoard at 525 complete 5 Please add 696 sales tax if you are a California resident 6 596 if a resident of BART Santa Clara or Santa Cruz Counties CA Please add shipping and handling costs as indicated VISA MASTERCHARGE ORDERS CALL 800 227 8398 except California residents A CALIFORNIA ORDERS PLEASE CALL 415 494 1210 10301 Stonydale Drive dS Skyles Electric Works e n
Download Pdf Manuals
Related Search
Related Contents
X50 オペレーション・ガイド GOLD400D - GOLD800D GOLD1200D PIXUS 470PD i470D SERVICE MANUAL Dulcotest_DT1_Photometer, 1, it_IT PNL-tec RAP350 power supply unit 取扱説明書/保証書 - SoftBank SELECTION Prime-Line B 503 Instructions / Assembly Silverstone SST-ST50NF power supply unit Manual De Instrucciones y Términos de Garantía 4つの用途&圧倒的作業量! Copyright © All rights reserved.
Failed to retrieve file