Home

Vol 1 No 2, Aug 1977

image

Contents

1. ed PIA initialization Ina dedicated application such as an industrial controller the PIA would be set up on system power up by code stored in a PROM or ROM Ina general purpose com puter the setup of undedicated ports is the responsibility of the user Thus the user must set up the PIA or initialize it whenever he wants to use it The following program in BASIC is a PIA exerciser con taining a general purpose sub routine starting at line 1000 for initializing PIAs for user programs There are as stated above six internal registers in the PIA but only four can be accessed as memory locations at a given time These registers normally occupy four consecutive memory locations We consider the address of the PIA to be X as it is stated in the program Thus location X is the address of the peripheral interface reg ister A or its corresponding data direction register Ad dress X is the status register in conjunction with the A Port of the PIA A bit in the status register specifies whether the data direction register of the peripheral interface register is available to the bus location X 2 is the address of the peri pheral interface register or its corresponding data direction register as specified by a bit in its corresponding control or status register at location X 3 A logical 1 ina bit location in the data direction register speci fies that the corresponding pin on its port will be an output A
2. 0296 20 EA 0297 19 EA 9298 8D 6p up arrow will now cause a return from subroutine The pen lift function may be replaced with CARRIAGE RTN followed by SPACE The four locations from 9295 hex to 9298 hex may of course be used for any other function that you wish to control with A sub routine calls etc Page 20 PRODULTANEUS _ Ohio Scientific s Small Systems Journal 23485 676869 A BC DE F A9 A9 AD 01 FF FF FE A9 85 20 23 Fe aD 7F 1E C9 24 27 2A C9 30 33 DF 20 20 BF 99 82 01 16 AZ 99 A9 20 48 FE 4C e2 FD 79 AR 24 Program Relocation As stated in the memory reguirements section the ASCII Mini Graphics resides at 9209 hex to 92B1 hex However by changing nine subroutine calls and one Jump Absolute the program may reside at any location All affected Subroutine calls are 29 99 92 Their locations are hex 9219 925F 0266 26D 274 B27B 9282 9289 and P299 The Jump Absolute 4C AD 92 is located at 92A6 hex For example if this program were relocated starting at 9799 hex the Subroutine calls would become 29 99 97 and the Jump Absolute would become 4C AD 97 Note that regardless of program location zero page FD FE FF will still be used O A E tific Challenger III contains a revolutionary new triple processor CPU board that can run virtually all published software available today for microprocessors at a very small cost increase over comparable single processor c
3. 7 69 9 instructions you can do all possible forms of input 315 8981 FF 255 p p with the USR X function rather than the INPUT state _ Listing 1 ASSEM 19 8890 s INPUT TO BASIC VIA THE USRC X FUNCTION SO BASIC 20 6860 3 DOESN T TRAP I O ERRORS THUS YOU MUST DO THAT 30 0000 N 48 0000 INPUT X USRCX gt 50 e600 3 PLACES THE ASCII VALUE CINTEGER IN x OF THE i 68 0000 3 NEXT CHARACTER INPUTTED THROUGH THE I O ro 80090 3 DISTRIBUTOR 89 8600 3 90 0900 3 i 168 3FEC wa 3FEC 110 3FEC 20F921 INPUT JSR 21F9 INPUT A CHARACTER TO AC 120 3FEF AB PASS TRY NOW PASS THE RESULT BACK 130 3FFO A588 LDA 8 SEE PAGES 9 10 OF 8K BASIC MANUAL 140 3FF2 8DFD3F STA ag 150 3FFS AS09 LDA M 160 3FF SDFE3F STA CALL e CALL SUBROUTINE POINTED TO 1760 3FFA A900 LDA 0 BY 8 AND 9 WITH THE 180 3FFC 266999 CALL JSR 0000 HIGH PART IN AC AND LOW IN Y 190 3FFF 60 RTS 208 4908 END Page I5 Ohio Scientific s Small Systems Journal August 1977 ment For example the following code will ask for and input an integer and place it in X LIST S PRINT A NUMBER PLEASE 46 POKE 574 236 POKE 575 63 06 AS om 38 A USRCAD 40 IF A 13 THEN GOTO 608 S0 IF AC48 OR ADS THEN PRINT 60 AS AS CHRECAD 78 GOTO 30 80 X VAL CAS GOTO 5 There must be more error checking than this of course but this is enough to illustrate the fun damental principal of using POKE and USR functions to avoid the use of the INPUT statement Another t
4. A 61 IF R lt gt HEX AND AS lt gt DEC THEN GOTO 60 62 PRINT 65 INPUT THE NUMBER NUMS 78 IF AS DEC THEN GOSUB 1000 GOTO 38 80 IF AS HEX THEN GOSUB 2088 90 IF FLAG THEN PRINT IS C IN B 100 GOTO 62 1000 B s DECIMAL 1005 FLAG 1810 ANS 6 1020 FOR 1 1 TO LENCNUM gt 1030 FOR J 1 TO 16 1048 IF CHS lt J gt MIDS lt NUMS I 1 THEN GOTO 107e 1950 NEXT J 1060 PRINT ILLEGAL CHARACTER 1070 ANS ANS 16 J 1 1080 NEXT I 1085 C STRS lt ANS gt 1999 RETURN 2000 B HEXDECIMAL 2010 FLAG 0 2628 C a 2025 Ccs 2027 IF LENCNUM gt 25 THEN FLAG 1 2028 FOR I 1 TO LENCNUM THEN PRINT ILLEGAL CHAR 2029 IF D lt 0 OR DS gt 9 2838 NEXT I 2835 VSVA AL NUM gt 2040 D 4096 2050 FOR I 1 TO 4 2060 ANSSINTCY D gt 2065 V V ANS D 2070 D D716 2080 CC SCC CH CANS 1 2090 NEXT I 2100 FOR I 1 TO 4 2105 II I 2110 IF MID lt CC I 2120 NEXT I 2130 CS C MIDS lt CC IT 2148 RETURN 2150 END RUN BASE 10 BASE 16 CONVERSIONS CONVERT TO HEX OR DEC HEX THE NUMBER 16684 IS 412C IN HEXDECIMAL THE NUMBER 129 IS 81 IN HEXDECIMAL THE NUMBER OK ter at FBPl These outputs are latched just as the parallel output is so that the D A will acquire the analog output value associated with its digital input by simply POKE ing the desired value into that loca tion That value will remain there until changed by the program Most applications of
5. D 140 PRINT TYPE THE NUMBER WHICH IS BEFORE THE PROGRAM YOU WANT 150 POKE 574 236 POKE 575 63 170 XEUSRCX PRINT 180 IF X lt 49 OR X gt 52 THEN GOTO 78 190 Xex 48 200 ON X GOTO 1008 2080 3088 4008 1009 REM 1010 REM ACCOUNTS PAYABLE Is ON TRACK Si 1020 REM 1039 TRAK 51 1040 GOSUB 18000 1050 END 2009 REM 2010 REM ACCOUNTS RECEIVABLE IS ON TRACK 52 2020 REM 2036 TRAK S2 2040 GOSUB 18000 2050 END 3000 REM 3018 REM INVENTORY IS ON TRACK 53 3020 REM 3830 TRAKS53 3040 GOSUB 19866 3050 END 40800 REM 4018 REM LEDGER IS ON TRACK 34 Page 17 Ohio Scientific s Small Systems Journal August 1977 4820 REM 4038 TRAK 54 Listing 5 continued 4048 GOSUB 10800 4050 END i i 10000 REM i i 10010 REM GENERATE THE INDIRE T COMMAND FILE To LOAD THE PROGRAM 46020 REM 10030 POKE 8708 16 3 10040 POKE 11860 0 POKE 11861 63 10050 PRINT LORD BE VY 400608 PRINT L NIDS STRECTRAK 23 M eye Sis 10070 PRINT RB a a 10080 PRINT RUN a 10099 POKE 11879 POKE 11880 63 18100 POKE 8707 8 POKE 8708 128 10110 RETURN ok Listing 6 U3FQQ 3FFF i 8 14 2 3 4 567 8 9 A BC DE F 3FOO 31 36 31 32 38 D D 4C 4F 41 44 D 4 34 35 52 3F1 42 52 55 4E D 99 98 98 BO OO 0O ee EB 00 0 CA 3F20 80 00 90 GO GO BG BG BG AB 99 BG BG AO CA 2A BA 3F30 69 09 08 09 BA BG BB 09 BA 08 Be 00 AG BO 06 00 3F40 88 09 99 09 BO BO 90 BB AB BE Be GE GG GO ae 94 3F5 00 06 OG 09 98 08
6. realm of most small computer users because of their high cost 20 000 and up and low reliability The new IBM Winchester technology disk drives solve these problems Hard disks are quite different from floppies The actual disk is one or more precisely machined aluminum platters coated with magnetic material There are one or more heads per platter side and there can be as many as twelve head in the disk drive The heads are positioned with a linear motor or voice coil much like a speaker or rotary posi tioner which steps the head from track to track much faster than the stepping motor drives of floppies Also because there are usually several heads several tracks are in position simultaneously Each head position is called a cylinder There are usually as many tracks per cylinder as there aie heads On flop pies cylinders are the same as tracks because there 1s only one head The disks are generally 12 to 18 in diameter and are rotated about ten times faster than floppies 3000 3600 RPM Because of the high surface velocity of the disk under the heads the heads are designed to ride on the thin layer of air generated by the high velocity of the disk surface The performance of the big aisks depends on several features their size results in a large stor age capacity their ultra fast access is due to their multiple heads fast head actuators no head loading high rotational speed and virtually no disk wea
7. with the C D74 To summarize this entire article on mass storage devices consider the following comparison tables Table II compares the data or program trans fer rate for the six mass storage devices discussed above and the time required to find a specific entry in a 100 000 byte long file Table III compares the performance of the three disk drives discussed here The performance factor was obtained by dividing the storage capacity by the average access time and then normalizing the result such that the mini floppy has a performance factor of 1 The table shows that the C D74 is rated 10 000 times more powerful than a mini floppy at about seven times the cost Table IV is a cost comparison for fully assem bled units including the cost of the interface in the computer i Table II media bit rate per second average random access time for 100K byte file Paper Tape 100 to 3000 manual to 250 sec Audio Cassette 300 manual to 2500 sec Digital Cassette 4800 manual to 160 sec Mini Floppy Disk 125K 55 sec Floppy Disk 250K 286 sec Hard Disk 7 33M 038 sec Table III random access formated capacity average seek time performance storage devices per disk for entire disk factor Mini FToppy Disk 70 90 Kbytes 55 sec 1 Floppy Disk OSI C D C D2 250 Kbytes 286 sec 5 Hard Disk OSI C D74 70 Megabytes 038 sec 10 000 Table IV media cost Paper Tape 485 00 up Audio Cassette OSI CA 7 plus cassette recorder 128 0
8. 40 NEXT OK RUN ENDFORNEXTDATAINPUTDIMREADLETGOTORUNIFRESTOREGOSUBRE TURNREMST OPONNULLWAITLOADSAVEDEFPOKEPRINTCONTLISTCLEARNEWTABS lt TOFNSPCCT HENNOTSTEP TANDOR gt lt SGNINTABSUSRFREPOSSQRRNDLOGEXPCOSSINTA NATNPEEKLENSTR VALASCCHRSLEF T RIGHTSMIDSNFSNRGODFCOVOMUSBSDD BIDTMOSLSSTCNUF ERROR IN OK The Model 520 16K RAM Board Ohio Scientific s Small Systems Journal tions _ the reserve word entry LIST so system crash requiring a com It has been set here to dump the reserved word table of 8K BASIC The entries in this table define which ASCII stringy perform which functions and statements On page 19 we advise changing that other users cannot access your program and possibly damage it This is another of many practical applications of the PEEK and POKE functions We have briefly touched on some specific examples of how the use of the PEEK and POKE features of 8K BASIC can greatly expand your programming capa bilities We must warn you again however that extreme caution must be exercised when POKE ing into memory since POKE ing a location in BASIC or operating system can cause a plete reload of the programs in to the computer The information here will allow you to write in BASIC interesting programs such as video games using switches on a parallel input port for control Ohio Scientific would like to see examples of user pro grams utilizing the PEEK and POKE capabiliti
9. 98 OG BA 00 Be 08 BO 06 Be 09 3F60 82 09 00 BB 99 OG BB BB BG BA BO BE 0O 00 ae AA 3F70 20 99 09 00 99 029 BO 00 Be 08 BG 00 09 BO 99 BA 3F80 00 99 BS OS Bo BB JO BS GS A BS ee Be Be Se BA 3F96 08 00 80 00 J0 A BG BB BO 08 BO 00 BE BO 2B 2A ZFAG 90 09 90 BG GO BG OG 00 BB 00 09 00 GO 2A 00 2A 3FBQ QG 08 09 0G AG BG 98 P BO QO G 00 0G BO AO 04 3FCO 00 AS 01 85 CF AD 96 20 DE 26 AD 36 85 CB AD 2B 3FD 85 CC 28 AC 29 AD BB BD 83 22 AD BE BD 04 22 AD 3FEG 3F 8D 68 2E A9 OO BD 6 2E 4C 3F IF 20 F9 21 AB AS 98 SD FD AS 09 8D FE 3F A9 08 20 Be BO 609 3FFO Examine now the program on track 45 sector 1 by referring to Listing 5 Control C and Control 0 are disabled on line 30 The I 0 Distributor is set to the ACIA teletype terminal on line 65 The user is then told which programs are available and is asked for program 1 Since program 1 is on track 51 see Listing 7 below you must set the variable TRAK 51 The sub routine at line 10000 generates the same sort of an The subroutine sets the I 0 Distributor to in put from the file which it just outputed through the 1 0 Distributor Notice that these commands are put gt also at 3F99 and upwards in memory The subroutine __ returns and an END statement is encountered Control is now returned to BASIC which gets a LOAD command which exits to 0S 65D This receives the comand L51 which loads the program of interest over the original program The RB command then returns to BASIC which ge
10. A D and D A s such as voice recording voice generation music generation Page 5 1 gt lt gt 9 _ Ohio Scientific s Small Systems Journal FLAG 1 RETURN PRINT TOO LARGE DS MIDSCNUNS I 1 gt RETURN FLAG 1 RETURN THEN GOTO 2136 RUN BASE 10 BASE 16 CONVERSIONS CONVERT TO HEX OR DEC DEC THE NUMBER F700 IS 63232 IN DECIMAL THE NUMBER FC e IS 64512 IN DECIMAL THE NUMBER D223 IS 53795 IN DECIMAL THE NUMBER OK etc require high speed servicing of these I Us but there are some low speed applications such as driving a chart recorder monitoring weather instruments or driving small motors at different speeds that can be serviced by the low to medium speed operation of BASIC The standard parallel interface used by the 6502 and 6800 systems is the PIA peripheral interface August 1977 adapter Several manufacturers produce this part as a 6520 6820 6821 or any of various other versions of the chip The PIA has two eight line bi direc tional ports plus additional hand shaking lines and inter rupt control lines Each of the 16 1 0 lines on the PIA can be an input or an output under pro gram control One eight line port is referred to as the A Port and the other as the B Port PIA Initialization f There is a total of six int r nal registers in the PIA four of which must be set up before the PIA can be used for any spe ific tasks This setup is call
11. IF D 1 gt gt P 4S gt GOTO 560 LET Ta 2 4 gt 4T D4100 P Z LET Pac LET O 0 D GOTO 815 PRINT i PRINT YOU STARVED 0 PEOPLE IN ONE YEAR PRINT DUE TO THIS EMBARRASSING BO0 BOO YOUR PEOPLE PRINT CIN A SINGLE PATRIOTIC GESTURE PRINT NOW REFER TO YOU AS THE LATE HAMURABI GOTO 975 PRINT HAMURABI THINK AGAIN YOU GRUT GRUT PRINT YOU HAVE ONLY 58 BUSHELS OF GRAIN NOW THEN RETURN GOTO 410 PRINT HAMURABI THINK AGAIN YOU ONLY OWN As ACRES NOW THEN RETURN LET C RND 6 1 RETURN PRINT WEREN T WE JUST A BIT HEAVY HANDED THIS TIME PRINT PRINT HAMURABI I CAN T DO IT o PRINT GET YOURSELF ANOTHER STEWARD fe GOTO 975 PRINT IN YOUR 1 YEAR TERM OF OFFICE Ts PERCENT OF THE RE PRINT POPULATION STARVED YEAR ON AVERAGE A TOTAL OF PRINT 0 PEOPLE DIED LET L A P PRINT YOU STARTED WITH 10 ACRES PERSON AND ENDED WITH PRINT Ls ACRES PERSON PRINT IF T gt 33 GOTO 565 IF L lt GOTO S65 IF T gt 10 GOTO 949 IF L lt 9 GOTO 9409 IF T gt 3 GOTO 968 IF L lt 108 GOTO 969 PRINT WELL WELL WELL THAT DESERVES A FOUR STAR RATING PRINT 35 gt mw w w w CCC l GOTO 975 i PRINT THE PEOPLE REMAINING FIND YOU AN UNPLEASANT RULER AND PRINT FRANKLY HATE YOUR GUTS GOTO 975 Ohio Scientific s Small Systems Journal August 1977 YOUR PERFORMANCE COULD HAVE BEEN SOMEWHAT BETTER BUT 75
12. and 15 Continuous strobe keyboards and 5 Y 53496 18 X PEEK 5S7343 gt 15 IF X gt 127 GOTO 10 20 POKE YX 30 Yay 4 40 IF gt 53476 GOTO 10 se GOTO 5 OK Ohio Scientific s Small Systems Journal is published monthly by Ohio Scientific Inc P O Box 36 Hiram Ohio 44234 The subscription rate is six dollars for six issues Individual copies are 1 50 Published at Twins burg Milo by the Twinsburg Bulletin Vol 1 No 2 Editor in Chief Production Manager Contributing Editors August 1977 Gary Deckant Rab Spademan Mike Cheiky Eric Davis Marcel Meier Cindy Warrick Production Assistant Page 8 keyboards with a short pulse will not work satisfactorily with this program They will require a USR X subroutine for proper operation Dumping Memory The PEEK and POKE functions are also very useful for exam ining changing and testing memory For example it is very simple to write memory test pro grams which are somewhat slow but nevertheless are conven jently generated with the PEEK and POKE functions It is also possible to write memory com pare programs checksum programs and a machine level monitor similar to Ohio Scientific s Extended Monitor in BASIC A simple example of a program is shown here This program lists memory within the range specified by the FOR NEXT loop and prints ASCII values of the memory loca LIST yo AAG 10 FOR X 638 TO 920 20 ZsPEEK X 30 PRINTCHRS lt Z
13. controller difference between the big disk and the floppy is that the C D74 has a 7 million bit per sec ond transfer rate which is much too high for any gt s microcomputer to handle whereas the floppy uses pro grammed data transfers One possible approach would be to have the big disk load and read memory by DMA Direct Memory Access but this would require that the processor be stopped during transfers which is gt undesirable Therefore OSI has developed a new dual port memory board for use with the C D74 This new 16K static board the Model 525 has two standard 48 line buses the main system bus and a memory channel The on board memory can be operated on from either port so that the disk can transfer data without stop ping the processor This high speed data hannel or memory channel is a well established feature on large computers such as the IBM 370s as well as large minis such as the PDP 11 45 and 11 70 The processor specifies cylinder track and sector and specifies the limits of the memory transfer It then activates the hardware that performs the transfer between disk and memory After transfer the memory can be ac cessed by the processor normally to retrieve data C D74 comes complete with 0S 74 a named file oper ating system which maintains both a table and a linked list for reliability and includes our nine 44 digit precision BASIC and Assembler 0S 74 also sup ports one
14. interest is re ached Disk drives are at least partially random access i e data on the diskette is accessible with out the necessity of reading all data prior to its position on the diskette The following is a brief discussion of each storage device I Seguential devices Paper Tape Paper tape was one of the earliest forms of mass storage devices and is by far the most primitive Paper tape systems reguire both a reader and a punch The medium paper tape is not reusable and is very difficult and time consuming to handle Paper tape punches are very trouble prone mechanical devices which are quite noisy and subject to high wear They are also rather expensive Some people have the mis taken impression that paper tape is more reliable and more permanent than other recording means because they can see the holes In practice paper tape readers and punches are far less reliable than any other mass storage device and paper tapes wear out much faster than any other storage medium Paper tapes are also easily destroyed by humidity dust oil and mishand ling Actually paper tape is being mentioned here Page 9 Ohio Scientific s Small Systems Journal only as a warning to uninformed hobbyists of its in feriority and low reliability Audio Cassette By far the least expensive mass storage device for a computer is an audio cassette system The most popular audio cassette systems use the Kansas City Standard Th
15. or two standard floppy drives primarily for archival storage and transferring programs between machines The recommended minimum hardware for the C D74 August 1977 is an OSI Challenger with 32K RAM and at least 8K on a Dual Port 525 board and a single or dual drive floppy disk The C D74 must be mounted in a 22 deep stan dard equipment rack OSI Challengers and floppy disks are 17 wide and conveniently fit on rack shelves OSI will be offering a complete rack mount system in the future 4 The C D74 costs 6 000 which includes a one day user orientation at the plant The price is F 0 B Hiram and the delivery is 120 td 150 days A R O The C D74 has important applications in both business computing and research in computing itself It makes small computers practical for much larger jobs than formerly thought feasible particularly since most business computing is disk bound and not compute bound The C D74 can store all the records of a medium size company for instant access The Winchester technology of the C D74 means that the drive can be run 24 hours a day without worry ot disk wear And the sealed chamber and non removable medium protects data against operator errors The huge storage capabilities and fast access Open up new areas of computer research even to those on a very limited budget Image recognition voice recognition and playback and English language pro cessing are just a few areas of exploration possible
16. 0 up Digital Cassette 410 00 up Mini Floppy Disk partially assembled 877 00 up Floppy Disk single drive OSI C DI 990 00 dual drive OSI C D2 1 590 00 Hard Disk OSI C D74 6 000 00 BugsSFixes Many OS 65D users are overlooking the fact that the Control C Flag bit of the input distributor must be set high on serial systems in BASIC The proper flag code for serial input with Control C enabled is 81 hex 129 dec and not 91 Remember that the high order bit specifies Contro1 C test from either the ACIA port if high or the 440 key board if low Page 12 Ohio Scientific s Small Systems Journal Users of the Assembler under 0S 65D may have noticed that after printing sixty lines the Assem bler prints six blank lines This is the paging feature designed for use with line printers Users may wish to change these to suit their own uses Location 34C contains the number of lines on a page preset to 42 hex which is 66 dec Loca tion 12E contains the number of lines to be print ed on a page preset to 3C hex which is 60 For example no lines will be skipped if location 12 9 is set to 42 August 1977 Hamurabi for Tiny BASIC and 8K BASIC The following version of the popular computer be sure to omit the colon from the statements game Hamurabi was written on a paper tape system in suchas line 217 The colon is the escape character Tiny BASIC This is an unusually long program in Tiny for audio c
17. 9390 LDA 30 34CF 2B SF 250 3FCC 8SCB STA LOCL 34D57AD 4C 260 3FCE A92B LDA 2B 3406704 C1 270 3FD0 85CC STA LOCH flag ie 3F 280 3FD2 20AC29 JSR CALL 290 3FD5 A908 LDA 21009 SET INPUT TO BE FROM INDIRECT A SOS 12320073 300 3FD 8D0322 STA INFLAG FILE IN MEMORY AT 3F08 310 3FDA A989 LDA 210000000 320 3FDC 800422 STA OTFLAG 330 3FDF AI3F LDA 3F 348 3FE1 8D6SEE STA INPNTH 350 3FE4 A900 LDA 0 360 3FE6 80672E STA INPNTL 370 3FE9 4C3F1F JMP 1F3F COLD START BASIC 380 3FEC l END Page I6 Ohio Scientific s Small Systems Journal August 1977 50 REM THEN ASK WHICH PROGRAM TO LOAD 60 REM 65 POKE 8707 1 POKE 8708 1 70 PRINT PRINT PRINT 88 PRINT THERE ARE 4 PROGRAMS AVAILABLE Listing 4 8e00 000g 88090 e600 8800 3F 00 3FOo 3F 0O SFOL 3Fe2 3Fe3 sFo4 SFOS 3FO6 SFO 3FO8 3Fe9 IFOR 3FOB sFec sFoeo SFeBE SFOF 3F10 3F11 3F12 3F13 3Fi4 SFiS 90 PRINT TAB lt gt 1 ACCOUNTS PAYABLE 108 PRINT TABC7 gt 2 ACCOUNTS RECEIVABLE 110 PRINT TABC79 3 INVENTORY 120 PRINT TABC gt s 4 LEDGER 130 PRINT l 31 36 31 32 38 oD oD 4c 4F 41 44 aD 4c 34 35 se 42 58 SS 4E oD Now that you have finished the patches write the modi 10 fied program back on to track 5 sector 1 22 Now refer to the patch you loaded off of track 30 43 sector 1 Listing 2 On lines 200 to 280 load 48 track 916 which should have been loaded when you loaded sa this program No
18. ASIC the instant you turn it on Machines with full 8K BASIC in ROM cost as little as 298 00 Why should you settle for anything less The Model 500 is a fully populated 8 x 10 P C Board with 8K BASIC in ROM 4K RAM serial port and Ohio Scientific Bus compatibility for instant ex pansion All you need is a small power supply 5 at 2 amps and 9 at 500 MA and an ASCII terminal to be up and running in BASIC And all for only 298 00 0110 SCIENTIFIC 11679 Hayden Hiram Ohio 44234 Challenger IP The Challenger IIP from Ohio Scientific is the ideal personal computer complete with BASIC in ROM and plenty of RAM 4K for programs in BASIC Complete with an audio cassette interface the Chal lenger IIP uses a full computer keyboard not a calcu lator keyboard In addition the Challenger IIP comes complete with a full 64 character wide video display not a 40 character display The user simply connects a video monitor or home TV set via an RF converter not supplied and optionally a cassette recorder for program storage The Challenger IIP comes complete with a 4 slot backplane and case for only 598 00 Fully Assembled Super Kit The Super Kit is a 3 board set with a 500 board like the Model 500 without the serial interface The ROMs are configured for use with the in cluded fully assembled 440 video board to provide a full BASIC computer and terminal The Super Kit also includes a fully assembled 8 slot b
19. OF THE PEOPLE WOULD LIKE TO SEE vou AS A BLOOD SPLAT 969 PRINT 965 PRINT REALLY WASN T TOO BAD AT ALL 978 PRINT 975 PRINT TO ERR IS HUMAN TO REALLY LOUSE UP 990 PRINT LOSE AT HAMURABI 999 END Constructing a fool proof end user system 0S 65D is principally a developmental oper ating system that is it enables a programmer to write software for an end user who may or may not be an experienced computer programmer The most impor tant consideration in producing an end user system is to make it fool proof and easy to use The user should only be required to turn on the computer and the disk drive press the reset button type a D to execute the programs which have already been written It is essential that the user be prevented from getting into immediate mode and listing or chang ing the program or corrupting the disk with 0S 65D With certain modifications OS 65D can be converted into just such a fool proof system A typical end user system may consist of a set of business programs written in BASIC In order to create an end user system the programmer must do the following 1 Prevent the user from typing a Control C or Control 0 to BASIC Doing so would get the user into BASIC where he could list the program or change it or even get BASIC to suppress all of its utput In order to disable the Control C and Control 0 fun ctions you must change the contents of two locations These chang
20. SA August 1977 CD T See SS SMALL SYSTEMS JOURNAL von no featur es a page Get the most out of BASIC Part 1 by Mike Chciky special uses of the PEEK and POKE functions with its applications for PIA initialization serial port programming video display and dumping memory including a program for hexadecimal decimal conversion s 4 Memory technologies for small computers Mass storage devices a comparison of the different kinds of storage devices used in microcomputers covering the range from paper tape to hard disks with a special report on Ohio Scientific s new 74 megabyte disk 9 Hamurabi for Tiny BASIC and 8K BASIC a game to test your ability to be an ancient despot 13 Constructing a fool proof end user system by Marcel Meier F means to protect your programs from being damaged by inadvertant mishandling 15 departments Bugs amp Fixes notes on Ohio Scientific s OS 65D s Assembler and Control C Flag and how to correct problems you may encounter 12 Odds 8 Ends includes a listing of kit builder trouble shooting hints and news of the availability of FOCAL for the 6502 system 19 1K Corner Mini graphics for the 440 Alpha video display with a listing of the memory dump and the vector control keys si 20 Product news a report on the new Ohio Scientific Challenger IH with three processors that allow you to change programs at the flip of a switch 20 The magazine for 6502 computer enthus
21. Y Q lt S GOTO 330 324 GOSUB 710 325 GOTO 320 336 IF Q 0 GOTO 348 331 LET A A Q 332 LET S 8 Y Q 333 LET C 0 334 GOTO 400 B hd 340 PRINT HOW MANY ACRES FOR SALE 341 INPUT Q z NAN i 342 IF Q lt GOTO 850 343 IF Q lt A GOTO 354 344 GOSUB 720 345 GOTO 3498 350 LET A A Q 351 LET S S Q 352 LET C 0 4 PRINT 410 PRINT HOW MANY BUSHELS FOR YOUR FOOD 411 INPUT Q 412 IF GOTO 856 428 E OTO 438 421 GO Ges Page 13 Ohio Scientific s Small Systems Journal August 1977 gt aa 4 Page 14 422 430 431 432 440 441 442 443 445 446 447 459 452 453 455 460 478 519 511 515 516 317 521 s25 530 531 33 548 542 S33 554 S56 557 568 561 565 566 367 568 710 711 712 713 728 730 890 801 849 850 851 855 857 860 862 865 866 870 875 876 880 883 899 992 895 896 909 985 906 940 959 955 GOTO 410 LET 845 0 LET C21 PRINT PRINT HOW MANY ACRES DO YOU WANT TO SOW 5 INPUT D IF Dead GOTO 514 IF D lt O GOTO 858 IF D lt A GOTO 450 GOSUB 720 GOTO 440 IF D 2 lt 8 GOTO 455 GOSUB 718 GOTO 4490 IF D lt 1 sP GOTO S10 PRINT BUT YOU HAVE ONLY J Ps FIELDHANDS YOU MORON NOW THEN GOTO 449 LET SeS D 2 gt GOSUB 809 LET Yee 1 LET HaD y l i LET E 0 GOSUB 800 LET Es 8 C LET S S E H GOSUB 800 LET ImCCu 20 A S P 10044 gt LET Ce 0 20 LET Os RND 21 3 IF P lt C GOTO 210 LET D P c
22. ackplane board which gives you 6 open slots for expansion To be up and running in BASIC simply plug the _ boards together supply power 5 at 3 amps and 9 at 600 MA add an ASCII parallel keyboard plus a video monitor or TV set via an RF converter not supplied Total price for the kit 398 00 Disk Based Co byOhio Any serious application of a computer demands a Floppy disk or hard disk because a disk allows the computer to access programs and data almost instantly instead of the seconds or minutes required with cassette systems In real world application of computers such as small business accounting a cassette based computer simply takes too long to do the job Ohio Scientific offers a full line of disk based computers utilizing full size floppy disks with 250 000 bytes of formatted user work space per disk That s 3 to 4 times the work Copaco of mini floppies s Challenger IO Challenger IFis available with gt a single or dual floppy disk and a minimum of 16K of RAM in stead of ROM BASIC The disk BASIC is automatically loaded into the computer so there is no need for ROMs i Ohio Scientific s powerful disk operating systems allow the computer to function like a big system with features like random access seguential and index seguential files in BASIC and 1 0 distributors which support multiple terminals and industry stan dard line printers Challenger I s with disks can have the fo
23. assette in Tiny BASIC BASIC It demonstrates one feature of Tiny BASIC 8K BASIC users must change the RND statements namely memory efficiency This program will run in since 8K BASIC always returns a number between 0 and 1 a 12K computer only if it is run with Tiny BASIC For example line 310 should be changed to since the 8K BASIC takes up too much space If you are uSing an audio cassette based Tiny BASIC system LET C INT 117 RND 1 75 PRINT 88 PRINT TRY GOVERNING ANCIENT SUMERIA 85 PRINT SUCCESSFULLY FOR A 10 YERR TERM 86 PRINT 91 LET 0 0 92 LET T 100 LET 2 8 101 LET P 95 102 LET 352806 103 LET H 3008 104 LET E H S 110 LET Y 3 111 LET ASH Y 112 LET 1 5 113 LET 0 1 216 LET D 0 215 PRINT 216 PRINT 217 PRINT HAMURABI I BEG TO REPORT TO YOU 218 LET 2 2 1 228 PRINT IN YEAR 323 303 PEOPLE STARVED I CAME TO THE CITY 225 LET P P I 227 IF Q gt 0 GOTO 836 228 LET P P 2 gt 229 PRINT A HORRIBLE PLAGUE STRUCK HALF THE PEOPLE DIED 230 PRINT POPULATION IS NOW 3 P 232 PRINT THE CITY NOW OWNS 3 As ACRES 235 PRINT YOU HARVESTED Yi BUSHELS ACRE 250 PRINT RATS ATE 3 Es BUSHELS 269 PRINT YOU NOW HAVE S BUSHELS IN STORE 261 PRINT 270 IF 2 11 GOTO 860 310 LET C RNDC11 gt 311 LET Y C 17 312 PRINT LAND IS TRADING 3 43 BUSHELS ACRE 329 PRINT HOW MANY ACRES WILL YOU BUY 321 INPUT Q 322 IF a lt GOTO 850 323 IF
24. cated at FE hex OSI 440 Video Board at DXXX Program Control Functions When the program is initialized the screen is cleared and a is set at the lower left hand corner of the screen Typing any ASCII character will re place the with that character The ASCII symbol is the mini graphic pen and may be moved in any direction on the screen by pressing any of the fol lowing keys T Y U G J B N M Considering H as the Home Key the control vectors are best described by this diagram TY U NA POA 8 iy In addition to the vector control keys the program will also recognize the following command keys Carriage return asks for a new pen at the pen s current location Any ASCII may be used number sign re initializes the screen when the program is in the vector control mode A up arrow replaces the pen at its current location with an ASCII space i e blanks the pen Program Modification The location of the on the screen at program initialization may be changed by changing memory loca tion 921 hex from 65 hex to another hex value If for example your screen is under scanned 83 hex or even A3 hex may be more desirable However it is not possible to move the initialization location out of the lower part of the screen with this modi fication If this program is to be called as a sub routine from another program make the following changes location hex data current new 0295 A9 EA
25. clear OSI fully assemble products carry a 60 day cut breakdown of the advantages and disadvantages of limited warranty on materials and workmanship and a each of the popular media in our article part one of 1 year limited warranty on components This warranty a three part series on pagel5 As a postscript to does not apply to items such as tape recorders and this article we are presenting an enlightening de video monitors which are not manufactured by OSI We scription of our new 74 million byte disk drive for recommend that the user contact OSI and discuss the all those of you who have an interest in it Our problem before sending the unit back for repair Opening story offers you certain pointers on the PEEK Generally we would prefer that the user not attempt and POKE functions in BASIC a feature many of you a repair himself OQut of warranty repair charges are have asked about Here you will find a means to add currently 15 00 per hour and parts where applicable considerably to your system s capabilities You should A11 returns require a return authorization number gt find our descriptions of the Hamurabi and Mini Graphics QS cannot be responsible for any items received with programs both amusing and challenging In particular out an R A number in this issue we are giving notice of a revised cus tomer service policy below us The splendid response from you our readers to the first issue of Ohio Scientific s Sma
26. d one of your own tracks instead which will Suppose the patch is located from 3F99 to 3FFF and that it is on track 43 sector 1 and jt starts at 3FCl The source code for the patch is shown in Listing 2 below To load this file off track 43 sector 1 you must make the changes illustrated in Listing 3 below First load the file of 0S 65D on track 5 into 3299 Note that this is not the location where it is intended to execute We then must enter the Extended Monitor and make several changes At 3406 place a 43 indicating that you want to load track 43 instead of track Q6 track numbers are BCD Track 96 must now be loaded by our patch at 34CB to 34CF Change the low and high address where your track is to be loaded into namely track 43 into 3F99 instead of track 96 into 2B39 Finally after the call to the sub routine which loads the file place a jump to your patch 10 6098 Listing 2 at left 29 9600 03 TO LOAD SOFTWARE AND AUTO EXECUTE IT 39 6068 40 0000 3 DEFINITIONS OF GLOBALS se 6009 60 99008 LOCL2 CB 70 8689 LOCHS CC 80 9880 SECT CF 99 e000 100 86069 INFLAG 2203 110 0900 OTFLAG 2204 120 8000 INPNTL 2E67 13 6000 INPNTH 2E68 140 90809 J ai 450 9009 SEEK 26D6 160 8060 CALL 2 29AC 170 0009 Listing 3 180 3FCi a 3FC1 190 3FC1 3 A VA 200 3FC1 A961 PATCH LDA 1 LOAD TRACK 6 OF OS 65D AxC3200 85 1 210 3FC3 85CF STA SECT A RE 220 3FCS R906 LDA 6 143406786 43 230 3FC7 200626 _ JSR SEEK 34C8 30 00 240 3FCA A
27. dresses X and X 2 respec tively be inputs or outputs Line 1040 will set the data direction regis ter lines all low if A I or if the user specifies I for input Otherwise it sets the data di rection register lin s all high specifying that Port A will be an output see line 1045 Lines 1050 and 1055 perform the same function for Port B Line 1060 The user must th n speci fy whether he wants the ports to then POKEs 94 into the control register for both Port A and Port B located at X 1 and X 3 This switches the peripheral in terface registers into addresses X and X 2 The peripheral inter face registers are the registers which actually input or output data to the pins on the port once the PIA is configured by the sub lt routine to 1070 thus initializes the PIA by setting the control registers to 9 then specifies the data This subroutine at 1000 e direction of both Port A and Port B and finally restores the peri pheral interface register to ad dresses X and X 2 so that the PIA can be used as a simple 10 device at lines 30 to 260 The program The mainline program is then then asks whether you would like to work with Port A or Port B It checks on the entry at A and B to find out whether A or B is an input or an output If the port you have selected is an in gt put it then reports the current value
28. e head to step all the tracks load and wait almost one complete revolution There are two types of floppy disks available for small computers mini floppies and full size flop pies Mini floppies use a 5 25 diskette and store almost 80 000 bytes per diskette Full size floppies use an 8 diskette and store about 250 000 bytes Full size floppies access data about twice as fast and transfer data twice as fast as minis Mini floppy disk drives cost only about forty dollars less than full size drives which is fairly insig nificant compared to the retail cost of full size floppy disk systems 600 for the kits or 1 000 fully assembled Why would any engineer sacrifice Page 10 ORIVE HUB ACCESS WRITE DATA WRITE GATE WRITE PROTECT OPTION DIRECTION SELECT Ohio Scientific s Smalt Systems Journal PLASTIC ENVELOPE READ WRITE HEAD ACCESS OPTIONAL SECTOR HOLES 0 100 DIA TRACK 76 Diagram Ti WRITE PROTECT LEO WRITE PROTECT LED DETECTOR OPTIONAL WRITE HEAD U hi l STEPPER y v DRIVE NIQ MOTOR SELECT HEADLOAD soLENOiD N RSG TN 4 ACTIVITY NX INS INDICATOR S 7 KO TRACK 00 CONTROL TRACKOOLED LEO DETECTOR N LOGIC TRACK 00 DETECTOR sj Diagram 2 a factor of 2 in speed and 3 in storage capability for a 40 savings on a product which sells for 600 or more aa i The answer is that mini floppies tran
29. e is an output address and an input address for the same location That is why an A D and a D A converter share the same address One is a Read Only Port and the other is a Write Only Port The 430 s parallel input can be simply read with a BASIC line such as 209 X PEEK 64257 When this line is executed the current bit patterns present on the pins of the parallel input port will be transported to the variable X in the BASIC program Outputs are serviced or generated by the POKE state ment for instance 219 POKE 64258 X This will place the binary pattern corresponding to the value of X on the output port at FB92 which is latched so that that value will be maintained until it is changed by the program By simply adding an additional line such as 229 GO TO 299 you continuously monitor the input at FB l and place these results at FB The user can acquire the digital value of an analog input if an A D converter is present by simply reading the A D converter l0 cated at FB hen 64256 dec in the same manner Analog outputs can be generated by using the D A con verter at FB and optionally the second D A conver August 1977 19 REM HEX DECIMAL CONVERSION 208 REM 30 DIM CH 16 gt 32 PRINT BASE 10 40 FOR I 1 TO 18 S0 FOR I 14 TO 16 BASE 16 CONVERSIONS CH CI SCHR YCI A CHSCI gt ACHR CI 54 PRINT PRINT NEXT I NEXT I 60 INPUT CONVERT TO HEX OR DEC
30. e run it was enabled by the Ohio Scientific s Small Systems Journal statement A N81 Also note that the program has a test of whether the input is 24 Line 45 in the program is a test for Control X which allows you to exit the pro gram If this line were not present there would be no way to get out of the program without resetting the computer 440 Video Display The 440 Video Display is very easily programmed for inter esting displays via the POKE in struction in BASIC This allows you to write customized CRT rou tines as well as to perform a random access of the display for video games etc The following program is a simple routine that draws a box on the screen The 18 Y 53496 26 A248 40 F lt 1 3 1 42 FC2 gt 32 43 F 3 54 44 F 4 32 58 FOR 2 1 TO 4 68 FOR Xz1 TO 20 38 POKE VY A 109 Y Y4 FC2Z 118 NEXT X 128 NEXT Z 138 A A 1 140 IF A gt 259 THEN A G 159 GOTO 50 OK box rotates counters clockwise by changing the character used to construct the box This simple example shows how to draw lines of characters on any of four axes Diagonal lines can easily be drawn by incrementing or decre menting the address pointer by 31 or 33 instead of 32 Incrementing or decrementing by different values will yield different slopes on diagonal lines A moving pointer can be easily gen erated by placing the pointer on the screen then writing its new location and replacing its old location wi
31. echnique would be to have BASIC print an error message REDO FROM START if you type a re turn This will also prevent a user from getting back to the command mode This change can be made by the following patch Location Old Contents New Contents hex dec hex dec hex dec B12 2834 FF 255 El 225 B13 2835 07 7 pA 19 These changes can be made by using the POKE command in BASIC 3 Make sure that the bootstrap process brings you up in the BASIC program and not in BASIC s ASSEM include your patch 3 POWER UP INITIALIZATION FOR END USER SYSTEM immediate mode In order to modify OS 65D so that the program is loaded and executed on reset you must place a patch inside 05 650 When the user types a D this tells the software in the PROM to place the contents of track into memory This track is re corded in a very simple format so that all the boot strap software will fit in 256 words of a 1702 PROM For 0S 65D track contains 2560 bytes which consists of the BASIC Disk 1 0 subroutines and a power up ini tialization package After this block of data is loaded execution is started at 2249 hex The code here will load the rest of OS 65D and 8K BASIC ini tialize all the I 0 devices and then cold start BASIC At this point your patch is inserted One of the tracks loaded will overlay that is over write this code which starts to run on power up You will then change this track so that after it is loaded you can loa
32. ery STATE ZIP To order Payment by BAC Visa MC Credit Card Account Interbank Master Charge Model 500 Boards 298 00 Challenger IIP 598 00 Super Kit 398 00 16K Challenger I complete with serial interface single drive floppy disk BASIC and DOS 1964 00 32K Challenger III with serial interface a dual drive floppy disk 500 000 bytes of storage 3481 00 l Ohio Residents add 4 sales tax TOTAL CHARGED OR ENCLOSED m m Order directly from Ohio Scientific 11679 Hayden St Hiram Ohio 44234 or your local OSI dealer All orders shipped insured UPS unless otherwise requested Money Order i ln ONIO SCIENTIFIC 11679 Hayden Hiram Ohio 44234 HLIEN TR 5 a p Nee i A AY li SE Ohio cael 187 HaydenHiram OH44234
33. es one inside BASIC and one inside 0S 65D can be made with BASIC via the POKE command or di rectly from machine language The following table illustrates these changes For example the following line of BASIC dis ables Control C and Control 0 250 POKE 2919 96 POKE 8981 9 2 Use some form of input device other than the INPUT statement If you were to input commands or information via the INPUT statement then it would be possible for the end user to go to immediate mode merely by typing lt return gt In order to avoid this use a machine language program such as Listing 1 below which inputs a character using the 1 0 dis tributor of 0S 65D This program will be used as a USR X subroutine call from BASIC see OSI 6502 8K BASIC User s Manual pp 9 10 The machine language subroutine passes back the character in putted to the variable X To use this means of input you must set up the address of the subroutine As the 8K BASIC User s Manual states this address is at locations 23E and 23F Place the address of the machine language pro gram of Listing 1 in that location by using the POKE instruction Then call the USR X function The fol lowing code places the ASCII code value of the charac ter typed in the variable I using the machine language subroutine 19 POKE 574 236 POKE 575 gt Location Contents Contents 29 I USR X hex dec arene te EA By using this code and BASIC s string handling 7E3 2919 40
34. es of BASIC and will consider publishing these in the journal August 1977 p Mass storage devices Memory technologies for small computers Every computer system requires a mass storage device to hold programs and data Mass storage de vices are necessary because the computer s main mem ory RAM has two disadvantages It forgets once the power is turned off and it has a small capacity both because of the high cost of RAM memory and the small address range of a computer 16 to 20 bits In most applications the performance of the mass storage device is actually much more critical than that of the computer itself That is the system performance is generally limited by the mass storage peripheral and not by the CPU or RAM memory etc The mass storage peripheral is actually the most im portant part of most computer systems but seldom re ceives that level of consideration when a computer is purchased Small computers generally have only one mass storage device Devices and storage media available for use on small systems are shown in Table I below TABLE I i Media Type OSI Product Number Paper tape sequential i s Audio cassette sequential CA 6 Digital cassette sequential Mini Floppy disk Floppy disk Hard disk random access random access random access C DI C D2 C D74 The first three are sequential storage de vices that is all data on the tape must be read un til the desired data or program of
35. es or hard sectoring or by software and data on the disk itself soft sectoring Ohio Sci entific uses soft sectoring because it provides the flexibility to vary sector lengths on tracks to match the user s file size re quirements and therefore offers much higher perfor mance than hard sectored or fixed sector systems Data is accessed by moving the head over the proper track loading the head checking for index and then reading or writing on that track If the track is further divided into sectors the read write operation is delayed until the proper sector rotates under the head A functional diagram of a typical floppy is shown in Diagram 2 at the right Disk performance is specified by the total stor age capacity of a disk ex cluding additional capacity produced by flipping the disk or changing disk the data transfer rate the ro tational time in revolutions per minute RPMS the time the head takes to move from one track to another step time the head setting time and the number of tracks on a disk INDEX SECTOR ACCESS 7 8 IN DIA 1 5 IN R INDEX HOLE TRACK 00 READ DATA SEP DATA DRIVE SELECT 4 LINES SECTOR ALTERNATE 1 0 9 LINES The important parameters specify how much data the disk holds and how long it typically takes to ac cess any data This parameter is usually specified at one half the slowest access time which is the amount of time required for th
36. hio Scientific It features a 74 million byte storage capacity with an average access time of 35 milliseconds The unit is shown here mounted in a standard equipment rack 22 deep which OSI will offer at a later time A general description of Ohio Scientific s new big disk begins on page 11 August 1977 Get the most out of 8K BASIC BASIC s performance and versatility can reach far beyond what is implied in the 8K BASIC User s Manual by effective use of the machine language ref erence instructions PEEK POKE and USR X In this article we will discuss the use of the PEEK and POKE instructions to program 1 0 operations on standard Ohio Scientific systems _ The POKE command can be executed in immediate or program mode of operation The syntax is POKE I J where I is a location decimal between 9 and 65 535 and J is a value decimal between and 255 The location I specifies the actual memory or I 0 location which will be POKEd The value J is a numer ical value which will be inserted into that location Numbers used in this function are automatically trun cated to integers If numbers out of the range speci fied are utilized an error message will occur The arguments of the POKE command I J may be numbers variables or expressions The PEEK functionshould only be executed in program mode and must be equated to an expression or variable The proper syntax is X PEEK I where X is a variable and I is a locatio
37. iasts Ohio Scientific advances the state of the art of small computers e Challenger Il with our ultra tast 8K BASIC in ROM Now you can own a computer with full BASIC and plenty of user workspace for as little as 298 00 And the BASIC S is there the instant you turn the machine on a e Challenger lil is the remarkable computer which has 6502A 6800 and Z 80 processors This computer system allows you to run all software published in the small computer journals yet it costs only about 10 more than comparable ee processor computers l de e Challenger Single and Dual Drive Floppy Disks These full size floppy disks are available in kit form or assembied at about the same prices as our competitors mini floppies Yet they store three times as much data as the minies oe e Ohio Scientific s new 9 digit precision business BASIC is onl slightly slower than our ultra fast 8K BASIC Still faster and more powerful than anyone else s 6 digit precision BASIC 1 Our incredible new 74 miltion byte disk drive Tha s right 74 million bytes is available for as little as 6 000 00 complete with interface for any Ohio Scientific computer This new disk is quite possibly the world s highest performance data storage device It features an unbelievable 34 milli second average access time and an ultra fast data transfer rate e Now is the time for you to dump your 1974 design vintage 100
38. in that location specifies that that pin will be an input The BASIC program further demonstrates the use of the PIA in a simple application The program goes to line 1000 which inputs the base address of the PIA into the variable X It then asks if the A side will be an input or an output asks the same of the B side and stores the responses as strings A and B It then performs an initi S REM PIA INITIALIZATION SUBROUTINE AT 1000 18 GOSUB 1000 20 INPUT SIDE A OR BO CS 30 IF C A GOTO 106 48 IF Cs B GOTO 200 58 GOTO 20 100 IF AS I GOTO 150 118 INPUT OUTPUT TO A K 128 POKE X K 138 GOTO 20 4568 PRINT INPUT TO A IS I PEEK lt X gt 160 GOTO 20 200 IF BS I GOTO 850 210 INPUT OUTPUT TO BY K 220 POKE X 2 K 230 GOTO 20 250 PRINT INPUT TO B IS PEEK X 2 260 GOTO 20 1000 INPUT STARTING ADDRESS OF PIA X 1810 INPUT A SIDE I OR AS 4020 INPUT B SIDE I OR 0 BS 1838 POKE X 1 8 POKE X 3 8 1046 IF AS I THEN POKE X 8 GOTO 1050 1045 POKE X 255 1050 IF B I THEN POKE X 2 8 GOTO 1068 1035 POKE X 2 235 4060 POKE X 1 84 POKE X 3 4 1070 RETURN OK Page 6 Ohio Scientific s Small Systems Journal alization of the PIA By setting the PIA s control registers to These control registers are located at X and X 3 By set ting these registers completely to the data direction registers for Ports A and B are accessible at ad
39. in the L P format is loaded it doesn t wipe out the indirect file or the USR X machine language subroutine which you have created Source files in the L P format start at 3179 and are saved in chunks of B pages 2 75K Always allot only so much memory to BASIC as is not used for indirect files or machine language sub routines The L P format Loads and Puts memory regard less of what is assigned to BASIC Therefore when you Put a file and it is certain that your indirect file area will be over written you must move your in direct file to a higher memory address so that this doesn t occur Notice that in the example given here the BASIC L P format files were loaded into 3179 to 3078 One final change you could make when develop ing an end user system would be to change the command to list a program to some word other than LIST Change it for example to a random group of characters such as TBZA with which the end user will not be acquainted This will allow the listing of the pro gram but not inthe usual way thus it serves as gt another protective feature To change the command place the four new ASCII characters at the locations where the word LIST was stored in BASIC However you must use 7 bit ASCII and set the most significant bit high on the fourth character The following table shows where the word LIST is located and the charac i by which it is replaced to change the command to TBZA Location 01d Con
40. is format uses two tones 2400Hz and 1200Hz to record data at about 30 bits per second on tape Audio cassette systems generally can use very inexpensive cassette recorders and recording tape and are generally very reliable The severe limita tion of audio cassette mass storage is that it is slow and requires manual operation of the cassette trans port i e rewind fast forward etc Because of this audio cassette systems should only be consid ered as an economical starter system for beginners Cassettes can be used slowly but effectively for pro gram storage and recall but are not practical for data storage although they are still much better than paper tape systems Digital Cassette Digital cassettes store information on cas sette tape as magnetic transitions instead of audio tones This facilitates a much higher data density on the tape which also allows much faster data trans fer 4800 bits per second and up However this fea ture requires the use of expensive special recorders and tape Most digital cassette systems also have re mote transport control so the computer can rewind the tape run it on fast forward etc Digital cas settes can load and save programs in only a few sec onds but are as impractical as audio cassettes for data storage unless the transport has computer con trol Digital cassette systems with remote trans port controls are as expensive as floppy disk systems which have much higher perfo
41. ll Systems Journal was heartening to say the least We are en deavoring to live up to your expectations and cor dially invite you to let us hear from you Send all correspondence and articles for publication to o o 3 ine tne o ry TE Ohio Scientific Inc Small Systems Journal Box 36 Hiram OH 44234 New policy for Customer Service 3 i 051 now has several thousand hobbyist cus tomers Most of these customers are very reasonable people who realize that we mu t make a profit however small to stay in business However we are getting as can be expected a small number of customers who expect the unreasonable particularly in the area of repair and trouble shooting service of bare boards which they purchase from us and populate from their junk boxes and the surplus component vendors This situation has forced us to specify a new customer ser vice policy Bare Boards and Manuals oards are sold at a very low profit margin which does not support customer service Further more since our fully assembled products are so in expensive bare boards should only be considered for custom applications Since we have no control over the quality of the parts used on the board we cannot provide service in repairing the board In other words when you buy a board you are on your own Page 3 Ohio Scientific s Small Systems Journal The Model C D74 is the newest disk available from O
42. llowing optional jeatuies s e 16 to 192K of RAM memory e Single or dual drive floppys e Serial and or video O ports e Up to 4 independent users simultaneously Two standard line printer oprions plnej 74 Megabyte Hard disk e Much more _ Challenger II disk systems are very seonomical For example a 16K Challenger ll computer with serial interface single drive floppy disk BASIC and DOS costs HORI 1964 00 ve assembled Challenger M Ohio Scientific proudly announces the M ultimate in small computer systems the Chal lenger Ill This computer has a 3 processor cpu board equipped with a 6502A 6800 and Z 80 This system allows you to run virtually al software published in the small computer magazines The Challenger Ill is fully software and hardware compatible with Ohio Scientific products and can run virtually all software for the 6800 8080 and Z 80 including Mikbug dependent 6800 programs Incredible as this is Challenger III costs only about 10 more than conventional single processor microcomputers For example a 32K Challenger I with a serial interface and a dual drive floppy disk 500 000 bytes of storage costs only 3481 00 Fully L Assembled complete with software Terminal not included NAME je CJ Send me the Fall 77 Catalog enclose 1 CJ would like to order directly from this advertisement Please allow up to 60 days for deliv
43. ms Journal up to speed the heads lift off the disk by their nat ural air cushion and are moved into position over the magnetic area of the disk This feature eliminates power cycling head crashes and the costly and less precise head retractors of other disks New Big Disk from OSI Ohio Scientific proudly announces the first Winchester technology disk for small computers the Model C D74 i Specifications 74 million bytes storage unformated 18 560 bytes per track 12 tracks per cylinder 339 cylinders 10 millsec single track seek 35 millsec average access 75 millsec maximum access 7 3 megabits sec data transfer rate 7 X 17 3 4 X 23 1 2 Rack Mount 110V AC 5amps running 30amps starting Drive cable interface for OSI Challenger and 05 74 operating system software 6 000 F 0 B Hiram OH The C D74 uses a new non removable sealed chamber drive with a unique rotary arm positioner to provide the highest performance disk drive available Besides providing an unbelievable 35 millsec average l access time to any of 74 million bytes this is the first drive to offer twelve tracks on a cylinder with out reseeking That means that any of 220 000 bytes can be accessed typically in 5 milliseconds The C D74 interface and controller are des Bs igned with the same philosophy as our floppy disk con troller That is as much of the interface as pos sible consists of software and not hardware The main
44. n decimal between 0 and 65 535 and again may be a numeric value variable or expression It is totally safe to use the PEEK function However extreme caution must be used with the POKE command since it is possible for the user to in advertently POKE a location in BASIC or the operating system and effectively POKE his system to death causing a crash and requiring a complete reload of the computer PEEK and POKE in conjunction with support FOR NEXT loops and other operations can be executed at the rate of about 100 operations a second That means that PEEK and POKE can be used to perform I 0 opera tions adequately fast for human input such as key board typing and servicing of mechanical devices such as relays etc PEEK and POKE operations are not fast enough to service high speed I O operations For that the USR X function must be used in conjunc tion with an Assembler language or machine code sub routine We will discuss the servicing of high speed 1 0 with the USR X function in a later issue of the journal To effectively utilize PEEK and POKE one must know the locations jn memory corresponding to the 1 0 ports of the computer Since it is more common to use these I 0 locations with Assembler and machine code all standard documentation specifies these locations and the values residing there in hexadecimal rather than decimal notation Therefore the I 0 program mer in BASIC must be aware of the method of co
45. ned to Port B which could then be configured as an input You could then attempt to write a bit pattern out on Part A and observe the same bit pattern coming back on Port B These ports of course can be used for simple applications such as a switch register and light regist r for games _ The PIA actually has many more features than are used here For example the 6820 PIA has 7 complete interrupt controls for both Ports A and B plus hand shaking lines and several other Status bits in its control reg isters A complete description of the PIA operation is in the Motorola M6800 Microcom uter System Design Data Book gt a Ma u H Serial Port Programming It an be very advantageous to be able to program inputs from a serial port The standard S 6850 ACIA port o the 400 500 or 510 CPU Board is located at address FCQ It is very simple to read the 6850 ACIA in BASIC for specialized input applica tions particularly when an in put character is desired but cannot be obtained through the normal INPUT statement For example no contro characters are echoed into BASIC on the nor mal INPUT statement They must be brought in by a special input statement The following pro gram is an example of a program med input from the ACIA port The output of this program is both the decimal value of the ASCII code inputted as well as the actual ASCII code It is necessar
46. nversion between these two notations The BASIC program on the following page per forms the conversion of decimal to hexadecimal and vice versa with a numeric range adequate for PEEK and POKE functions Following the program is a sample execution This program can be used in conjunction with any of our kit manuals to convert the hexadeci mal addresses and desired values into decimal for use in BASIC The common OSI system ports which we will discuss are listed in the following table This is not intended to be a complete list of I 0 ports on standard OSI systems but it does present a majority or ports usable with a low to medium speed I O hand er Page 4 Ohio Scientific s Small Systems Journal 430 1 0 Board hex dec In FBO1 64257 in only Out FBO2 64258 out only A D FBOO 64256 in only D A FBOO 64256 out only D A FBO 64257 out only Ports of Interest PIA hex dec 500 CPU F700 63232 510 CPU F700 63232 450 PROM F000 61440 455 PROM EF00 61184 ACIA at FCOO 440 Video Board hex dec Alpha DOOO D3FF 53248 54271 Graphics D400 DBFF 54272 56319 Keyboard DFFF 57343 The simplest I O ports to service are those on the 430A and 430B Super I O Board This board can optionally have an eight line parallel input located at FBO hex and an eight line parallel out put at FB 2 an A D converter at FB a D A conver ter at FB and a D A converter at FBP1 The ports on the 430 Board are uni directional i e ther
47. o Eo computer and move up to the state of the art For more specifics send 1 00 for c our new Fail Catalog 11679 Hayden ee Hiram Ohio 110 Kits Ohio Scientific uses only 100 pre tested com lt ponents in kits which should facilitate trouble free assembly We are willing to answer specific questions concerning trouble shooting problems phoned in during business hours We cannot afford to spend time jaw boning about your computer system or OSI s latest developments Pd Generally if the problem cannot be cleared up in one or two telephone calls we recommend that you send the board back for repair Repair charges are 15 00 per hour for labor We charge only for components damaged by improper hook ups or other user induced failure Introduction s gt This issue of Ohio Scientific s Small Systems Journal will bring you answers to many of your most urgent questions on our latest products To all of you who have been eager to have a way to protect your carefully written programs from damage due to the act ions of uninitiated keyboard operators we refer you to our story on the end user system modifications on page 9 There you will see just which contents to change in which locations in order to add a fool proof safeguard to your programs using the 0S 65D SM If you have been perplexed by the v rious mass storage Fully Assembled Computer and Boards devices available you will be pleased to see a
48. omputers Equipped with three microprocessors Challenger III runs 6800 6502 8080 and Z 80 programs Challenger III comes standard with the 0S 65D Disk Operating System and is ideal for educational applications Students can study the three micropro cessors for programming and engineering analysis Small business application is an ideal use for the Challenger III Businessmen can utilize soft ware packages written for and of the three micropro cessors while conducting everyday business functions on the computer Industrial development is another area where Challenger III can be utilized for the investigation and comparison of the three processors A 74 megabyte disk option makes mass data storage a reality for the experienced user Still another application of the Challenger III is for personal computing The Personal Computing enthusiast can experiment with the three processors to no limit with softw re programs of all three types Personal finances strategic games home and business applications are just a few of the Challenger ITI applications August 1977 BASIC in ROM Computers by Ohio Scientific If you re just getting into personal computing and are buy ing your first machine you re probably confused by the myriad of companies and products available However there is one simple guideline you should follow when choosing your first computer Be sure that it is capable of giving you full floating point B
49. on the input pins If the port you select is an output it asks you for the bit pattern variable K and then outputs that bit pattern occurs it is latched by the PIA and will not change until the pro gram changes it or the PIA is reset One important feature of PIAs is that they must be reset on or immediately after power up by a master reset gt and then configured by software The nor mal configuration fora PIA m mediately after power up shows all lines as inputs having gen erally drifted to a logical high state Thus if the PIA is read immediately after initiali zation with nothing connected to its inputs it will generally report all highs and the data direction registers will specify that all lines are inputs This _ program is very useful for test When the output August 1977 ing PIA ports in various portions of your system and can also be used to test I 0 devices which you connect to the PIA A simple test procedure for the PIA output is to connect a digital voltmeter or VOM between ground and the output pin and via this program toggle that pin or the entire port for that matter high and then low and observe the voltage swing on the voltmeter One PIA port can be used as a signal source to check inputs of another PIA port For example Port A can be configure as an output and then alligator clips from its connector can be joi
50. r be cause the disk or heads never touch anything while in floppies the head is in contact with the diskette which is constantly in contact with its stationary jackette In theory large disks would run forever if they weren t turned off The expensive problem with big disks has been head crashes and disk damage sometimes destroying in valuable data A head crash is the act of the head touching the disk surface This can occur if dust or other foreign matter gets on the disk or if the heads are not properly retracted during a power outage High density disk drives 50 megabytes and above also have had head alignment problems with disk cartridges particularly when a cartridge at room temperature is installed in a warm drive These problems have been solved in the so cal led Winchester technology first developed by IBM which also developed the floppy disk This tech nology is used in the 3340 the IBM system 32 and IBM s newest drive for the 370 the 3350 The technology uses disks which are housed in a sealed clean air environment with the heads elimi nating the major cause of crashes contamination The heads are always precisely aligned to the disk al lowing ultra high density formats The disks have special landing and launching areas for the heads so that when the power is off the heads deliberately come to rest on the disk s rface As the disk comes Page ll Ohio Scientific s Smali Syste
51. rmance Manual control digital cassettes offer little advantage over much less costly audio cassettes and computer control digital cassettes offer no cost advantages to the disk systems which have higher performance II Random access devices disk systems Computer systems with disk are far more us able in virtually all applications of computers than systems using other mass storage devices The impor tant feature of disk systems is that the position of programs and data on the disk can be identified and used to access data very quickly Disk systems are available in two basic forms floppy disks and hard or conventional disks Floppy disks are so called because the floppy diskette is somewhat flexible It is a disk of mag netic recording film eight or five inches in diameter sealed in a permanent protective non rotating jack ette The diskettes are placed in floppy disk drives which rotate the diskette and position and load the record playback head The drive is generally operated by a floppy disk controller board in the computer August 1977 Typical floppy diskettes are shown in Diagraml right _ Data is stored on flop py disks aS magnetic transi tions The data is arran ged in concentric circles called tracks The start of each track is specified by the index hole which is op tically read as the disk ro tates Tracks can be fur ther subdivided into sec tors either by additional holes sector hol
52. sfer data at only 125K bits per second which is all the faster a 6800 or 8080 system can handle or process On the other hand only the 6502 system is capable of handling the 250K bits per second rate at which the full size floppies transfer data Consequently 8080 and 6800 users can use only mini floppies while 6502 users can enjoy the benefits of a full size floppy at about the same retail cost i Floppy disk systems provide extremely rapid program and data storage and retrieval for small com puters In most situations they operate about as fast as the user can type commands Floppies are generally available as single drive or dual drive units A single drive floppy disk is an excellent mass storage August 1977 o ONEJ device for a personal computerist industrial develop ment system or educational system Small business users can use single floppies but dual fl ppies are more convenient when large data files are required They provide 500 000 bytes of disk storage fast disk aie e and fast file sort pack ang merge cap a es Big disks 4 Until now the floppy disk was the ultimate storage device for a small computer Recent techno logical developments have made big system disk tech nology affordable and reliable enough for the small system which is not under maintenance contract Hard disks have been in use much longer than floppies in big computer installations but have been out of the
53. tents New Contents hex dec hex dec hex dec 2DF 735 4c 76 54 84 2E0 736 49 73 42 66 2D1 737 53 83 5A 90 2E2 738 M 212 Cl 193 The IK Corner is just one feature in the new Ohio Scientific s Small Systems Journal It is the place where newcomers can discoverapplicationsof omputers on simple programs And there are many other features in Ohio Scientific s Small Systems Journal where experienced sers can find interesting articl s and assistance Not to mention regular sections on software nd hardware bugs and fixes Ohio Scientific product and price information and odds and ends If you re new or experienced to the field of personal computing you need Ohio Scientific s Small sy tems Journal to answer your questions keep you nformed and educate you To receive the journal six times a year fill in oupon below and return it with payment to OHIO SCIENTIFIC 11679 Hayden Street Hiram OH 44234 Lenclose six dollars for a one year subscription to Ohio Scientific s Small Systems Journal Name Address City Page 19 The program then Ohio Scientific s Small Systems Journal The price list and product offerings listed in our July issue are still current For more de tails see the catalog in this issue beginning on page i x We have access to a high performance FOCAL for the 6502 complete with floating point and transcen dental functions If there is interest in FOCAL we
54. th a space after it moves BASIC is fast enough to produce high speed video displays on alphabetic screens but not quite fast enough to produce real time graphics because many more bit level operations are re quired to produce a dot within the graphics memory also the graphics memory is much larger being 128 dots by 128 dots The next example is a modi fication of the box program to produce a more elaborate pattern By adding statements which modify August 1977 pointers each time through the loop this same BASIC program can produce a wide variety of interesting repetitive patterns on the screen LIST 10 Y 533496 5 3 506 20 A 40 B 0 38 G i H 20 40 Fi1 m i 42 FC2 gt 232 43 F 3 m1 44 Fil4 a 3e So FOR 294 TO 4 60 FOR X G TO H 98 POKE Y A 100 Yay F lt Z 110 NEXT X 120 NEXT Z 127 HsH 1 s a 128 IF H gt G GOTO 50 in 130 B B 5 l 132 IF A 32 THEN A B GOTO140 134 Asse 140 IF AD2SS THEN A288 150 GOTO 30 It is possible under some circumstances to input characters by a simple PEEK statement by means of the 440 keyboard This is totally dependent on the actual configuration of the key board itself The following ex ample is a program that inputs a character from the 440 keyboard and displays it in reverse order on the 440 screen for a total of 20 characters across This pro gram will only work if you have a momentary keyboard strobe long enough to be caught by the poll ing routine of lines 10
55. ts a RUN instruction starting the program execution Listing 7 illustrates what the program should do on entry and exit The I O Distributor must first be set back to the ACIA input and the program of in indirect command file that was used to load this pro gram to reload he same program on track 51 The sub routine generates the following set of commands LOAD terest may then continue this example happens to show a portion of an Accounts Payable program When it is RB time for the program to exit it must make use of an RUN indirect file to load and start the supervisory pro gram shown in kraeng 5 am then set the I 0 Distribu i Listing 7 fee a REM ACCOUNTS PAYABLE lt TRACK 54 gt NA ee a gt REM nO o POKE 8787 1 40 PRINT PRINT 50 PRINT ACCOUNTS PAYABLE gt gt 2 hs Se 10008 REM ar ae 10010 REM GENERATE THE INDIRECT FILE TO LOAD THE DISTRIBUTOR ae N 10015 PRINT NOW EXITING i 19 20 3e POKE 8708 4 PRINT 10020 REM a 10030 POKE 8708 16 7 e i een 10049 POKE 114860 0 POKE 11861 63 ae 10058 PRINT LOAD 10860 PRINT L45 100798 PRINT RB 10086 PRINT RUN 109898 POKE 11879 8 POKE 11880 63 10100 POKE 8707 8 POKE 8788 128 10110 END Page 18 Ohio Scientific s Small Systems Journal August 1977 tor to input from that indirect file exits When you are developing a similar system your self be sure that when a program BASIC source file
56. w set the file at 3F99 lines 290 to 62 360 This will prevent the user from issuing commands 78 from the keyboard and insures that you the programmer 8e are in control of the dialog at the start Listing 4 ga right shows what you are to place in memory at 3FQ9 The 8e file gives the answer to MEMORY SIZE which is 16128 80 This allots to BASIC all of memory up to 3EFF The last so page of your 16K machine is your domain for this soft 89 ware It then types lt returny in response to TERMINAL 99 WIDTH The file then types LOAD as a command to BASIC 199 this gets you out to 0S 65D where the file loads the 199 program on track 45 See Listing 5 below into BASIC 109 Finally it returns to BASIC and runs the program This 4189 was done without any operator intervention after 169 typing D 110 Listing 6 p 18 shows what you have loaded from 444 3F99 to 3FFF from track 43 sector 1 110 The following is a breakdown of the contents 120 120 3F09 3F14 Indirect file of commands 130 3F15 3FCH Nothing 138 3FC1 3FEB Power Up Patch to 0S 65D 139 3FEC 3FFF USR X Subroutine for Input ape Listing 5 LIST 18 REM FIRST DISABLE CONTROL C AND CONTROL O 20 REM 30 POKE 8019 96 POKE 8961 60 48 REM z GENERATE AN INDIRECT s COMMAND FILE THAT TAKES 3 CONTROL AFTER THE USER s TYPES A D 3 TO D M a 3F 90 3 BYTE BYTE BYTE BYTE BYTE BYTE END 146128 D D LORD D L45 RB RUN
57. will offer it for approximately 40 Please send a note to the journal if you are interested i x x x x x k x Kit Builder Trouble Shooting Hints The main causes of trouble are l 1 Solder bridges 90 of all malfunctions are due to solder bridges or component failures in duced by powering up with solder bridges 2 Junk components There is a tremendous mount of scrap TTL being peddled by mail order elec tronics companies and at least one large electronics retailer As a rule of thumb relabeled TTL will not work in computer circuits Most of this TTL is from lot rejects where a large percentage of the Components were bad indicating a process problem or a slightly different unpopular component re labeled as a popular one Example 74H20s relabeled as 7420s 3 Misplaced components and jumpers and PC board shorts These problems are less prevalent than Problems and 2 but are significant PC boards Should be carefully inspected before assembly and after assembly At least 99 9 of all problems can be corrected or avoided by careful visual inspection and the use of high quality components g ol k OSI s Model 500 CPU Board August 1977 M8 Comer wx as Mini graphics for the 440 Alpha display 8249 e250 0269 8279 e280 8298 e2n9 e260 Memory Requirements 177 dec bytes located from 9299 hex to 92B1 hex zero page locations FD FE and FF OSI 5V Monitor lo
58. y to disable the Control C break test function on the in put routine if the ACIA port is also being used as the system in put port i e if you are using Page 7 the same seri l terminal to exe cute the programs in BASIC as you are using to run this program LIST S vebd512 10 X PEEKCY gt 28 IF X lt 131 GOTO 10 30 ZsPEEKCY 1 gt 48 PRINT Z CHR Z 45 IF 2 24 THEN STOP 50 GOTO 10 291 83 166 63 160 212 197 83 212 24 10m4 D OH WHIA BREAK IN 45 OK LORD BiT A NS4 AXRB OK This is necessary because the Control C test will interfere with your normal program input and will cause this program to miss characters sometimes It is easy to disable a Control C function on disk systems under 0S 65D Change the I O Distri butor Input Flag from 81 to l by using an N command in the DOS Unfortunately it is im practical to attempt to disable the Control C in paper tape sys tems and of course impossible in ROM versions There a USR X function will be necessary to per form input character functions This program assumes that the ACIA has already been initi alized by the operating system If another ACIA is used then the user must also initialize the port For a complete description of the ACIA operation comets the Motorola M6800 manual mentioned above Note that in the operation of the program Control C was disabled by the statement A N 1 and then after th

Download Pdf Manuals

image

Related Search

Related Contents

埋設型傾斜計(φ34) DC-120B-B 取扱説明書  医政発 0927第6号 薬食発 0927第ー号  FactuDesk 2012 - Base de conocimiento    Operating Instructions EPM__HMI EPM-H521  取扱説明書家庭用  Hitachi Plasma 42 PD 5200  

Copyright © All rights reserved.
Failed to retrieve file