Home
TMQ Vol VII.ii
Contents
1. Volume VIL 1i For one thing Computer News 80 offersa service of freshening original master disks which can no longer be read For another they have a library of older soft ware and seem interested in keeping on with TRS 80s Thank you for your long support I use MS DOS machines too sokeep me posted on your new endeavors Fm MISOSYS Inc To all those who have an interest my recomendation for anyone interested in maintaining a collec tion of my discontinued software is to consider setting up the way remainder book sellers operate Publishers are al ways closing out theirold stock There are companies whichremainder discontinued products Right now with the remaining stock I have left of user manuals someone or some group could buy up all the stock and have sufficient products to last for years There will not be a need to manufacture new copies All it takes is for folks to put their money where their mouth is I am getting out of the TRS 80 market for all but a handfull of products If some one or group of folks want to buy out the remain ing stock make me an offer for quantities You have my price list for closeout pric ing lam certainly willing to sell whatever quantity I still have on hand But after June 21st anything left will probably go to the recycler Iam tired of paying torent warehouse space to store such items that do not sell As an example I took over BASIC
2. h la amp gt gt lt lt o rr NN ow 0x80 0x02 0x 0 gt gt 2 lt lt 4 702280202800 8 BW 34 Volume VIL1u These operators represent the assignment operators They were seen before without the equals sign In the assignment expres sions a op b is equivalent to the expression a a op b They make expressions such as a a 5 much easier when written as a 5 Usually the resultant assembler machine code produced as a result of these operators is more efficient too They are especially helpful if a long complicated expression is on the left of the and needs to be used to the right of the Operator The comma is used in C as punctuation It iS seen separating expressions in declara tions and it is seen separating arguments passed to functions The comma separator is different from the comma operator The comma operator is usually found used in a for statement An example of a for ex pression OK for i 1 i 50 i Logic control and flow The specific C language vocabulary words that will be used in this discussion are for while if else switch break continue do goto In conjunction with the above logic con trol and flow vocabulary words state ments and blocks of statements accom plish the tasks designed into a C program Let s take a look at these C vocabulary words and their use in a C program But first a quick reminder about e
3. printf The answer was NO break default printf Enter only Y or N n break Theabove switch statementcould possibly be used to test for a Y lt es gt or N lt o gt reply Note that it uses a case for the upper or lower case possible responses You are no doubt asking what happens if the default case is executed and you want to allow another response until Y or N is entered Well you could use the C statements which allow looping Looping executing a statement or groups of statements a given number of times can be accom plished inC via four basic ways for while do while and goto The syntax of the while statement is while expression statement If the expression after evaluation ts true the statement is executed The expression is then re evaluated and if true statement is executed again This process is repeated until expression is false zero i The syntax of the for statement is for expression 1 ex pression 2 expression 3 statement Expression 1 and expression 3 are typi cally assignments or function calls and expression 2 is an expression to be evalu ated as true or false a relational expres sion Another way to write the logic of the for statementusing while is shown as follows expression 1 while expression 2 statement expression 3 From the explanation ofthe while youcan see how the for statement works In the for statement
4. MONITOR displays control chars in string form xx TITLE prints a title after form feed v UPPER converts lower case character to upper case v LOWER converts upper case character to lower case v SLASHO translates Zero to zero backspace siash V TRAP discards any user detined character v LINEFEED adds or removes a lineleed after retum v PAGEPAWS pauses after formiead for lt ENTER gt kay w CALC performs hex dec bin conversion hex add or sub v REMOVE removes occurrences of a byte from a disk file v COMM1 tests for modem camer v DICTATE toggles cassette on off from the keyboard a DOSPEED regulates output device speed from keyboard v KSMPLUS features key re definition on the fly a LCOUNT adds a line number before each line of output MARGIN sends a 2 char control before margin spaces Vv MAXLATE translates one character to a group of chars V SLOSTEP for drives that require additional settling time v VIDSAV saves the current video screen in high memory Model 4 Utilities LS Utillty Disk Fitters and Utilities tor DOS 6 x V PRCODES gives contro of boldface and underlining v TRAP discards any user defined character v MAXLATE is a translation fiker system for V O devices Does 1 1 or many includes EBCDIC and DVORAK tables V KSMPLUS improves on the DOS allows key re definition on the fiy defines strings for the function keys V READ40 allows access to a 40T disk in an 80T drive WV TYPEIN combines the funct
5. and _ BRINGUP tickler file schedules up to 1 items per day by time Z80 Disassembler New print module Remember thosa appointments A sorted symbol table listing is available during the assembly A complete CROSS REFERENCE listing is performad by the XREF utility DSMBLR PRO DUCE CALendar gives you a month at a glance covers 4000 years Flags days with BRINGUP items This disassembler provides extensive capabilities such as direct disassembly from CMD disk files automatic partitioning of output disk files data screening for non code regions and full labe generation ft even generates the ORGs and END statement the complete ball of wax You will find that the use ofthis disassembler even by a beginning assembly language programmer will be paying handsome rewards with the ease of its use and clarity oi the documentation It s a professional tool for your use Line edit text in memory and use a command syntax identical to BASIC with block move copy with string change search Invoke W A3x5 CARD filer for a free form scratch pad of 40 columns by DOS commands within the editor 12 rows Or use the new CARDX with formscapibilities t s great for keeping a small data base lf you are writing system software support software applications big or small EDAS will provide the power to make your job easier faster and more worthwhile PHRASE is a KSM from disk for lots of automation v Atalephone list and au
6. extra sometimes unnecessary assign ment statements which assign a value to a variable K amp R call this shorthand for as signment statements Remember what was just learned about blocks and how vari ables can be declared within them Well variables declared within these blocks or functions can also be initialized This initialization takes place each time the External and static variables are initialized only once Are you wondering why this is External and static variables are of differ ent storage class and scope than automatic and register variables Think about how and when these variables come into exist ence and when they go out of existence if they do Also for automatic and register variables the initialization can be done via any valid expression This initializeris not limited to a constant expression Before I discuss how arrays can be initial ized shouldn tI discuss what they are and how they are declared defined For ex ample int number 10 This declares an array of size 10 In es sence this is a block of 10 integers together Likewise char name 12 declares a block an array of 12 charac ters Each member of the array is called an element Each element is numbered or indexed In C the index starts at zero For example in the number array above the elements can be referred to individually via number 0 number 1 thru num ber 9 C also supports multi di
7. of the SCSI INTE is stenciled on the H A Note that there are two traces on the component side of the board you do not want to drill through them Mark a posi tion exactly 1 1 16 from the left edge of the H A and 1 4 from the bottom Drill the hole from the component side to mini mize any flaking of the surface which could unseat the trace Again start with a small drill bit I use a 49 which is 0730 in diameter then enlarge it to 1 8 If your4P has an Astec power supply two holes have to be drilled as the available ee ye rp hep sressneeerereneeees Inside TMQ 21 Inside TMQ Volume VILii THE MISOSYS QUARTERLY spring 1993 Volume VI ii unused hole near D5 R17 and R18 is too far out of position Incidentally if youever wondered why these holes are on circuit boards sometimes the mechanical appa ratus used to manufacture printed circuit boards needs a hole for positioning the board Turn the Astec supply to see its trace side with the power connector to the left One hole is marked 1 1 4 from the bottom and 5 8 from the left From the top this is approximately where the ground designation is stenciled to the right of C24 The other hole is marked 1 1 16 from the bottom and 5 1 4 from the left Looking from the top this hole is positioned above J2 ajumper to the right of C7 and to the left of R2 It is just below a toroidal trans former or coil whose designation I cannot read be
8. runs on various operating sys tems C has been called a systems pro grammers language since it is useful in writing operating systems In fact the UNIX operating system a trademark of BELL LABS was written in C Fre co languager ferenc version You don t however have to write an operating system to take advan tage of C C lends itself well to structured pro ly any given implementation of the gramming Structured programming does not mean the absence of the GOTO state ment In fact the C language doesimple ment the goto statement However as Kernighan and Ritchie K amp R state in their book the GOTO is infinitely abusable When I discuss the control and flow ofa C program I ll talk more on the topic of structure Not to be confused with the C concept of structures i e records The Basics of C C was designed to be a portable lan guage Its not very heavy at all Many C programmers will Say it is light in some features Most programmers are amazed when they see how relatively few identifi ers Statements or keywords that C has Here is all there is As you can see many of the C state ments are the same as those found in other languages For examples if for goto etc Did someone say they can t find the keyword enum in the back of K amp R s book TIl pretend I didn thear that fornow New things c
9. instead of in an if statement Thinking arrays start at index 1 instead of 0 Unclosed braces or brackets Forgetting a Using instead of Off by one errors in looping or array indexing declaring function arguments af ter the Forgetting the precedence of op erators Thinking C has built in string comparisons Using instead of gt Using Q instead of function arguments placed in the wrong order Not reserving an array element for the terminal 0 Forgetting about side effects As you read some of the above most fre quent C coding errors didn t you say to yourself YES I have done that before If you did you are not alone Some of these errors are caught by the C compiler many are not Another program for detecting possible errors in C code is called LINT It typically better enforces the rules of C and reports more possible errors than does the C compiler DOS Environments An enhancement to LDOS and LS DOS Code by R N Deglin Text by R Soltoff Back in the old days of the Model I re member them programmers had to de velop tricks in order to pass data from one program to another Usually they resorted to stuffing the data into high memory thereby making use of BASIC s HIGH parameter in order to keep BASIC from using all of memory The problem with this approach soon became evident when other programs were written to rel
10. new dating Mine are from Powersoft days and if the code s been updated I should get new ones Fm MISOSYS Inc They were never updated I wouldn t touck the code inSU _ with aten foot pole As far as the toolbelt toolbox we have other products which operate similarly and are x 3 compatible Ee ET FDC Card Installation eee Fm RTM I purchased a Model III 4 FDC Card from you on 01 19 93 There wasn t any insructions on how to install the card Help please Fm MISOSYS Inc They aren t kits To venture into the world of electronic cards for the TRS 80 you need to get your hands on a Tech Manual for the machine The FDC card we sell is simply a replace ment It takes a few pages of instructions to convey the best way to open up your desktop Model MI or 4 and lift off the top without risking breakage of the CRT If you do not know what to do either get the Radio Shack Tech Manual should still be available from RS or get the assistance of a knowledgable assistant Conversion from a Cassette machine requires many other parts To help you along the following informa tion was provided by the LDOS Forum s hardware expert Fim JB If you don t have 2 or 3 spare power supply connectors little 4 pin jacks you will need either an extra 38 watt power supply or a new 60 watt which replaces your existing 38 watt A single 38 wattpower supply isona4 x5 PCcard on the front of your motherboard case A 6
11. t tab z 015 return backslash The last example shows how to generate any character you want It is the N fol lowed by one to three octal digits A string of characters is represented by characters enclosed in double quotes In C a stringis always terminated with a NULL or O character Itneed not be typed in the string itself since the C compiler adds it on automatically An example Earl C Terwilliger My name as a string eee See SS SS i SS a Inside TMQ 30 Inside TMQ Volume VIL ii Note the above string has a length of 19 and asize of 20 Don t forget the terminat ing NULL added by the C compiler Operators Operators are the next topic They specify what is to be done to variables and con stants Operators when combined with variables and constants are called expres sions As an expression is evaluated there is a precedence or order of evaluation It is important to know the order of evaluation when the different types of operators are combined in an expression especially if you want a correct result Below is a chart of the operators available inC Itshows the relative order level of precedence and the associativity of operators of equal pre cedence The associativity is given to show how expressions are evaluated if operators of an equal level of precedence are found side by side The actual work ings of each operator with some
12. 4 S amp H Call or write MICRODEX for details 1212 N Sawtelle Tucson AZ 85716 602 326 3502 lt P 23 Inside TMQ Volume VILii THE MISOSYS QUARTERLY spring 1993 Volume VIL ii we a ana eta arar afara et arm v H ow to Make a M O d a 4 F I L T O M A T Having aa my iii aiadaieaal raised on Model HI LDOS I was often by Christopher Fara puzzled by the fuss of installing filters in Model 4 LS DOS In Model II it s rela tively simple For instance to install a printer filter SIMPLE FLT we wouldenter RRR FILTER PR SIMPLE That s all To accomplish the same thing in Model 4 we must first dream up a name for the filter device make sure it s nota duplicate of an existing device name and then issue two separate commands such as SET AA SIMPLE FILTER PR AA Somehow this always reminds me of the famous expletive deleted Watergate tapes Maybe it s the asterisks Yes yes I know there are good reasons for all that and it s a more powerful method alto gether Beitas itmay many long distance chats about asterisks with customers who were not always quite comfortable with DOS procedures ledto filtomats or self installing filters apparently a little Microdex special To understand it we must first visualize a normal FLT file About the simplest possible example might be aprinter filter thatreplaces one particu lar character with another Perhaps the rarely us
13. need do is use the Y cable intact Connec tor genders arereferenced according to the coupling of the pins thus the Y has on _male and two female connectors One leg ofthe Y isfor the H A which needs only the 5V supply Therefore cut both the yellow and black closest to the yellow from one of the female connectors also cut the oppo site ends of that leg at the male connector side You will use the small cutout to the right of the fan to provide a means of getting that leg of the Y back to the power supply compartment Add a smali piece of electrical tape to the edges of the metal cage to minimize any chaffing of the cable leads You now have one power connector for the H A and another for the hard drive Connect the male connector of the Y cable to one of the floppy power connectors _ If you are going to install a power switch follow this procedure Using the Y cable cutthe red and yellow leads one and a half inches from the male connector red is the 5V line and yellow is the 12V line There is no need to sever the black leads which are ground leads Then extend the red yellow leads using two pieces of wire ten inches in length from the male connector to the center poles of the switch The female connector going to the hard drive can be wired to the other side of the switch Wire the yellow lead to the other side of the switch using the same pole as the yellow coming from the male connector The red lead from theothe
14. pre processor an optimizer assembler macro files C libraries a Job Controf Language file the header files and a 400 page user manual MC requires the use Of either M 80 or MRAS 2 disk drives and upper fower case RATFOR is tree field blanks are significant as delimiters numeri cal statement labels are mostly unnecessary all 80 columns are available for statements provides user defined macros and RATFOR provides powerful loop constructs Structured BASIC The BASIC Answer The BASIC Answer is a text pre processing utility that allows programmers to generate program code in a struc tured manner Source code is created with your text editor TBA is then used to process this source code into ordinary interpretive BASIC code that uses a minimum of memory TBA utilizes labels in lieu of line numbers supports variable names to 14 significant characters allows the use of pseudo Global and Local variables local variables retain their value only in a unique subroutine and introduces the concept of Conditional Translation This last feature allows co existence of machine dependent or other variable code within the same program source with the relevent sections ignored when processing the source to executable code ing very large programs and PRINT and support of any valid FORTRAN expression for switch and case operands This package includes the language translator a batch file to our LED text edito
15. 000 I paid a royalty advance up front of 1 000 to The Cornsoft Group for their rights to the five Cornsoft games Letters to MISOSYS I now sell When Powersoft wanted out I purchased the rights to PowerSoft soft ware fornearly 25 000 When Aerocomp closed down I acquired their remaining supply of FDC boards RS232 boards Model I Doubler boads DDC and hard drive parts along with the CP M harddisk drivers For this I paid a few thousand up front and owe a royalty on each unit sold In order to continue to support the TRS 80 market I have put my money up front to ensure that products remained in avail ability I think it only fair that for anyone Or any group who wants to purchase MISOSYS software should pay up front There is no other option I have plenty of software stock left right now to satisfy any demand for the next ten years Folks need to put up the money now I ve made some money in the past so I m not griping about the costs only reflecting that in the business world you better be prepared to investin orderto reap File conversion ane Fm DH Any suggestions on ho fer to a PS 2 a file that was created in Profile Plus on a TRS 80 Model 4 Are thereany DOS databases that would handle this Fm MISOSYS Inc MISOSYS sells a product called TRSCROSS which should run on the PS 2 and read the TRS 80 disks You will need a 5 25 drive which may not be available for the PS 2 We a
16. 1 for the Model I that I use to replace the SOLEd LDOS 5 1 3 5 that was used on both Model Is I sent a check for two 5 3 0s for the Model I when it came out for the IN I used MultiDOS 2 1 fora while untilI gotLDOS patched to 5 1 5 I still use it occasionally becauseofacouple of utilities ZAP VFU amp FMAP that I m not aware that exists for LDOS Ihave and use FED CMD I m looking for a disk zapper to handle the double sided drives One of the features that I would like is to be able to format amp verify a single cylinder Does MISOS YS have one or did I mss it I also have enclosed a printout of FMAP Do you have something like that MAP CMD doesn t tell me what file is in specific granule If a disk crashes very rare to day I could look for that file on an other disk or archive copy The Model 4 is my primary machine using LDOS 5 3 0 90 of the time LS DOS about 8 MultiDOS 1 andotherDOSes 1 I have wanted DOTWRITER for years which isn t available I heard that PowerDot is something like it Where was itreviewed or where can I get more infor mation on its use and potential I read about GRASP that you sold years ago Could this be used to enhance my Model J Iil 4 printing Do you still sell it Fm MISOSYS Inc As Mark Twain once said the report of my death was an exaggeration I don t know how that rumor of me getting out of the TRS 80 market started circulating Perhaps that s what they wi
17. 13 15 WAM applications so they can pep up even when you are using other programs and applications a l Here s one of those rare utilities designed for the programmer UNREL will decode a relocatable object module which has been assembled by either Microsoft s M80 or MISOSYS MRAS as semblers The output is an assembler source file compatible with MRAS and M80 UNREL assumes anything ina code segment is code and anything in a data segment is data It supports special link items 0 3 5 7 9 11 13 15 DED edits disk sectors FED edits file records and MED edits memory pages even altemate banks All usa a similar display Screen and strikingly similar commands to enable you to edit anything Get comfortable with one and you will know how to use ail three of these editors MLIB maintains both relocatable REL and indexedrelocatabie IRL module ilbraries You can add delete extract or replace a a VED lets you edit the video screen with CARD type editing module and get module maps You get cut amp paste with this you can easily useit as the clipboar facility found on more expensive systems We bundia in SPLITLIB which can be used to split a library into separate modules We aiso indude DECODREL for displaying the bi stream of a REL file This can be used to more fully understand the actual bit stream SAID is an advanced full screen text editor It can be used to generate your assembler source code C language sour
18. 93 In any event an LBDM has been planned for quite some time and I wanted tocomplete thatasasteppingstone to a Windows version of LB syan ons R T A Nan E NAAT ERA anane PaE nE R PR ESES ST eerren anan aevo t e ona atatoa ga sere From my observation DeskMate was modeled as a chareacter based version of Windows So I feel that a good grasp of development under DM will aid in grasp ing the intracies of Windows If readers feel that they would be interested in read ing of my DeskMate development experi ences give a shout Pen ee ee Points to Ponder Here s help for free lance programmers A new Programmers Registry has been established by Solutions Software Corpo ration to create a database identifying part time at home and full time program mers The Registry will contain informa tion on the types of programming services that these individuals can offer on a part time and or full time basis to clients Retirees students homemakers and oth ers with the spare time and the skills available to providing programming ser vices are asked to request a free Listing Questionnaire The Solutions BBS may be accessed at no charge by calling 407 321 6119 8 N 1 Go to File Library and download QUEST ASC The completed listing may be uploaded to the BBS or via mail or fax For more information con tact Solutions Software Corporation 1511 Kastner Place Sanford FL 32771 407 321 7912 Fax 407 321 3098 or 407 323
19. A pointerisaC variable which contains the address of another variable I can hear you thinking You are no doubt asking how does the pointer get the address The unary opera tor amp mentioned in an earlier part gives the address of its object The amp operator ap plies only to array elements and variables Consider the following char a char ptr _ a 25 ptr amp a In the expression ptr 4 amp a ptr is assigned the address ofa By the way there is no such thing as just a pointer In C pointers are always pointers toa particular data type As shown above ptr is a pointer to type character The operator de notes indirection it treats its operand as an address It accesses this address to obtain the contents stored there For example char ptr a b b x ptr amp b a ptr In the above examples b is assigned the value x ptr is assigned the address of b a is assigned the value of the character pointed to by ptr which is x ptr is a C mnemonic declared in this example to be a character The combination of the and ptr denote a character just like the above variable b does When a pointer is de clared the type of data it points to is stated The pointer is limited to point to data of that type Also pointers and pointer refer ences are lvalues andcan appear on the left side of assignment statements Above the pointer ptr is seen appearing on the left of an assig
20. Fara of Microdex also begins ex posure of his expertise in TMQ Look for his article demonstrating a different slant on filter installation Finally in the last issue of TMQ I piqued your hard drive interest by my reference to the upcoming SCSI driver Well it s com plete and this issue provides complete specifications on how I tumed my Model 4P into a 40 megabyte machine With its XLR8er speed and 40M capacity all I need do now is find a way to add a hires graphics board The Blurb 4 The Blurb Volume VILii Volume VILii THE MISOSYS QUARTERLY spring 1993 eee I handle support via that facility You can STREK Star Trek collection in also submit an order either by a message ventory saved as PRIVATE or via EMAIL VID Video Tape and Laser TMQ Schedule MSDOS users can even request an order disk library for selected products be EMAILED as a ZiPed file for nearly instant service manu z obe oa aak LB Template Disk 2 The MISOSYS Quarterly is mailed ap AUD Catalog of audio disk proximately every three months Note tape collection that your mailing label usually has the COMPUTER Catalog of owned com expiration date of your subscription For DISK NOTES 7 2 puter equipment instance those with 93 03 complete S S CREATURE Catalog of adventure their subscription with this issue The game creatures renewal fee to continue with another four LIB Library card catalog issu
21. It also tells you how many disks to have ready Works under LDOS or TRSDOS 6 both versions on same disk Great utility for hard disk users Hard Disk Drivers for Tandy disk systems Supreme HD Driver RS These hard disk drivers out pertorm the Tandy drivers in many ways Our Powersoit drivers allow you to combine LDOS and TRSDOS 6 onthe same drive and boot from either system with floppy disk They run faster and take much less memory from the system Only for use with Tandy Hard Drives SuperSCRIPSIT Printer Driver PowerDriver Plus Allows EPSON or compatible printers to be fully utilized with SuperScripsit and SCRIPSIT PRO This is a replacement driver lor the ones you got with SuperSeripsit tt fully supports the various Epson and Epson compatibie primers to the limits of their capabilities Model Ill or 4 is supported in the same package Easy to install Mailing List Fixed Database PowerMail Plus This program was because all the other mailing list data base systems couldn keep track of ali the types of data most folks wanted to keep track of You needed speed you needed hard drive support and you needed a crash proof data structure PowerMail was top rated 5 stars in several publications and has never been topped Works on floppies or hard disk under all popular TRS 80 operating systems Allows importing of data from several other once popular mailing systems to avoid re typing Wri
22. LB LB86 support a maximum of 64 fields LBCONV likewise was coded to handle a maximum of only 64 fields It turns out that LBCONV although only supporting a conversion of 64 fields did not safe guard against a source data set with more than 64 fields I have therefore upgraded the LBCONV utility to properly accept a Profile data base file of up to 99 fields which is the ma m supported by Profile LBCONV will display the field information for all fields i inthe Profile database However LBCONV will only convert the first ac tive fields it finds up to a maximum of 64 the LB limit Fields are deactivated by using the EDIT command of LBCONV tochange the field type to X To accomplish a conversion of all the fields convert the Profile file set and LB will take the first 64 fields Then I edit the field list to X out at least as many fields as exceed 64 and convert toa new LB file name This results in two database file sets _AS s the TRS 80 version had insufficent available memory to xpand the data ar eas to 99 fields only the MS DOS version has been changed B86 and extended characters Fm DMS Queensland AUSTRALIA I am encountering a problem with the LB86 Data Base Manager when attempting to print Multiple Across Labels The prob lem appears to be the use of a Control Code 156 to print the POUND Sign Example 1 shows that on lines 2 and 3 the characters move one space t
23. S when I acquired the Powersoft products in November of 1989 BASIC S was then added along with all the other Powersoft products to my catalog at a price of 29 95 For three years in a row I spent money printing the data on BASIC S in my catalog I also advertised all the Powersoft products in CN80 for a short spell I never sold a single copy of BA SIC S that s in three years Now all of a sudden I say it is being closed out for 5 and someone wants to buy it suggest that the product was not overpriced If no one Letters to MISOSYS 13 Letters to MISOSYS Volume VIL ii THE MISOSYS QUARTERLY spring 1993 Volume VILii wanted to buy BASICS for three years it tells you what the product was worth at least in the minds of the user community After three years of advertising a prod uct that wasn t selling I junked it No company in their right mind would con tinue to offer a product which hasn t sold for three years let alone one year So folks make me an offer I will not nsf lication rights for items bein closed out Remaindering is the only op tionat this point When LSI decided it was no longer profitable for them to continue in the TRS 80 market I purchased their software andrights for well over 100 000 royalties are still owed under certain con ditions for Model 4 LS DOS 6 3 sales When Teletrends wanted out I purchased their supply of parts forthe TT512 modem for over 5
24. We can t imagine ANY report that cannot be performed by AFR You can field your data each with differant field iengths FORM LETTER output of AFM wiliallow you to write documents and have the data filled in automatically by AFR RELATIONAL LOOKUP report allows multiple passes through the database while generating reports You can utilize information from ALL NINE drawers in the same report e MAIL labels etc are a cinch with AFR s lt T gt ext option which allows selected feld output without fielding the information before hand Forms filter parameters include Word Wrap Page Numbering Headers and Vertical Justification TRS 80 Software and Hardware from MISOSYS Floppy Disk Repair Utilities SUPER UTILITY PLUS Reads repalrs and works with all the popular TRS 80 operating systems Models Ill 4 If you use a TRS 80 with disk drives then this is a must have program that you will wonder how you did without for so long Super Utility is completely menu driven with the most common detaults built right in ft is configurable for all the popular TRS 80 operating systems and will even allow you to set one drive for one system and another drive for a different operating system and copy files easily between the two Even between Model and ill or 4 regardless of density track number number of sides or system used Super Utility removes or decodes passwords reformats a disk without erasing the data f
25. a function The function can then be called whenever its logic process is needed It is thus that functions can hide confusing tails in the main body of the program Following opic flow is much easier The programmer can see immediately whatis going onand yet need not be concerned as to how things are being done C lends itself well to struc In C a function like a variable name has associated with it a storage class and type AC function with no explicit declaration is by default external extern External functions can be called from multiple source files A function may also be de clared as Static Remember if declared as Static a function can only be called from within the source file where it is typed in defined The type of a function can also be specified Are you thinking that func tions are a collection of expressions and wondering how can they be assigned a storage type Well actually the type asso ciated to a function refers to the value if any it returns Functions unlike vari ables need not but can be declared before they are used The C compiler knows the difference between an undeclared variable and a function by the left parenthesis immediately following the function name Here are some examples of declaring a function static char inth a c void compute len wid int test The function Inth is declared to be only known within a single source module and returns a charact
26. allows you to create drawings much larger than your screen The screen is a window toa much larger drawing area and you use the arrow keys to move about the drawing inaway it is similar to Macpaint for the Macintosh computer It also allows you to create custom fonts for ads etc Many of our early ads were created with PowerDot it creates the hi res effect due to each TRS 80 block pixal being printed as a single dot Please spocity if EPSON Okidata Prowriter or Radio Shack printer Let LB Data Manager solve your data storage problems LB Version 2 3 Modern up to date features provide this newest release of our Flat File Data Manager with a greater degree of flexibility and an increased level of ease of use LB still provides strong data base capabilities with absolutely no user programming NOW WITH COLOR SUPPORT FOR PC USERS We ve added many features asked for over the past few years by LB users yet LB is still about the easiest most flexible data manager you can use for managing your data Absolutely no programming is needed to create a database with up to sixty four fields construct input screens for adding viewing and editing data and create your own customized report Quickly you define your data fields in response to LB s prompts and then draw your data input screen using simple keystrokes or have LB automatically create yourinput screen In no time at all you re entering data Customize your printed reports
27. but also a storage class The scope lifetime of a variable is the part of or range of the program in which the variable is defined There are basically four types of storage classes for variables extern auto static and register Animpor tant concept to introduce before explain ing these four types is the difference be tween the declaration and the definition of a variable When a variable is declared properties of the variable are assigned type size etc When a variable is de fined done only once storage is assigned Except for use with external variables these terms definition and declaration are almost synonymous Automatic auto variables are variables local or internal to a single function only This is the default for variables de clared within a function Auto variables have a scope or lifetime only within the braces or block in which they are defined Variables declared as or defaulted to auto appear as a function is called and disap pear when the function ends Since they have this dynamic local nature they are said to be automatic External extern variables are global in nature They are permanent and are acces sible throughout the entire range of a C program They can be shared between functions of a single C program and be tween many C source programs Only one of the C programs would define the vari able the others would have toonly declare it as e
28. by environment string name That s where the structure of the string comes into play So you don t have to provide your own string parsing and searching routines C provides a few functions to access envi ronment strings by name These functions and their declarations are extern char getenv char varname extern int putenv char envstring The getenv function willreturn a pointer to the text string which follows the varname if that name is found in the environment otherwise it will return a NULL The putenv function returns a NULL if it successfully added the envstring to the environment and 1 if it was not successful The environment must first be created This is done by a separate DOS program called INITENV CMD The program can create a new environment space or it can either shrink or expand an existing envi ronment moving any existing strings ac cordingly The latter can only be done if HIGHS can be altered i e if the environ ment was the lastmodule added to memory Under MS DOS minimal environment space is automatically created it is ex panded by a parameter of the SHELL command One would use INITENV as follows INITENV lt size gt Size is the amount of memory to reserve for the environment it must be within the range 128 1024 bytes If the argument is omitted a default of 256 is provided Once the environment is created any C pro gram compiled with the appropriate op tion can access
29. capability View screen definition even provides an intelligent line drawing mode so you can create lines and boxes to enhance the appearance of your screen image If your computer supports a color video adaptor each view screen can be configured to a distinct foreground background color arrangement to increase the distinction of it s data viewing Using a database password provides the capability of selectively protecting fields from being displayed or printed without entry of the correctdatabase password or they can be protected from being altered This is quite useful in a work group environment Fields may be selectively established to require a data entry before a record being added or edited is saved You can enable a special index file to keep track of records being added This can be subsequently used for example for a special mailing to newly added customers Flexible editing includes global search and replace with wild card character match and source string substitu tion Search and replace can be performed on all records or on records referenced in an unsorted or sorted index file Record selection and sorting You can maintain up to ten different index files to keep your data organized per your multiple specifications Records may be selected for reference in an index file by search criteria using six different field comparisons EQ NE GT GE LT and LE You can select on up to eight different fields with AND and OR conn
30. compound statement Functions are invoked by their name fol lowed by an optional argument list in parentheses Taking a look at a simple C program the use of the all these symbols O can be illustrated main C sample program to print HELLO and return back to the DOS prompt printf HELLO exit 0 Note that comments in a C program are delimited by a and an In this sample program three functions are refer enced mainQ printfQ and exitQ The exit function passes back to the operating system the return code of 0 This function is unnecessary in this sample program since the program would fall through and end normally at the last brace without it It is usually a better practice to return a value upon ending a function The printfQ function prints the values passed to it in the format specified Its counterparts in the FORTRAN language are the WRITEand FORMAT statements a BASIC counterpart would be PRINT The arguments of a function are passed as copies of the values of the arguments This is call by value versus call by refer ence The function gets its own copy of the variable and can t change the original passed value held by the caller Call by reference that is passing the addresses of the variables can be achieved in C if pointers addresses of the variable argu ments are passed Having the address of the var
31. controller provided by Western Digital however that controller was still quite expensive and had limited availability Othercommon controllersused with MFM drives were the Xebec 1410 virtually a standard and the Adaptec 4000 Both of thesecontrollers required aS ASI Shugart Associates System Interface port on the host Computer side and presented an MFM interface on the drive side SASI grew into SCSI Small Computer Systems Interface which is essentially electrically compatible with additional software com mands As an aside due to the terseness of the command set with regard to support ing more than just hard drives SCSI grew into SCSI 2 and is on the verge of grow ing into SCSI MI As had been discussed in previous issues of the Quarterly I had originally wanted to use a new PC compatible controller however there never was a direct way to control the sector size available PC XT controllers were fixed at5 12 byte sectors Thus I had turned t6 the surplus availabil _ ityofS1410 type controllers An adequate supply of Adaptec 4010 and Xebec 1421 controllers was acquired approximately 400 These could be easily associated with the MFM drive type All that was needed was a host adaptor to couple the TRS 80 50 pin external bus to the SASI interface side of the controller Thus the 19 Volume VIL ii Megabyte 4P by Roy Soltoff MISOSYS T80 to SCSI host adaptor was born Subsequent to the use of
32. deal would be to prevent the in use error from happening in the first place Solet srevise the NOSET code one more time Listing 4 Now before executing the SET command we cycle through names AA AB and so on and use SVC 82 GTDCB to find a name which is not assigned yet to any device We could just as well start with PA or VA or whichever initial letter seems Ae Tat tatata Ta toT Tat esa ONERE ENR O E S naat a AOR EEA Tan Somes RR fe eae dace eR RRR NK HEN R RR crete ate suitable for mnemonic purposes But what if we run up to Z and still find no free name Give mea break If you managed to have 26 devices in the system all starting with the same letter you deserve the trouble Ina full blown filtomat for public distri bution we d have a few other embellish ments making sure that the same filter is not installed twice high memory test copyrightnotice and such But otherwise that s all there is to the basic scheme of self installing filters invented under the practical pressure tosupply customers with simpler software RADIO SHACK TANDY OWNERS Find the computer equipment that TANDY HARD DRIVES FOR SALE Genuine Radio Shack Drive Boxes with Controller Power Supply and Cables Formatted for TRS 6 3 installation JCLin T cluded Hardware write protect op erational Docu mentation and new copy of MISOSYS RSHARD5 6 included 90 day warranty f 5 Meg 175 10 Meg 2
33. editor has commands to print the entire text buffer or the contents of the first block encountered Obtain directories from TED too Have extended memory known to the DOS The SPOOL command now permits the BANK parameter entry to range from 0 30 instead of 0 7 Alter the logical record ofa file with RESET filespec LRL n Specify RESET filespec DATE OFF to restore a file s directory entry to the old style dating of pre 6 3 release Specify RESET filespec DATE ON to es tablish a file s directory date as that of the current system date and time K i K i i Ye SYSTEM command supports removable and reus able BLINK ALIVE and UPDATE memory modules Double density BOOT support for Model I with embedded SOLE and FORMAT SYSTEM Supports mirror image backup too Reworked FDUBL driver eliminates PDUBLand RDUBLand takes less memory enhanced resident driver eliminates TWOSIDE Model III version auto detects Model 4 for installation of KI4 keyboard driver supports CAPS CTRL and function keys SPOOL command offers Pause Resume and Clear parameters OFF attempts to reclaim memory used te te X ETEO AAA CO w ana a A a a a A A A A E A arene tee eee A O a ae aa a o ae es ae oes a Pine 5 Perata at ish x Ses A kanena w LOEB SOG ott a EA AARRE l is Pes X ah EA ARAARA i o ote o sa Aeran L AAOS AEA OEE a AO NOES Ra Ka wate MHS a
34. enclosed by the braces isnot followed by a semicolon even though the enclosed statements are treated as one If the else was in actuality to be paired with the first if then the can be used to force the proper association as follows The need for blocks or compound state if a 2 ments will be seen as the C logic control and flow vocabulary words are explained if c 2 Shall we begin as K amp R does with the if 2 statement else The general format syntax of theif state 4 ment is The else is thus paired with the firstif The second if is contained in a block and is the statement_1 referenced in the general format of the if statement Of some note also is the placement or style of placing the braces and their alignment in the above if else statement Each C program mer develops a way of placing and or aligning if else else if and the braces Consider the following two examples if expression statement_1 else statement 2 You will note the importance of differen tiating between a statement andanexpres sion The if else statement is used to make decisions The expression is evalu ated If it is true i e has a non zero value then statement_ is executed The else is optional Ifitis present and the expression EXAMPLE 1 if expression state is false i e has a zero value then state ment ment_2 is executed Since the else is op else if expression tional and can b
35. establish and maintain your own series of multipole choice questions on any subject Five support programs are provided to create extend edit print and maintain the question amp answer files All features are easy to use and easy to operate TRS 80 Software and Hardware from MISOSYS Text Editor LED A full screen text editor for almost any type of ASCII file including ASCII program source code for BASIC programs TBA source as weil as JOL and KSM files The command menu may be displayed while editing text This display includes all command keys the filename the cursor column the character hex value and the available memory Cursor positioning uses the arrow keys lt CLEAR gt key combina tlons move the cursor to the top bottom left or right Has the following modes overtype insert insert line and delete Block mode allows the manipulation of large text areas Search and SearchyReplace are also provided Hex mode allows characters to be input as two hexadecimal digits makes possible the direct editing of graphics Action Game The Gobbling Box This fast paced action arcade type game runs on the TRS 80 Model Ilt and 4 4P 4D The game generates a variety of special sound effects and music which complement the action on the screen The arrow keys or Alpha Products joy stick contro the movements of the GOBBLER in this game You want your GOBBLER to eat as many dots as possible while trying to avoid
36. interactive multiplayer system took a still image pasted it onto the visible faces ofacube then rotated the cube It thenmadethecube transparent so that the still image could be seen on all six faces as the cube rotated It then bounced the rotating cube around the screen dis torting it to make it appear to be a graph ics laden block of Jell O They also took a live feed from a camcorder then manipulated 15 frames per second video squeezing twisting peeling and stretch ing multiple representations of a 3DO employee s face Next the machine pre sented an image of a revolving globe made of 120 facets and sent it bouncing around inside a three dimensional room as this was going on it orbited a graphic representation of a light bulb around the globe rendering the appropriate shading in real time The architecture capable of performing such feats at consumer prices is an indication of what is to come The core of the system is a pair of animation cel engines working in paral lel each a complex graphics pipeline capable of 3 D transformation shading and lighting transparency control and texture mapping The engines can ma nipulate a theoretical peak of 64 million pixels a second according to 3DO presi dent and CEO Trip Hawkins Lining up behind 3DO are many of the world s largest electronics and entertain ment companies including AT amp T Panasonic Time Wamer MCA and Elec tronic Arts
37. is incremented or decremented These op erators do not necessarily mean to add one or subtract one from the operand The increment or decrement value is based upon the storage TYPE of the operand a This is the unary minus operator It re verses the sign of a After a since a was declared to be 10 the result is now a 10 There is no unary operator myfunc double c The variable c was defined as an integer above If the function myfunc needs to be passed a double precision floating point variable c can be coerced into that type This construct of forcing a variable into another type is called a cast In this ex ample c is cast into type double char name Earl C Terwilliger Jr char ptr ptr amp name 0 The amp operator obtains the address of an object The amp operator applies only to variables and array elements The operator precedes an operand containing an address This address is then used to fetch the data stored there A lot more will be said about these operators when point ers and arrays are discussed in greater detail sizeof a This operator returns the size of any ob ject The value returned is determined by the number of units Contained in the ob ject Each unit or byte has the same relative size as type char Operators d a b d a b a b c aqd a b d a b The and operators perform the a
38. issue is no differ ent Western Digital s new Caviar driveis claimed to be the first to market to pack 212 5 megabytes into each platter of a 2 platter 3 5 sub 13ms seek time drive That s 425 MB for an OEM single unit price of 700 Meanwhile 42 6 MB are being stored per platter on a2 platter 85 3MB 1 8 driveby Aura Associates The drive destined for lap tops withstands an operating shock of 10g Integral Peripherals who introduced the world s first 1 8 drive well over a year ago is up to 85MB in their Cobra model which incidentally withstands an operat ing shock of 100g At 475 in small quan tities the drive may prove attractive for PCMCIA compatible peripherals don t ask about the mnemonic it has to get changed so it can be pronounced Stepping up in size Toshibais sampling a 2 5 drive with a capacity of 340 mega bytes at 12ms average seek and an PCAT or SCSI interface TMQ s columns are a hair less than 2 5 inches from hairline to hairline If you want to store gigabytes Micropolis hasa5 25 full height8 platter drive which stores 3 6 gigabytes That company rings nostalgic for me my first floppy drive pack was made by Micropolis It con sisted of two 35 track one sided floppies in a beautiful blue case I haven t used it in years but it was so pretty that it may never be discarded Two gigabytes are also availablein a 3 5 drive from Hewlett Packard Blue lasers jump out again in the
39. news see TMQ VILI page4 IBM looking for ways to stem the tide of red ink is now prototyping ahigh density optical storage device using a new blue laser capable of producing 50 mW of 428 nm blue light Since the diameter of the blue light is capable of being focused to one half the diameter of previously used infrared light storage density should quadruple Coher ent Inc has licensed the technology hop ing to produce a commercial product in about a year High cost optical drives also appear in pleasant packages Ricoh Corp has re cently released arecordable compactdisk CD R in lieu of CD ROM Atan average access of 500ms and 150 kilobytes sec ond data transfer its no speed demon But disksrecorded on it can be played back on standard CD ROMs For those who need the capability its yours for a little over 4 000 The Blurb The Blurb Volume VILii THE MISOSYS QUARTERLY spring 1993 Volume VIL i pS A A Now foran environmental pickup Toshiba Corp has developed a highly efficient non polluting method of turning plastics into fuel oil One industry observer in Japan said Turning mixed chloride based products into oil is the modern equivalent of turning lead into gold Itis estimated that Japan currently generates 5 6 million tons of plastic wastes a year approximately 86 of thermoplastic suit able for the process With the process claimed to turn 1 kilogram of plastics into one liter of gasol
40. or bad connnections Remeber I told you to double check your work as you go 14 Use an LDOS MS DOS or TRSDOS system disk in the bottom drive andreboot yourcomputer using the RESET button If it doesn t boot see step 13 ee Discontinued Products Fm AM Well Roy I am sad but I know you have been very faithful to those of us that are genuine die hards Thank you for all and I do mean ALL your contin ued fine support for the TRS 80 s I hope you will at least continue to fill orders for the older I II products as long as you have stock available When you released the LDOS 5 3 1 for the Model I you truly thrilled my heart and I know you revived the interest of at least a few in the original Radio Shack jewel that started all this frenzy Know that you will not be forgot ten and as long as I draw breath I will sull be tapping out RSOLTOFF to gain access to some file Although I have never met you in person I feel that I know you Happy New Year to you and yours Will you continue to publish TMQ Fm MISOSYS Inc TMQ will continue through issue VII iv 7 4 for those who don t speak Roman The products listed in TMQ VILias closeout will be even tually removed from market by late spring even if any manuals remain I have to stop bothering with this TRS 80 market as small as it is and get a life i e job to make some money Many of the products
41. process Use your diagrams and wiring tabs to make sure that all screws and wires are properly replaced Check your work Have a cup of coffee or a soft drink and recheck your workagain Don t forget the sound board Remember all the grounding tabs 10 Connect the FDC cable to the FDC board Pin 1 on the FDC board is on the left looking from the rear Pin 1 on the cable is marked as the colored wire on one _ edge of the ribbon cable 11 Put the shield back on the rear of the CPU board Use the floppy drive manual to set the jumpers on the floppy drives properly Jumper settings may vary ac cording to whether your floppy cable has a twist in a few conductors between the connectors or not Jumper settings are identical to those for an IBM PC clone Install the disk chimney and mount the floppy drives Break out the dummy floppy drive covers from the comuputer top being careful not to harm the paint case or monitor tube Connect the power supply cables to the floppy drives Con nect the FDC ribbon cable to the back of the floppy drives Attach all mu metal shields to the disk chimney 12 Finish assembly of your computer by your diagrams and recheck your work Be sure and replace the little black metal screw in the back 13 Boot your computer without a floppy It should boot to ROM BASIC as before Check out your computer to make sure that it works as before If not disassemble and redo any missed connectors
42. solder during the wave soldering of the boards I wanted my 4P to be able to continue the availability of the external edgecard port so I decided to populate the header holes with a header pin strip This is useful to allow you to add some other non compet ing external device needing the port I use the term non competing from the stand point of the CPU ports used by the device My host adaptor uses the same ports for the hard drive as does the Tandy hard drive thus both could not be connected at the same time unless one wasn t electrically seen Using an internally added header for the connection gave me the opportunity to connect for mstance a different hard drive Radio Shack to the machine with Out having to switch cables simply by disabling the internal host adaptor with a switch Besides trying to plug in an edgecard connector to the external port from a cable snaking from inside the ma chine is rather clumsy On the other hand unless you have access to a vacuum de soldering machine you will not be able to remove the solder from the through holes to enable the addition of a header pin strip But if you do have access to such a tool I would recommend that you add the strip Installing the hard drive Physically mounting the hard drive is relatively easy ittakesno more effort than changing out the floppy With the 3 5 ST157N drive mounted in a 5 25 half height housing the drive mounts verti cally just li
43. the Model I with LDOS 5 3 1 Apparantly there is some call within KI DVR that is simply bypassing the designed function Would you please look at this Fm MISOSYS Inc Okay guys you made your point Itinvolves achange made with the release of the 5 3 1 KI DVR There was a short piece of code which was conditionalized FALSE for the Model ITI version but TRUE for the Model I version I have re assembled KI DVR and have it available on the Disk Notes accompany ing this issue of The MISOSYS Quarterly I llalso make it available for download on CompuServe By the way it s not easily patched a eT SAID and LDOS 5 3 1 ee Ta Fm DJK Richmond VA For some time Ihave been using my SAID program with its built in keyboard driver on my Model Il The documentation suggests that I Should be able to use KI DVR that is bundled with LDOS 5 3 but everytime I install SAID and by pass the built in driver Igeta Can t find KI D VR message even though the driver is loaded and active at least as far as I can tell Ihave attached a short Job Log printout to demonstrate the problem My SAID program came bundled with my EDAS program Version 4 3 a Serial 821280 The documentation update his tory notes that the disk program was up graded to SAID 1 1 on 2 10 86 and patch SAIDINS1 FIX was applied to S AIDINS CMD on 4 17 85 No other patches or upgrades pertaining to SAID are men tioned in the README TXT file I would real
44. the ZONKERS who won t stop chasing your GOBBLER until one of them eats it or until the GOBBLER eats ail dots on the GameBox The GOBBLER s reward is a new Box there s 3 in all The GOBBLER can tame the ZONKERS fora short while by eating one of the ENERGIZERS on the board Then it s the GOBBLER s tum to chase catch and eat the ZONKERS The game has two skill levels the pace is fast the sound is great the action is continuous You can t beat this bargain of a gama Even Stacey piays it Adventure type Game Lalr of the Dragon if you thought the TRS 80 was dead think again Our Lair of the Dragon MegAdventure is untike virtually any other interactive fiction adventure that you have ever played lor it will more than just paint its pictures upon the canvas of your imagination it will slap the sweat right onto your forehead if you truly believe that discovery is one of the finest points in life if you would like to test your ability to think logically to the fullest extent of your ability if you would like to take on the largest Adventure ever writen in the genre oHataractV fiction andit you have the guts to taca that which would make any other mortal eit cringe in fea then Lair of the Dragon is your cup of poison for reward is a hard eamed commodity here not given easily to the timid and the faint hearted If you ara an old hand at adventuring then be pre pared for a worthy opponent MagAdventure rips the door to a
45. the bottom of the shield this tape is to be re used on reassembly 5 Mark and remove the cables to the CPU board power supply video keyboard cassette RS 232 sound board Remove the 8 screws holding the CPU board 3 at the top and bottom and one at each side Remove the CPU board gently Use needle nose pliers to compress any nylon retainers which hold the CPU board 6 Install an RS 232 board if your com puter doesn t have one Get it from Roy Don t put your computer back together without an RS 232 board It s cheap and you have to remove even the FDC board to install it _ 7 Install the FDC board using 6 x 1 4 screws and plastic spacer mounts Attach an unused power supply connector to J3 Press the flat 20 conductor mylar flex cable gently into J2 making sure that itis aligned and all connections are made Use TV tuner cleaner on the cable to ease the installationandensure good connnections Bend the cable so that it will go over the top of the CPU board 8 Replace the CPU board Carefully _ reversing the rest of the instructions Use press the mylar flex cable into J7 which will be near the upper left corner of the PC board looking from the rear of the com puter which is the component side of the board J8 near the top and to the right of center is for the RS 232 board Pin Lison the left side of both J7 and J8 9 Finish installation of the CPU board by reversing the disassembly
46. the environment strings via the getenv and putenv Q functions These functions make use of other lower level functions all of which are bundled together in a library file ENVx REL One of the changesintroduced into MCx ASM forces the linker to search this library ifthe ENVIRON option is enabled Finally take a look at the sample TESTENV CCC program which illus trates the access of the environment once it has been created by INITENV Environment Files The following files associated with the MC environment support are included on Disk NOTES 7 2 CLEARENV ASM CLEARNVS5 CMD CLEARNV6 CMD A DOS level command to clear all envi ronment strings ENV DEF Definitions needed tore compile assemble the environment library ENV H Header file to be included with C pro grams which use the environment table ENV5 REL ENV6 REL DOS 5 and DOS 6 environment function libraries FENVTAB ASM An internal C function referenced in the environment functions GETENV ASM An internal C function referenced in the environment functions INITENV ASM INITENV5 CMD INITENV6 CMD ADOS level command to set initialize the environment block M805 H M806 H Standard MC include file for M80 with modifications for the environment MC5 ASM MC6 ASM Standard MC include file for MRAS with modifications for the environment rte a E EE NV _ Inside TMQ 42 Inside TMQ olume VILii THE MISOSYS QUAR
47. the expressions could be mul tiple expressions separated by commas For example for i 0 j 0 Sf i if s i a Whether you use the while or the for statement is just a matter of choice Typi cally the for is used for simple initializa tion and re initialization It is analogous to the FORTRAN DO loopor BASIC for next statements _ S for The syntax of the do while is do statement while expression The difference between the do while and while is a subtle one With the do while the statement is always executed at least once The expression is evaluated at the bottom of the loop instead of at the top Remember the break statement from the switch It can also be used in the for while or do while to exit Another statement the continue statement is related to break It does not exit from a for while or do while statement but causes the next iteration of the enclosing loop to happen An illustra tion for you to ponder for 1 0 3 0 s i i if s i a continue Skip this character if s i n break Exit for if new line j In the above for statement the only ways for it to end are if s i equals 0 or the newline character Note that the relational expressionis s i 0 butitcanbe and is shortened in this example to s i That sbecause any zero value is interpreted as FALSE and any non zero value is interpreted as TRUE goo
48. totaled A simple insertion sort could be used to keep the various data entries of a field or a btree could be used Perhaps some budding programmercould whip together such a tool before I have a chance to I m tied up with a big develop ment effort right now As far as selecting records which have no value that is an easy one Let s consider a literal field first Since an L field can _contain any ASCII value that represents a range of from 20H a space through 7FH Therefore if you select on the field with a match string of and a select criteria of LT that will pull inany record that does not have a non space character For alphabetic fields use a select string of A Numeric fields allow digits 0 9 minus signs and periods Since the minus sign is the lowest valued ASCII charac ter the match string would be Another thing you could do is to turn on the ADD index when you are adding records You can then go back to those specific records by using the ADD index during an editing session As far as Tandy s CP M 3 which they sold for the Model 4 it was always rated by users as just about worthless Your better bet is toobtain acopy of Montezuma Micro CP M 2 2 which should still be available from Computer News 80 in Casper WY LBCONV Revision MS DOS version Fm MISOSYS Inc I had one LB86 user who converted from a Profile 4 database which used about 80 fields Since
49. with user definable print screen definitions Or use LB s define print autogen module to automatically create Table or Form reports or over a dozen different address label configurations including a Rolodex card and a 3 by 5 index card LB is just what you need in a data manager We even have many database templates available for download on our Compuserve forum Data capacity per database LB supports up to 65 534 records per data base 1 024 characters 64 fields per record and up to 254 characters per field Field types supported LB allows ten field types for flexibility alphabetic A Z a z calculated operations on numeric fields using with 2 level of parentheses date last modified YYY Y MM DD auto matically maintained dollar dddddddd dd floating point tdddddddd dddddddd literal any ASCH character numeric 0 9 right justified numeric upper case alphabetic A Z automatic conversion of a z and upper case literal literal with automatic conversion of a z All field types utilize input editing verification so invalid data cannot be added toarecord Field name strings can be up to 19 characters long i Data entry and editing LB allows you to design up to ten different add update view screens to provide extreme flexibility for selectively viewing your database fields You can customize the appearance of any view screen by a simple drawing process or use LB s built in autogen
50. you want to reach us by fax try 703 450 4213 Closeouts MISOSYS continues the closeout of most of our TRS 80 software products The closeout products listed in this pricelist will no longer be available from MISOSYS after June 15th 1993 Note that no warran ties returns or support are offered on these items Hardware Clearance Over the years MISOSYS has accumu lated TRS 80 hardware and related equip ment in excess of current needs The following items are now classified as sur plus and are available for sale to the first takers shipping charges are additional Tandy color 2000 e w stand 150 Tandy 1000 amp mono monitor 125 TRS 80 Model III working 35 TRS 80 Model IIT working Tandy DT 1 Data Terminal 25 25 1061 3 5 External floppy for Tandy 1000EX new 50 Amdek Video 300 Monitor 40 BMC Monitor for MAX or M1 25 12 Meg Secondary bad drive 50 DW II Daisywheel 26 1158 50 Line Printer III no printhead 25 Radio Shack Modem II 15 DW II Tractor Feed 26 1446 10 _ 35_ Used Software or O The following items of used software packages are available for purchase These are items accepted as trade ins or other wise accumulated e Radio Shack C 26 2230 15 e pfsFILE Model 426 1518 15 pfsFILE Model 3 26 1515 15 Series I EDTASM F I 26 2013310 Radio Shack ALDS 26 2012 15 Profile 3 26 1592 15 Compiler BASIC IIT 26 2204 15 ZEN EDTASM 5 Quikpro _ 5 ZBASIC 2 21 5
51. 0 watter is an 7 x9 card If you have the large power supply butnoconnectors you may need cables Check when the top is off but before you remove the CPU If you need power supply parts put the Computer back together until you have what you need to complete the job 1 Place the computer on its rear panel using a towell to prevent scratching the case Remove cables from the bottom and rear of the computer Remove 10 screws from the bottom making a diagram of where the go by type and length Letters to MISOSYS a bo ae Letters to MISOSYS Volume Viii THE MISOSYS QUARTERLY spring 1993 Volume VILii 2 Place the computer back on its feet and remove the black screw from the rear of the compuer This screw a prevents the motherboard from breaking the monitor tube socketif the computer is dropped and b provides a ground connection Don t lose it and put it back when you are through 3 Very carefully remove the top with monitor tube by lifting slowly straight up and setting it aside to the left on a towell The cable to the video board is short and requires that the top be laid down just to the left of the comuter Find the plug note its connection and unplug it Set the top aside 4 The motherboard FDC board and RS 232 board are inside the vertical shielded box at the rear of the computer Remove the 6 screws which attach the cover shield to the rear of this box Carefully peel away the tape at
52. 25 15 Meg 275 35 Meg 445 Shipping cost add to all prices Roy T Beck 2153 Cedarhurst Dr Los Angeles CA 90027 213 664 5059 Inside TMQ 26 no longer sells PACIFIC COMPUTER EXCHANGE buys and sells used TANDY TRSDOS XENIX MSDOS COMPUTERS amp PERIPHERALS We sell everything from Model 3 s and 4 s to Tandy 6000 s 1000 s to 5000 s Laptops and all the printers and hard disks to go with them if we don t have it in stock we will do our best to find it for you We have the largest data base of used Radio Shack equipment to draw from All equipment comes with warranty PACIFIC COMPUTER EXCHANGE The One Source For Used Tandy Computers 1031 S E Mill Suite B Portland Oregon 97214 503 236 2949 Inside TMQ Volume VIl ii THE MISOSYS QUARTERLY spring 1993 Volume VIL ii Nf ahd il i The Pleas was originally written by Earl C Terwilliger Jr and published as a 6 part series in The LDOS Quarterly and subsequently the LSI Journal It has been re edited and brought up to date by Roy Soltofffor publicationin The MISOSYS Quarterly A brief history of C C wasdeveloped by Brian W Kernighan and Dennis M Ritchie of BELL LABO RATORIES THE C PROGRAMMING LANGUAGE authored by Kernighan and Ritchieis the ultimate reference document for the C language A wide range of computers now have C compilers TRS80 IBM PC PDP11 IBM 370 s etc C
53. 4898 Remember the Randy Cook copyright messageaccessiblein Modell sTRSDOS 1 by holding down certain keys during booting Well according to ShadowRAM s column in Computer Reseller News the developer s list of COCO eo OOOO e 0 0 408 O ate AAEN se Enean aa Soha Ses anme ann tyeaees eroso a aaron aR en e names for Microsoft s Access can be ob tained by the following weird procedure Create an Access table save it as Cirrus Select Help About hold down the control shift put the cursor on the key icon and click the right mouse button twice You ll see ducks sitting on a pond The idyll is shattered when two lightening bolts anni hilate the ducks Paradox get it Then you get the developers With the downturn in the world military market many defense industrials are be ing forced torapidly migrate to consumer products Programmers who seem to sur vive on Jolt cola and pizza may soon be able to get that pizza as quick asa Pentium processor Texas Instruments Inc s De fense Systems amp Electronics Group have been hard at work trying to perfect an oven that will cook restaurant quality pizza in about a minute The ovens were designed byTurbo Chef president Philip R McKee who said Forging into areas that previ ously were not considered high tech or defense oriented will become increas ingly necessary as this country attempts to reap the peace dividend and pull in the reins
54. 5 00 25 00 B TRS 80 Game Programs items on Closeout NO RETURN Cornsoft Group Game Disk Bouncezolds Crazy Painter Frogger Scarfman Space Castle M3 M 55 GCA Kim Watt s Hits M3 Lair of the Dragon M3 M4 Lance Mikius Hits M3 Leo Cristopherson s M3 The Gobbling Box M3 M4 P 55 GKW M 55 021 P 55 GLM P 55 GLC M 55 020 MSDOS Game Programs Lair of the Dragon M 86 021 20 00 10 00 10 00 15 00 10 00 10 00 10 00 Hardware indicates Closeout NO RETURN Power Supply 40WT Astec AC8151 Power Supply 68WT Astec AA12310 Floppy Disk Controller M3 M4 Double Density Controller DDC M1 RS232 Serial Card M3 M4 RS232 Serial Card Kit M3 M4 TeieTrends TT512P modem M4P Floppy drives 5 25 360K 1 2 ht Floppy drives 3 5 720K 1 2 ht Floppy Drive Case 2 1 2 ht drives MSCS HD 20Meg M3 M4 MSCSI HD 40Meg M3 M4 MSCS Hard Drive joystick port option H PS AdO H PS A68 H MM FDC H MM DDC H MM SPC H MM SPK H 4P 512 H FD 360 H FD 720 H FD 2SV H HD 020 H HD 040 H HD JSO MSCSI Hard Drive hardware clock option H HD RTC Aerocomp HD 20 Meg M3 M4 Aerocomp HD 40 Meg M3 M4 Hard drive Seagate ST225 20M Hard drive Seagate ST251 1 40M Hard drive Seagate ST 351AX IDE Cabie dual floppy extender Cable 4Ft floppy 1 34EDC each end Cable 4Ft M3 M4 printer Cabie 4Ft Radio Shack hard drive _Cabie 4Ft MiSOSYS hard drive Cabie 26 1069 internal flopp
55. ARD Both con struct the DIR SYS entry in a similar manner Okay so how could Goben come up with this statement One way couldbeifhehas written a hard disk formatter which does not properly construct the directory entry for DIR SYS Another way could be if he has done something which corrupted the DIR SYS entry In the past I have heard of folks corrupting the DIR SYS entry by Opening it up as a file then writing to it using standard DOS file access service calis Such methods are neither docu mented nor proper Finally I would offer this suggestion if someone believes they have a problem with one of my products the most sensible thing to do wouldbe toreport the problem Publishing what may turn out to be erro neous statements in CN80 about someone elses product without any prior notice or report just shows the lack of respect some folks stoop to Product Queries Fm RLH Albion NY I was just reread ing the March 1988 CN80 where they said that you were getting out of the TR8 80 market I know that you had to get into MSDOS to continue eating but I m very that you didn t completely aban don us I m using MSDOS 2 11 3 3 amp 4 0 I like some of the MSDOS software but the DOS still hasn t caught upto LDOS which we have had for more than a decade At least once a week I am reminded of an LDOS feature that I took for granted when it is impossible or difficult to do with MSDOS I just bought LDOS 5 3
56. ARTERLY spring 1993 Volume VILii Operators The C language is very rich in its capabili ties of data manipulation Operators per form this data manipulation In the C language Operators are usually grouped intocategories These categories or types are shown in the operator chart Operators specify what is to be done to variables and constants Operators when combined with variables and constants are called expressions When an expres sion is followed by a semicolon itbecomes a statement In the next article we will see more On expressions statements and the logic control and flow in the C language Before I go on I would like to clarify a few things you will encounter in the C pro gramming language in dealing with ex pressions and operators Basically these pointsinvolve theconceptsoflvalue rvalue side effects and type conversions An lvalue left hand value is an expres sion which references storage in the com puter In C an object is a manipulatable area of storage An lvalue is an expression which refers to that object An I value is the only value which can be on the left side of an assignment statement An lvalue or an rvalue can be found on the right side of an assignment statement An expression which is not an lvalue is sometimes called an rvalue An rvalue doesn t refer to an object area of storage An example Consider the following C statements int c c 0 ForZ80 based machin
57. And for those 3D fans out there who are tired of the red green glasses Electronic Buyers News reports that Reveo Inc has a technology for recording 3D color im age data in one image called a spatially multiplexed image SMI The technol ogy is known as multi mode stereoscopic imaging MMSJ andit produces 3 color images using only one display device such as a projector a video monitor or even a printer The user demultiplexes the image using passive glasses Underlying MMSI is a device called a micropolarizer POL invented by Dr Sadeg Faris Reveo s founder The pPOL is a polymer sheet with an orthogonally polarized checkerboard pattern The pPOL placed _over the CCD charge coupled device imaging array in a camera for example modulates the pixel image the camera is seeing into left and right pixels the cam era has circuitry that does the modulation into left and right images Multiplexing circuitry then combines the modulated images into one the SMI The displayed full color image can be viewed in 3 D using a pair of passive glasses equipped with a pPOL or directly when a pPOL is laminated over a printed image Reveo has built a 7 pound flat panel overhead viewing screen priced at 7 995 that can display 260 000 colors competing de vices cost upwards of 30 000 My points to Ponder column seems to always have something to say about hard disk drives That s because drive technol ogy is zipping by This
58. B provides extensive on line help available from almost every sub command A200 page User Manual documents every facet of LB s operation MISOSYS Inc PO Box 239 Sterling VA 20167 0239 703 450 4181 or orders to 800 MISOSYS TRSCROSS Pronounced TRISS CROSS TRSCROSS runs on your PC or compatible yet reads your TRS 80 diskettes Copy files in either direction The FASTEST and EASIEST file transfer and conversion program for moving files off the TRS 80 and over to MS DOS or PC DOS or back TRSCROSS Copyright 1986 1987 by MISOSYS Inc All rights reserved 1 Copy from TRS 80 diskette 2 Copy to TRS 80 diskette 3 Format TRS 80 diskette 4 Purge TRS 80 diskette 5 Display directory PC or TRS 80 6 Exit Shown above is the Main Menu displayed when running TRSCROSS on your PC or compatible TRSCROSS is as easy to use as it looks to be The program is very straight forward well thought out and simple to operate TRSCROSS has several help features built into the program to keep operation as easy as possible Just pop your TRS 80 disk into your PC and copy the files right to your PC data disk or hard disk t couldn t be any faster or easier All steps are detailed in TRSCROSS will READ FROM and COPY to the following TRS 80 double density formats TRSDOS 1 2 1 3 TRSDOS 6 2 LDOS 5 3 DOSPLUS NEWDOS 80 amp MultiDOS the instruction manual Advanced features for those t
59. E would need to be converted to ASCII on off your TRS 80 disk and performs theconversion all in ONE pass a TRS 80 first before they would be of use on a PC or compatible while being transferred directly to your PC or compatible com puter Automatically converts most BASIC syntax and lines If you use both types of computers or you plan toretire your TRS 80 this is for you TRSCROSS will allow access to your TRS 80 that need special attention can be listed to a printer Does not dikenes for s years to come Copy your TRS 80 word processor sae ie aes POKEs graphics machine language calls or sub data files as well as your Visicalc data files over to MS DOS and continue using them with your new application TRSCAOSS willeven FORMAT a TRS 80 disk right on your PC Handy for those who use both machines Only 89 95 Former TRS 80 users who no longer have their TRS 80 but still have diskettes with valuable data this is exactly what you ve been waiting for Plus 4 S amp H U S or 5 Canada or 6 Foreign Virginia Residents must add appropriate sales tax Sere Bhd LAAEN s Ea REAREN A L A RR EAN IW ay connected to your TRS 80 Model ITI ayy tty AE ere i seat SUL oa ae i 14 we Rane TR ts mt A or auh PS 9 ry SA bhd E 4 a x oN A your computer will sail through data access Liig MISOSYS has been shipping complete drive kit packages since September 1989 which plug into Mo
60. ECK performs an integrity check of your disk s directory and repairs certain kinds of errors FIXGAT re constructs a corrupted Granule Allocation Table IOMON traps disk input errors MAPPER checks the granulization of files RAMTEST performs an exhaustive test of RAM and UNREMOVE restores a deleted file System Enhancement GO SYS The GO SYS program collection is designed to provide additional features to LS DOS 6 3 operation DOCONFIG manipulates CONFIG SYS files DOEDIT provides command editing MEMDIR gets a memory directory PaDS provides Partitioned Data Sats PARMDIR obtains parameterized directory information for iist ings and JCL processing WC for wild card command invocation and ZSHELL for command fine VO redirection piping and multiple commands on a line More Model 4 Utilities GO CMD The GO CMD program collection provides additional utility tor your computer operation FASTBACK and FASTREAD for hard disklarge file archive restore PRO CESS manipulates command files COMP compares two files or disks FED2 zaps disk or file sectors on a full screen basis IFC to interactively copy move rename delete and invoke files ZCAT catalogs 6 3 disks 48 TRS 80 Mod I amp II GAMES Leo s Greatest Hits Animated Game Disk with sound This is one of the greatest values in games ever produced Leo Christopherson wrote the very first animated game for the TRS 80 and the country went wild for t Andr
61. EE space map immediately after formatting a hard drive so that you are aware of any bad granules 2 Next if you have a problem and use DIRCHECK to attempt repair you know the state of granules allocated because of defects 3 Lastly you should run HOCHECK LOCK after using DIRCHECK if granules allocated for defects were de allocated HDCHECK is provided with some of our hard disk driver packages Now with the diskDISK subdirectory fa cility available for 10 why would any one need someone else s DiskDISK has been available since 1983 that s a good 10 years and BACKUP has never had a problem with DiskDISK ssub disks Per haps Goben needs to make sure that he writes software which works correctly with the DOS Or when he comes upon a problem he could report it I find it a difficult job to fix problems which remain un reported Finally concerning Beck s BBS post MISOSYS isclosing out most of its TRS 80 software This was announced in the TMQ VIL iissue You re asubscriber The issue was mailed in early January Had you not received it by the time of your letter February 9 There will be no fur ther support of software being closed out One can only speculate on other items If we continue to stay in business you have a source if we close down it is no differ ent than thousands of other business es tablishments which have closed down Fm HAB Jacksonville FL First I want to say that al
62. ISOSYS 17 Letters to MISOSYS Volume VI u THE MISOSYS QUARTERLY spring 1993 Volume VILii tremely difficult for the manual to impart much help to me in setting up a data base I have tried to set up an experimental file using data from two amateur radio clubs for which I also maintain mailing lists I have managed to set up passable field definitions screen definitions and print definitions Print outs of some of the are enclosed I am stuck however at select ing and sorting The single letter identification of the two clubs are A and H There is much overlapping of their membership I in tended to use Field No 1 STATUS to be able to select the names and addresses for either A or H A and H combined and to add to either or both groups former members F and prospective members P The resulting grouping needs to be _ sorted in ascending ZIP order Field 10 Can you suggest how this can be done Recently I received from you an offer to obtain the latest 2 3 versionof LB ata60 savings Can I assume that the new manual iseven just a little bit easier to understand by one who doesn t know all about the subject than the original one I have no need for calculated fields I just want to maintain simple mailing lists from which I can include or exclude certain groups of names If you are willing to ship it to me with the conditions that I may return it for a
63. Includes sottware for one DOS installed Modal lll or 4 and 4 foot host cable Floppy Drives and Parts 20 Meg drive kit ST225 complete 40 Meg drive kit ST251 1 completa 5 25 360K 1 2 haight 3 5 720K in 5 25 frame 2SV5 drive f case amp P S Single drive cable Dual floppy extender cabie Aerocomp Hard Drives Our Modei 2SV5 dual vertical external floppy disk drive case will hold two 5 25 half height disk drives needed for one or two Genuine FCC cartified EZUSPL3000 Aerocomp drives are now drives needed for two drives available from MISOSYS These are new and complete units ready to run The external hard drives are FCC Class 8 certified They include continuous duty switching power suppiies filtered forced air ventilation effective EMI filtration and solid stee construction Five front panel lights indicate power ready read write and select Drivers available for Montezuma Micro CP M LDOS or LS DOS Comes compiete with 4 foot host cable Computer Power Supplies Astec AC8151 01 40 watt supply Aerocomp 5 Meg drive Hard drive Agrocomp 20 Meg drive Hard drive Aerocomp 40 Meg drive Hard drive Provides 5V 2 5A 12V 2 0A and 12V 0 1A Size is 6 25 x4 x1 75 mounting holes are 3 125 4 75 Component Piece Parts Astec AC12310 68 watt supply Seagate T225 5 25 20M drive 65ms Provides 5V 7 3A 12V 25A and 12V 0O 1A Size is Seagate ST251 1 5 25 40M driv
64. Level I BASIC Instruction Course 5 Sargon II cassette 5 Interlude Model I 5 Gambiet 80 mod I tape 5 Macro Mon Model MI disk 10 Personal Finance 26 1602 10 Blackjack Backgammon mint 5 Microchess 1 5 26 1901 5 eee eal Binders a Ihaveonecarton of MISOSYS 8 5 3 ring binders these are the 1 ones we used for our small User Manuals First come first served at three for 10 5S amp H conti nental U S only Tytan The Blurb The Blurb Volume VIL ii THE MISOSYS QUARTERLY spring 1993 Volume VIL ii Letters to MISOSYS C a LDOS 5 3 1 Type Ahead Fm LE Arlington TX Roy I still have trouble with the type ahead bufferin 5 3 1 10 A S INKEYS IF A THEN 10 20 PRINT A FOR I 1 TO 5000 NEXT 30 A A 1 IF A lt 6 THEN GOTO 10 If you run this program and hit any key 5 times very quickly it should print thatkey five times The program produces the desired effect with a Model 4 and 5 3 0 It also works with the KI4 DRV and 5 3 x Fm AM Roy I am convinced that Type Ahead on LDOS 5 3 1 doesnot work Iam loosing characters when I type at anormal typing speed This does not happen using LDOS 5 3 0 with either its own KI DVR or using KI4 DVR Type ahead will work on LDOS 5 3 1 using KI4 DVR All of this is on a Model 4 running in Model IIT mode Since I discovered this Ihave been testing LDOS 5 3 1 on my Model I s and Type Ahead DOES work fineon
65. Merge P 50 100 PowerScript P 50 142 PRO WAM va PRO WAM Tooikit na QuizMaster L 51 500 RATFOR M4 Super Utility Plus P 32 132 Supreme HD Driver PowerSoft RS P 12 113 TBA LS TBA L 21 010 THE SOURCE 3 Volume Set soid out Tooibox Tooibelt P 32 203 UNREL T80 same UTILITY 1 L 32 070 na va M 40 060 LDOS LSDOS BASIC Reference Manual M 40 061 LDOS 5 3 1 Diskette M1 LDOS 5 3 1 Diskette M3 LS DOS 6 3 1 Diskette M4 EnhComp PRO EnhComp Diskette RSHARD R S HD driver SSCSI SCSI driver for H HD MHA LB Data Manager 2 3 DED 86 Disk Memory sector editor RATFOR 86 HartFORTH 86 SAID 86 Text Editor Super Utillty PC TRSCROSS transfer lt gt Mod liV 4 FM 86 File Manager Lair of the Dragon M 10 110 M 10 130 na M 20 072 M 12 013 H HD SWS H HD SWS Mod 4 va P 12 244 L 32 210 H MM 7 M 31 033 L 35 212 M 02 231 L 35 205 M 31 053 M 21 082 ra M 33 100 M 33 200 M 33 300 M 12 110 M 21 071 Wa same M 11 043 M 11 002 L 30 021 L 35 281 L 32 150 M 21 064 M 51 028 M 21 083 na na P 50 200 P 50 004 P 50 100 P 50 142 M 51 025 M 51 225 na M 21 073 P 32 104 P 12 113 L 21 011 P 32 245 M 30 054 na M 12 11X M 11 243 M 21 072 M 12 013 MSDOS Software Indicates Closeout NO RETURN M 86 51 10 M 86 020 M 86 073 M 86 071 M 86 040 P 86 407 P 86 212 L 86 050 M 86 02 1 10 00 29 95 99 00 D 30 00 D 25 00 D 15 00 15 00 15 00 23 98 1
66. Note also that using pointers rather than array subscripting usually results in more efficient code As general rules a n is equivalent to atn amp a n isequivalent to atn amp af n is equivalent to amp a 0 n is equivalent to a n Perhaps if I spelled out how to pro nounce some of the expressions used in the general rules above these rules might become more clear amp means the address Inside TMQ 39 Inside TMQ Volume VIL ii THE MISOSYS QUARTERLY spring 1993 Volume VIL ii means the data at test l myfile dat struct payroll a n means element n of array a If you compile it and try it using the above char name 30 invocation you should see the printed int age amp a n means the address of ele Try it with different argument values and char sex ment n of array a different numbers of arguments Of what int pay value is this Well actually this program amp a n means the data element at the address of element n of array a This says the same thing as element n of array a atn means element n of array a a n means element n of array a Did the above help If you have been looking at some sample C programs you may have seen by now that sometimes an array name is written as a or a when used as parameters in a func tion Rather nice don t you think The function when passed an array name can treat it as an array as a pointer
67. OCRIG WAL SA DAE Look at what is in this issue lic 4 44l c Add an internal 40MB hard drive to your 4P by Roy Soltoff w How to make a Model 4 FILTOMAT by Christopher Fara is The C Language by Earl C Terwilliger An Environment for MC and LDOS LS DOS by Richard N Deglin and Roy Soltoff B y z Volume VIL ii 10 spring19 93 CLOSEOUT PRICE LIST effective March 1 1993 XLR8er Software Interface Kit M3 mode DISK NOTES from TMQ per issue HDPACK Disk De fragger LB Data Manager M4 Ver 2 3 LDOS LSDOS Reference Manual TRS 80 Software Mod ti AFM Auto File Manager data base P 50 310 BackRest for hard drives P 12 244 BSORT BSORT4 L 32 200 _ CP M MM Hard Disk Drivers drive specific CON80Z PRO CON80Z M 30 033 diskDISK LS diskDISK L 35 211 DoubleDuty DSM51 DSM4 L 35 204 DSMBLR PRO DUCE M 30 053 EDAS PRO CREATE M 20 082 Filters Combined I amp If L 32 053 GO Maintenance nma GO System Enhancement va GO Utility va Hardware Interface Kit va HartFORTH PRO HartFORTH M 20 071 LDOS 5 3 1 Mod1 Upgrade kit M 10 133 LOOS 5 3 1 Mod3 Upgrade Kit M 10 333 LS DOS 6 3 1 Upgrade Kit M4 na LS DOS 6 3 1 Upgrade kit M2 12 16 LED LS LED L 30 020 LS Host Term n a LS UTILITY va MC PRO MC M 20 064 Mister ED na MRAS PRO MRAS M 20 083 PowerDot Epson or Tandy P 32 217 PowerDraw P 32 220 PowerDriver Plus Epson P 50 200 PowerMail Plus P 50 003 PowerMail Plus Text
68. RIP As an aside the STRIP parm of APPEND was put in specifically to append REL modules that was its exact purpose It of course could also have been used to ap pend two SCRIPSIT documents by allow ing youto strip off the NULL from the first one LOBO MAX80 HD Boot Fm BP Hello Roy I have the LOBO MAX80 hard drive working although not bootable as mentioned in my other mes sages I ll give that a fresh try shortly But I have been using much of my old MISOSYS on the LOBO including PDS and Elsie Having a bit of fun porting K amp R utilities like SORT just for the refresher in C language Letters to MISOSYS 4 0 Letters to MISOSYS Volume VIJL ii THE MISOSYS QUARTERLY spring 1993 Volume V Ilii Do you have any kind of list of software that is known to work on the LOBO Of course I refer to your own products as shown on your price list I m most inter ested in programming tools like DSMBLR My copy expects a tape Also for my Model 4P does RSHARD contain your drivers as M80HARD does I got confused after reading the literature I have a SMB TRS80 unit Fm MISOSYS Inc You re confusing me All MISOSYS Model IIT software should work on the MAX 80 except SU there is a specific MAX 80 version RSHARD is a MISOSYS product thus it contains our drivers As for the problem of direct booting from the MAX 80 hard drive it appears that the original work was not com
69. SSUGC cccccececcecsseacseseee TMQ Schedule csssessscessees MISOSYS Forum cccccccsesnese DISK NOTES 7 2 sctisehaccdccavaaetses LB Templates e ssssssssscessssesssse MS DOS Products cccccccseseees SCS LDV OF eare aa FAX Number ccccecccseeresecsoees Closeouts aunan Hardware Clearance ccccesceseees Used Software ssssssseseesssossss NXNAXAANANAAAA ma Pp PWD ND bo Letters to MISOSYS LDOS 5 3 1 Type Ahead 7 SAID and LDOS 5 3 1 ccsceneee 7 DIRCHECK amp BACKUP 8 Product Queries ccccccoscesveesenes D sscanfQ bug in MC scscceeeee 10 PRO MC dint fix esseee0 10 LOBO MAX80 HD Boot 10 Code updated seosssecseseseesese LL FDC Card Installation 11 Discontinued Products 0000 12 File conversion cccscocssssessrseeee 14 MLIB Double Duty LB 15 LBCONV Revision MS DOS VETSION nnana aar kG LB86 and extended characters 16 Converting PowerMAIL data to MS DOS amp LB 000004 17 LB Selecting amp Sorting 17 LB86 and Tandy 2000 18 Inside TMQ 4P40M A 40 Megabyte 4P 19 How to Make a Mod 4 FILTOMAT 24 THE C LANGUAGE 0000627 DOS Environments 0000 2 41 List of Advertisors MISOSYS Inc Microdex Corporation Pacific Computer Exchange Pacific Computer E
70. T drive cable set 5 Note freight charges are additional e Prices subjectto change withoutnotices Seeeeeeeeseseeeence BULK RATE U S POSTAGE PAID Sterling VA PERMIT NO 74
71. TERLY spring 1993 Volume VILii MCMACS ASM MCMACS MAC MC macro files which define the ON option PRINTENV ASM PRINTNY5 CMD PRINTNV6 CMD A DOS level command to print the envi ronment strings PUTENV CCC An internal C function referenced in the environment functions RMENV ASM RMENYV5 CMD RMENV6 CMD A DOS level command to remove the environment block SETEN CCC An internal C function referenced in the environment functions SETENV ASM SETENV5 CMD SETENV6 CMD A DOS level command to set an environ ent string TENVIRON CCC The C level program which illustrates the use of the environment UNSETEN CCC An internal C function referenced in the environment functions UNSETENV ASM UNSETNVS CMD UNSETNV6 CMD A DOS level command to remove an en vironment string Inside TMQ 43 Inside TMQ te Both Model I and Model II LDOS support similar commands DOS commands are virtually similar to Model 4 LS DOS 6 3 1 syntax where possible The DATE command Date prompt on boot and K Ses sE MEMORY displays or prints the status of switchable K AS ited lt of modules resident in ay O dryer Eo gtemnoty and high memory S RE Eea nN Sa Sane ros Saase 8 hd SE ah drive d1 for d2 Either ay y be the ayate 2 eae and a Job Control Language file may be active on either of the swapped drives The TED text
72. THE MISOSYS QUARTERLY spring 1993 Volume VIL ii interrupt for receive data If the COM driver was installed into a partition which was swapped out a received character would cause an interrupt which would be vectored to a driver handler no longer resident The computer would most likely crash If you are using a communications program which accesses the serial port directly and which uses the interrupt you can not switch that program out of its running partition Now since you are us ing COMM that implies use of the COM DVR So make sure the driver is installed before DoubleDuty is installed Your need of a capability in LB for mak ing totals of the values of a field 1s called a cross tabulation LB does not currently provide that capability But I ll consider that as an item for a future release Cross tabulation could also be done via an exter nal utility The data base structure is thor oughly documented in the Reference Manual One utility which operates on the data file was published in The MISOS YS Quarterly issue I i summer 1988 Cross tabulation could be done simply by scan ning through the data records perhaps according to an index file accumulating totals on those fields you wish to cross tabulate Obviously for each field you would need to construct a two dimen sional array one string element and one integer element of the differing field contents so the diffeent values could be grouped and
73. added by SS PSS hs eeresrnsntesaepepp Inside TMQ 37 Inside TMQ Volume VILii THE MISOSYS QUARTERLY spring 1993 Volume VI 1i the C compiler to terminate the string Did younotice that the sizeof the array i e the number within the was omitted If you do not include it C will compute the size of the array for you based on the number of initializers Another way to initialize a character array is as follows E Y 0 pi char name YAS R r L A Notice that it is so much easier to use char name EARL Are you thinking that the initialization of a character array is like a string copy If so be careful in your evaluation of the following statements static char msg 5 msg TEST This is not a string copy C does not provide any operator for string copying or dealing with an entire string of characters as a single unit Also msg is the name of an array itis a constant Itis not an lvalue and the above expression using it as such is ILLEGAL How thencanelements of an array be assigned values The answeris by individually assigning values to each ele ment To blank out a character array examine the C code which follows char message 20 for i 0 i lt 20 i message i Also note that the message array does not necessarily have to be external or static It could be an automatic array Pointers Next onward to pointers
74. all a hard drive into a 4P should perform the external floppy port modification at the same time if it has not already been done As the 4P I converted wasa gate array model the external floppy modification was exceedingly simple all it took was the installation of four jumper wires and the fabrication of thenewcables The addition of the external floppy port also provided me an Opportunity to re use the two internal 360K floppies removed to allow room for the hard drive and 3 5 720K floppy I conveniently installed the two 360K drives in one of my extemal floppy drive cases Because the 4P upgrade article detailed the procedure on opening up the 4P I will not discuss that in this article Please refer to your 4P Service Manual or the previous article When Tandy was designing the Model 4 they originally wanted to allow for a hard drive internal to the case Because of that the motherboard was fabricated with a provision fora header pin stripincommon with the 50 pin expansion port edgecard fingers If you have ever looked ata Model 4 mainboard you will observe the dual row of holes 25x2 just to Hien 2 real edgecard fing rs fhese t were de signed for the installation of aheader strip But Tandy never utilized the external port internally and consequently never in stalled the header The through holes that s the term applied to the holes going through the printed circuit board there fore become collected with
75. all archived files to your hard drive All ten modules come fully documented and ara ready to install into your LDOS 5 3 or LS DOS 6 3 system or both Hard Disk sub partitions diskDISK Do youhave ahard disk itso you need diskDISK ThadiskDISK utility allows the creation of jogical disk partitions as files on a physical disk drive This is indispensable for hard disk users Once a diskDISX file is instaifed into a logical drive slot the diskDISK can be used just like any other physical drive diskDISK provides for easy swapping of any currently active diskDISK file With diskDISK you can easily group related files for ease of maintenance DiskDISK files can also be sat Up as images of physical drives to allow mirror image backups DiskDISK drives allocate in granule sizes smaller than your hard disk system Five inch diskDISK images allocate just like floppy drives Also there ara special diskDISK types that allocate In one or two sector granules for maximum storage efficiency 47 DoubleDuty doubles your Model 4 DoubleDuty DoubleDuty published previously by Radio Shack cat 26 2231 is now available from MISOSYS DoubleDuty divides your 128K or greater TRS 80 Model 4 computers memory into three com pieta and independent partitions Two partitions each operate as if they were there own 64K Model 4 This lets you run two programs concurrently switching between either at the flick of a function key It d
76. and a pointer Actu ally an array name is a pointer expression However keep in mind that a pointer is a variable but an array name is a constant If an array name is passed as an argument to a function what is actually passed is the location address of the beginning of the array Using the amp operator on just an array name is invalid C does however allow the amp operator to take the address of an array element for example amp myname 4 The amp operator applies only to variables and array elements A called function when passed an array name as an argument can declare the argument as a pointer and reference thru the elements of the array Would you like an example er ei tt A Inside TMQ 38 Inside TMQ Volume VIL ii THE MISOSYS QUARTERLY spring 1993 Volume VIL ii sets sivas SAO Ro e aaa eee Rea eee aee e ee pine Sees es OOE RIRORAA A re See Reina oes o a oe es oe ETERRA San Aan a E O NE a A ONS Se be Ss aaa RARAS E3 See eee C The function scount will return the num ber of occurrences of a given character in a given character string array The two parameters passed to it are the address of the string to search and the character to search for If you follow the logic pay particular interest to the ptr expres sion The value printed after the above code is executed should be 3 What Youdon t believe me Type in the code and try it out on
77. ard level products whichcan be plugged into plain vanilla PCs to enable real time computer recognition of objects which are in motion And Computer Reseller News reports that HP will shortly be releasing a 3 pound notebook computer with Microsoft Win dows 3 1 DOS 5 0 Winword and Excel all in ROM Nicknamed the Lion the portable will have two PCMCIA slots one of which will support HP s Kittyhawk personal storage module Pricing How s 1 500 2 000 Now for the truly bizarre the Hitachi Cambridge Laboratory and the Cavendish Lab at Cambridge have demonstrated a memory device structure utilizing the Couloumb Blockade effect they believe will eventually be used to store a bit of information with just one electron This was reported in Electronic Engineering Times of February 22nd not April ist To put this into perspective current 16 Mbit memories use about 500 000 electrons to store one bit Wher 100 m of space and 10kW of power would be required tostore one terabits of memory using 16M bit devices a C B device would need but one square inch of space and 0 1 W Finally the production of 386 based com puters is grinding to a halt With Intel dropping the 386DX chip and X86 cus tomer demand of 90 95 for 486 based systems expect to see few 386 machines by fall 93 ea a eee Trade in Policy EN With the closeout of most TRS 80 prod ucts our trade in policy exists solely for our LB database and
78. at your DIRCHECK is dangerous to use becauseit frees locked out granules that should have remained locked out As I am an owner of DIRCHECK I d like to know your re sponse I could see this as being a problem with floppies which give me far more problems with locked out granules than your hard drive ever has Could this have contributed to my abort and trashingcom plaint that you have never been able to duplicate Ihave found thatithas freed up hard drive granules thatnever should have been locked out in the first place the only problems I have ever had with your hard drive since I bought it in 1989 have been the result of directory glitches Second Goben says BACKUP has been flawed for years but that itnever mattered until it encountered subdirectories cre ated by his software It seems that the problem has to do with the drive number register being properly set rather than ignored Ihaven tbought his subdirectory software so it doesn treally matter to me But someday I might so I thought I d ask Third there was a post on Roy Beck s BBS in L A that you are getting out of the TRS 80 business altogether and selling off your inventory at close out prices If so Ihave received no such mailing If you are leaving the TRS 80 world I m con cerned about continued support for my MISOSYS hard drive and related soft ware Naturally I don t want you to leave but if you must I trust there will be sort of formal ann
79. ateo the specifications to disk to automate the sort This allows you to set up a sort operation that is transparent to even a novice user DSM is intended for use with user developed applications soft ware Please note that DSM creates an index file as opposed to actually re ordering the records in the data file Quizzes and Answers QuizMaster RATFOR is an excellent language for general purpose use but i QMis an educational question and answer program that can also is vastly superior to FORTRAN when working with alarga number be used as a game It displays a question and four possible of modules without documentation as is necessary when produc answers and scores the operator s response based upon speed and accuracy QM comes with five subject files of up to 100 questions each derived from grades 6 9 taxtbooks U S Informa Extensions supported include the arith macro to perform binary jtion Geography Math General trivia as well as Fantasy and arithmetic operations read and print macros for short form READ Science Fiction trivia QM randomizes both the order of the questions and the order of the answers to prevent memorization The question sequence is never the same Extanded play provides a sudden death mode automate compilation a language Reference Manual an instal feature for the skilitul user QM includes all the programs neces lation Manual appiication programs in source code on disk and sary to
80. ator between the power supply and the panel Makesureitstaysin place when you re mount the power supply to the panel If your 4P has a Tandy supply TANDY CORP is stenciled on the PCB to the right of the large 220 uF capacitor Note _ the hole which is above theright hand side of the fuse just beneath resistor R38 to the left of the AC power connector This is an unused hole which becomes one of the holes for mounting a standoff Another location for drilling a hole can be found 1 1 8 from the bottom and 5 3 16 from the right That position is between transformer T1 and inductor LS If you look at the trace side of the supply the location is just southwest of the part number 8709365 Hold the board up to the light and you should be able to see the area vacant of both traces and components by looking through the PCB Mark the location and carefully drill the hole A 1 8 size is sufficient however it is best to start with a much smaller drill bit first then re drill with the 1 8 bit I use a Black amp Decker high speed rotary tool for this job The host adaptor will be positioned above the power supply with the H A power connectorabove the power supply s power connectors Thus the H A mounting hole adjacent to the joystick port is used with the standoff mounted in the hole near R38 A hole corresponding to the drilled hole needs to be drilled in the H A The new hole is approximately where the C
81. awings Optional quantity cost and total calculations customized invoice headings footnotes CASH Bookkeeping system for Mod 4 45 00 Easy to use ideal for personal or home business use Journal entries are automatically distributed to user s accounts in a self balancing ledger FREE User Support Included With All Programs MICRODEX BOOKSHELF MOD 4 by CHRIS for TRS LS DOS 6 3 24 95 MOD III by CHRIS for LDOS 5 3 24 95 MOD III by CHRIS for TRSDOS 1 3 24 95 Beautifully designed owner s manuals completely replace Tandy and LDOS documentation Comprehensive coverage of DOS BASIC and interfacing to assembly language all in one volume Better organized with more examples written in plain English these classic books are a must for all TRS 80 users Now fully updated for LDOS 5 3 1 and LS DOS 6 3 1 JCL by CHRIS Job Control Language for LDOS and TRS LS DOS 7 95 Surprise surprise We ve got rid of the jargon and JCL turns out to be simple easy useful and fun Complete reference and tutorial with examples Z80 Tutor Fresh look at assembly language programming 9 95 Z80 Tutor If Programming tools methods memory modules etc 9 95 Z80 Tutor Ill File handling I O ports sorting BCD math etc 9 95 280 Tutor X Complete refer nce to all Z80 instructions flags 72 95 he one and only common sense assembly language reference for novice and expert alike No kidding Over 80 practical routines for Mod III and Mod 4 Add
82. ay Ili bet there is a silver lining to this one Maybe MISOSYS will have a spe cial on software I could upgrade all my stuff to the latest and final release That s a plus Now to take that overdue inventory Any plans forone of those Buy the Drive Get the Software Deals Fm MISOSYS Inc The closeout prices listed in TMQ VIL i these are special prices tesag offered to TMQ subscribers first The closetuspricing has been adver tised to others starting Fm MP Roy can we hope that when you drop the old TRS 80 stuff that you ll at least donate it to the public domain Itis a real drag when old software disappears forever when it could have been placed into the public domain so the users will at least benefit from it Fm MISOSYS Inc If no one has bought an item in 1 2 years why should I expect that folks will want it now Give me a people coming into the scene even if it s needed to make it worth my while THE MISOSYS QUARTERLY spring 1993 good answer to that Fm MP OK I ll try my best First the mostobvious is that the software would be free Second there will always be new only la y ar I tend to look towards the future What happens in 50 years when the Antique Computer Club or whatever has a swap meet and the talk tums to say Bounceoids No one there has a copy or knows where to get one because the com pany last responsible for it simply disap peare
83. because at the time the record was typed in some info was not available and now Ineedareportofthose incompleterecords to update them Where can I get a BIOS for my CP M 3 The one I have is the once sold by Radio Shack and is full of bugs and saa imple mented Fm MISOSYS Inc Here s some an swers which you may find useful Both MLIB and UNREL require a library file to have an end of file indicator as part of the relocatable module bit stream If you examine the technical information such a code will start on a byte boundary and have the sequence 1001111 This implies a trailing 0 to fill out the byte thus the end of file code is a 9EH Atone time when MLIB was sold as a separate product the disk had a file called ENDREL REL which contained the single 9EH byte A note indicated that you could APPEND the ENDREL REL file to any foreign module which would not load properly That s the problem you are hav ing I see that ENREL REL may nothave made it to the MRAS or UNREL disks Simply create such a file you could use the DOS BUILD command with the HEX parameter then append the file to any library you are having a problem with DoubleDuty should be able to work prop erly with the COM DVR provided by the DOS if the driver is installed before load ing DoubleDuty That s because the driver uses the serial port s received character Letters to MISOSYS 15 Letters to MISOSYS Volume VIL ii
84. cause its covered up with glue In both the Tandy supply and the Astec supply the holes are very close to traces By using a nylon standoff there is no Chance of shorting the H A to the power supply However you must use either ny lon nuts on the standoff or create some insulating washers The nylon standoffs I use are two inches in length have a 4 40 threaded shaft on one end and are tapped for a 4 40 screw on the other end The threaded shaft is placed through the holes from the component side of the power supply and tightened down with either nylon nuts to avoid shorting together any of the traces or insulating washers and regular nuts I did not have any nylon nuts on hand so I made some washers I used a double thickness of the static insulating bag which hard drives come in This is a very thick mylar If you do not have that available raid your kitchen for a freezer bag A few thicknesses of that should be sufficient I cut out a small square of about 0 5 then poked a hole through the center This is easily done with a probe or a standard sharp hardware awl Place the washer over the thread then tighten down anut The H Acan then be mounted on the standoffs with two 4 40 screws I later found nylon washers at Home Depot Getting power to the parts Since you will be replacing one of the floppy drives and adding two components needing power another power connector must be added The cable powering the floppies doe
85. ce coda or edit any type of ASCII file Model 4 128K operation provides v TED is just lika the editor you get with LS DOS 6 3 but ours multiple editing butters works from PRO WAM while you are using other pro gramsl It s friendly fast and great for writing notes when you are right in the middie of a program you can interrupt UNREL should be the perfect professional assembler s tool for your bag of tricks 45 TRS 80 Software and Hardware from MISOSYS Communications Terminal BASIC Compiler BASIC Sort Utility LS Host Term EnhComp BSORT This is an enhanced BASIC compiler released in 1986 and Here s a high speed sort for almost any number of one or two reviewed in the March 1987 issue of 80 Microcomputing and dimensional BASIC arrays string integer single and double October 1987 issue of COMPUTER SHOPPER This compiler precision When invoked from your BASIC program BSORT will has lots of great features it handles the bulk of Model Iii Microsol periorm the indicated sort and execution will continue with the BASIC and supports additional commands and functions Stan next statement in your program dard is floating point with both single and double precision functions random file access X mode for reciens to 32767 Mukiple key avrays may be specified the sorting on each key can turtle graphics pixel graphics keyed array sort multi lined tunc be done in either ascandingor d
86. column widths on display Thus you have complete controlover the fonnatting of your data for printing and display Sorting within AFM is automatic Once the sort feld has been definea every record entered with that sort field wii automatically be placed in the correct position relative to heather records in the file However you can list the contents of ANY field in sorted order at any time In addition searching can be performed on the major key tekds through the use ci powerful relational operators inciuding AND OR GREATER THAN LESS THAN EQUAL NOT EQUAL etc AFM has a second module included called AFR Auto File Reporter It is one of the MOST powertul report generators aver made available for the TRS 80 computer Fully relational reports can be generated by applying any set of parameters do your data base AFM also contains a BCD MATH Package which wiil allow you to have a running total on numeric fields in reports if desire using operators Accuracy is assured by using BCD marh instead of floating point and cutout is automatically formatted AFM contains numerous HELP screens which can be invoked at the touch of a key The help screens are user controllable ana user definable you may set up your own help screens for a particular application if you wish It is very easy to set something up for people who dont use the system ali the time Output of AFR is fully sorted by ali fieids and is fully relational
87. compiler look no further lf you are looking for a well stocked UNIX System V standard library look no further MC reviewed in the January 1987 issue of MICROCOMPUTING is acomplete C compiler which adheres to RATFOR Compiler the standards established by Kemighan and Ritchie The library of functions is extensive and System V compatibile The compiler generates Z80 relocatable macro assembler code M80 or our RATFOR M4 MRAS The libraries are files of relocatable object modules MC is a full featured compiler for the discriminating programmerl RATFOR reduces your programming time and effort dramatically over that required when FORTRAN is used because RATFOR code is fully structured facilitating modification and debugging and because program flow is apparent from the overall appear ance of the program comments are sim pler and more versatile than in FORTRAN simplifying self documentation This allows changes without the subsequent debugging tolerated when modi tying FORTRAN RATFOR compiles source code to an object of FORTRAN use your existing FORTRAN compiler to convert this to executable MC supports command line VO redirection tor compiled pro grams wild card file specifications parsing for UNIX exten sions in filaspecifications overlay support requires MRAS a full pre processor lots of options and is designed for the program mer wishing the ultimate in C compilers The package is supplied with the compiler
88. d Or on the other hand maybe everyone has a copy because the same company donated it to the public domain before abandoning it I have watched this happen with CP M software as the years have gone by Companies have either dropped CP M software or gone out of business and then 10 years later I get messages on my BBS from people look ing for Supercalc 2 or whatever If Sorcim had donated Supercalc 2 to the public domain before dropping CP M support Pd have a copy to give these folks So I say IF you are going to drop the TRS 80 anyways any little potential revenue from the products is lost anyway So why not donate this stuff to the public domain so that future generations can benefit from it It won t cost you a cent Fm MISOSYS Inc Sorry but I don t necessarily have the rights to place all the software I seli into the public domain Second if folks would take it for free but are not willing to pay a reasonable price then it shows you what its worth I don t buy that argument Third folks will still bug me Over support regardless Fourth code within my programy is usedin more anone progr everything I am only stopping products which no one seems to be buying ata price Fm MF Roy If you don t want to donate to public domain which is pretty risky anyway please consider transferring your unsold stock and possibly source code as well to the folks at Computer News 80 rather than throwing it away outright
89. d pro grammers take advantage of this fact With the above new C language com mands you can perform various logic patterns and control the flow of a C pro gram Another flow control C statementis the goto The object of the goto is a label A label has the same form as a variable name but is followed by a full colon The goto and the label to go to must be in the same function The use of the goto is not Inside TMQ 36 Inside TMQ Volume VI ii THE MISOSYS QUARTERLY spring 1993 Volume VIL ii recommended except for possibly branch ing out of some heavily nested logic Initialization Blocks Pointers and Arrays Several computer languages are block structured in the sense that they allow functions to be defined within other func tions C doesnotallow this In C functions are always external since they are not inside of other functions I am alluding to the fact that functions are blocks of C code and a block is enclosed via braces These braces enclose functions and other blocks After the comes variable defi nitions if any Variables in C are thus defined in a block structured manner Variables can be declared following the brace that begins any compound state ment Also after the brace that begins a function variables can be declared de fined If more variables need to be declared later in the function they can be by declaring them after the lef
90. del 4 4P 4D and Model IH computers let us build one up for you Our host adaptor which interfaces the 50 pin expansion port of the TRS 80 host to the 50 pin SCSI port of the HDC sports a hardware real time clock option using a DS1287 clock module With its internal battery lifetime in excess of 10 years never enter date and time again It even adjusts for daylight saving time Another option available is a joystick port and Kraft MAZEMASTER joystick with a port interface identical to the old Alpha ee joystick thus any software which operated from that joystick will operate from is one Software supporting the 1421 and 4010A controllers includes alow level formatter an installation utility and driver a high level formatter a sub disk partitioning utility utilities to archive restore the hard disk files onto from floppy diskettes a utility to park the drive s read write head a utility to set or read the hardware clock a keyboard filter which allows the optional joystick to generate five keycodes and a utility to change the joystick filter s generated keystroke values after installation Optional LDOS 5 3 software is available Twenty megabyte drive packages are currently built with a Seagate ST225 hard drive Forty megabyte packages use a Seagate ST251 1 28 millisecond drive Drive packages _are offered as pre assembled kits Your kit will be assembled to order and fully tested e all you will need to do is plug
91. dventure right off its hinges TRSDOS 6 Source books THE SOURCE 3 Volume Set This will be the last time that these books will be made available for a giveaway price THE SOURCE contains a vast wealth of information fortheassembly language programmer THE SOURCE is not only informative but also an excellent leaming tool These books contain the complete commented assembler source code for TRSDOS 6 2 excluding hard disk support the Microsoft BASIC and the HELP utility Each book is softbound 8 1 2 by 11 The complete set totals over eleven hundred pages of cleanly commented elegant source coda Volume 1 The Sys tem covers SYSO to SYSS and SYSS to SYS13 Volume 2 The Libraries covers all of the library commands making up SYS6 SYS7 and SYS8 Volume 3 The Utilities covers all utilities drivers and filters Hard Disk Driver RSHARD Finally foryour Radio Shack hard disk drive is this hard disk driver package from MISOSYS at a reasonable price You get suppon for both LDOS 5 3 and LS DOS 6 3 RSHARDx driver panitions by both head and or cylinder supports two 8 headed drives up to 1024 cylinders RSFORMx formatter adds both low levei and high level formatting to your drive s partitions HDCHECK checks the performance of your drive ARCHIVExiets you backup some oral of the files on your hard drive to multiple floppies BIG files and smali files RESTOREx lets you selectively restore some or
92. e 28ms MISOSYS SCSI H A with software 7 69 x4 125 x2 mounting holes are 3 75 x7 25 Direct replace Xebec 1421 Hard Disk Controller ment for Tandy Model 4 power supoty Adaptec 4010 Hard Disk Controller power Y cable XT drive cable sat 20P HDR EDC 34P HDR EDC IAEE EAEE A EAE E E XLR8er d Model 4 in M mode rarer Model I Double Density Controller LDOS 5 3 XLR8er Interface Kit This is based on our Hardware Interface Kit but is for the XLASer board operating under LDOS 5 3 Tha package includes XLR2RAM XMEMDISK BANKER VIDX and SETX Double Density Controller DDC _ 80 more disk capacity is what you get when youadd Asrocomp s DDC to your TRS 80 Mode i This controiter has withstood the test of time All the others are gone yat the DDC endures Why Because it has proven itself as the only way to achieve reliable floppy disk operation on the Model Requires the Radio Shack Expansion Intertace and software driver Usa our LDOS for top natch up to date DOS performance Se ATL AI I TS SRR TE ETE XLR2RAM adds a bank handler for the extra 64K of memory and the extended 256K of XLASer board memory The RAM disk driver can create a RAM disk ot from 2 to 27 banks however only 10n ara supported through XLR2RAM The VIDX expands scroll protect from 0 to 15 lines rather than just 3 supports reversa video and supports the OSP of character codes from 0 31 and 192 255 49 Model I II Data Base Manage
93. e memory banks n wn to tenos as Swell Sl 2 ee Choose LDOS 5 3 1 or LS DOS 6 3 1 tx Both Model I and Model II support similar com mands all features of Model III 5 3 0 are in Model I 5 3 1 That includes such facilities as DOS and BASIC help files SETCOM and FORMS library commands as TED text editor BASIC enhancements etc All DOS the DATE SY Se x Supper a date range of S2 xo s staeecbeen groomed for Moder LS DOS years i rer 1980 through December 31 ps i pen Ta a bee Sco an AS NS tes comfort tablew theglleged rotection cheme wr Enable oF abist ih an time out aiid 1 eo 3 a of 6 3 Ls DO8S S Gs oantipirac Beers t non enera on wi STEM PRITME ONEORRRS aY nant EE ae E anges a os S os gt Stxchonaeour N ARS og BS 3 w Both ASCIF and hes displayeutputinm the 335 PED Bee atin EN E E ay nee conimang s paged a screen wat atime OF Gbriun X TUR ates 4 apes estf OF miaa oe A 6 3 1 diske skette fa available as non stop under pur contol E ga w cet a replace 7 2 Bus ete eran for ae Rad i SES Blue 3 Sarria Seeyniere SSE ote He cay Ree rae 9 2 or A 1 Sousa ses wn with a 30 day ome mmes A ma ee ee ee an SS Nee va re Shee Nota at Fe written customer stipport is available for 30 from the purchas date Versions of 5 3 1 for the Model I and Model II are available Versions of 6 3 1 for the Mod l d and Model IFre available Model 4 French and German
94. e a third disk is now needed to provide LB for the TRS 80 we provide the complete TEMPLATE 2 disk for the MAILFILE template nl LB86 and Tandy 2000 Fm MISOSYS Inc Just a brief note to those throngs still pecking away ata Tandy Model 2000 I recently decided to put my color 2000 up for sale see last TMQ issue In order to do that I had to put it back together and test it out I had previ ously dismantled it to use the 80 track drives over on a Model 4 Once back together it still worked I then decided to try out version LB86 2 3 I discovered without great surprise that the LB86 install program crashed due to the different video addressing of the Tandy 2000 However when I copied over a decompressed set of LB86 files the data base package worked without a hitch Even the color support up to snuff So if you still are playing around with a Tandy 2000 and want to acquire a database forit LB86 will work All you need do is to specify that you need a custom decom pressed set of LB86 files Letters to MISOSYS 18 Letters to MISOSYS o Volume VIlii THE MISOSYS QUARTERLY spring 1993 4P40M A 40 When MISOSYS first designed its TRS 80 Model IH 4 hard disk package the most common drive available was the MFM drive ST506 412 type ofinterface MFM was the original drive type used with the TRS 80 Model Iand MI by Tandy In fact it was the only type available Tandy used a custom hard disk
95. e constant statement break _ case constant statement break default statement break The switch statement is followed by an integer expression and a block enclosed in braces The logic of the switch statement is to evaluate the integer expression and compare its value to the constant case a ee Inside TMQ 35 Inside TMQ Volume VIL ii THE MISOSYS QUARTERLY spring 1993 Volume VILii values Each case is labeled by a con stant expression usually an integer or character constant If a case matches the value of the expression that case begins the execution Statements after that case are then executed If a break statement is encountered the switch statement block within braces is exited Ifno cases match the expression then the default case begins the execution The defaultcaseisoptional The cases and default can occur in any order but the cases must all be different If no cases match and no default case is present nothing happens at all Nothing happening at all has been described as the sound of one hand clapping It is good programming practice to put the break statement at the end of a case If a break is not present execution falls through to the statements which follow This may not be the desired action An example of the switch statement follows Switch answer case y case Y printf The answer was YES break case n case N
96. e omitted you could be statement if expression confused by the following statement if a 2y_ else statement if c 2 d 2 EXAMPLE 2 else if expression d 4 statement else if expression The rule in C is that the else is associated statement with the closest previous else less if Be else if expression statement else statement Both examples work the same but are of different styles Perhaps the most popular or common style used in the K amp R book is represented via the second example Example 1 may look nice too but consider how long the actual expressions and state ments may be If they are quite long the style of example 2 may appear nicer Whicheverstyle method you choose itis a good rule to be consistent If you noticed the above two examples demonstrate a generalized way of writing a multi way decision If any expression is true its associate statement is executed and the whole else if chain is ended If none of the expressions are true then the statement after the last else is executed _ This represents the default case Any of the statements can be a block of statements in the braces The last else could also be missing and there would be no default statement executed Another way of making a multi decision in C is with the switch statement The syntax for the switch statement is Switch expression case constant statement break case constant cas
97. e printing multiple across labels each succeeding label across will shift that line by one column each time the POUND is printed Your solution is to code convert a print able character external toLB That spretty easy on the TRS 80 version using a printer filter the FORMS filter s XLATE param eter could be used for this purpose Under MS DOS it would take a TSR to handle the characterconversion Since LB86 sup ports only 7 bit printable characters you cannot simply enter and character value greater than 127 thus either a printable character needs to be converted exter nally or the control character facility must be used which does not align col umns It sounds like a character conversion table may be a useful addition toa future release of LB But I m not making any promises Converting PowerMAIL data to MS DOS amp LB Fm MISOSYS Inc We recently had a query onhow bestto migrate a PowerMAIL data base to MS DOS That problem is easily solved using two of our existing products TRSCROSS and LB86 Here s THE MISOSYS QUARTERLY spring 1993 the solution The TRSCROSS program can read the TRS 80 Model 4 disk files directly on an MS DOS machine LB86 has a database conversion utility LBCONV which can directly generate an LB86 data file set from the PowerMAIL ADDER file Here s what you need to do 1 Copy all of your data file records into an adder file you may need more than one adder file
98. ectives Index files can be left unsorted or you can sort in ascending or descending order By associating a sorted index file any record can be found within seconds even in a very large database LB even includes a special Dup command which uses the sophisticated Ratcliff Obershalp pattern recognition algorithm for automatically finding duplicate or near duplicate records Duplicates can then be either manually deleted or automatically purged using the provided LBMANAGE utility program Automatic operation For automating your processing needs LB can be run in an automatic mode without operator intervention Frequently used procedures can be saved by LB s built in macro recorder for future use Entire job streams may be produced so that LB operations may be intermixed with literally any DOS function that can be batch processed These named procedures are easily invoked via a pop up iat POX Maintenance utilities To make it easy for you to grow your database as your data needs grow we provide three utility programs for managing your database LBREDEF allows you to construct a new database with an altered data structure and populate it with data from your existing database This facility is great for adding new fields or deleting fields no longer needed Or you can use LBREDEF to redefine the field type of an existing field and convert the existing data Another utility LBMANAGE allows you to duplicate your database structu
99. ed tilde CLEAR SHIFT PLUS on Model 4 keyboard ASCII 126 could print the cents symbol code 222 on DWP 210 220 printers Listing 1 The SVC macro in the listing will be automatically recognized by most assem blers but if not then replace each SVC number with a LD A number RST 40 The labels and the seqlcnee_of the program s segments are admittedly rather Inside TMQ 24 Inside TMQ Volume VIL ii personal for example I like to have the body of the module at the beginning of the listing so I can immediately see what it does But readers familiar with filters will easily recognize the standard components described in Roy Soltoff s bible The Programmer s Guide to LSDOS TRSDOS Version 6 Filters are just like any memory module files the LOADER relocates the HEADER plus FILTER into high memory adjusting any fixed ad dresses by the distance of the relocation and lowers HIGH to protect the module However one peculiarity of filter loaders and drivers for that matter is a test of the C flag and the jump to an error message if the program was not invoked via SET command lines 3 5 of the LOADER We ll get back to it later The first idea in our effort to make the installation simpler for the user was this after the loader has installed the routine why couldn t it also process a FILTER command This way the user would need to enter only
100. ed from the RS232 then a system crash occurs Dueto the way the EVM behaves it s very difficult to prevent that from happening from time to time Of course that night happen any time COMM is running on one partition and thereis no control on the other side of the connection Is there any solution to this LB 2 2 0 I have been using LB to main tain a database of electronic components of a controller I designed In each record are the component ID for example R203 for a resistor the component value 100 ohms for example plus other fields I need to generate reports for example of the total of the 100 ohm resistors in the database so when I order material just multiply that total by the number of con trollers to assemble There are about 150 nt types values of components of a total of about 350 Selecting them one by one will require going to the select menu 150 times and also know all the values beforehand What I m trying to say is that beside sorting and selecting options the capability of making totals of the values of a field can be very useful For example a report as follows 100 obm 2 2k 100k 74C245 Can be generated from the following data 100 ohm 74C245 100 ohm 2 2k 100k 100k 100 ohm where all correspond to the same field the value field PNPN Regarding LB also I have a question How can I select records that have a field with no information entered I need todo it
101. er value The compute function returns no value whatsoever The function test is known among multiple source modules and returns an integer value It could have also been declared as extern int test The optional return statement is how the function returns a value back to its caller It is optional i e the function does not have to pass back a value Even if the function does not return a value back to its caller it is good programming practice to include the return statement If no return is found control of the function falls thru to the end of the function by reaching e ending right brace Any expression value can follow the return statement Examples of the return statement return The first example of the return statement returns without passing back a value The return 0 which could also be written as return 0 returns back the value zero The last example returns the character x Although we haven t learned about the expression below I ll let you ponder over it just to show how an expression can be used in the return statement return a b c Functions can also optionally be passed parameters Remember that these param eters are passed by value rather than by reference Except for arrays and other parameters representing addresses of vari ables each function gets its own private copy of the variable These parameters are enclosed by the mandatory parentheses denoting a functi
102. erted to a double but the function was expecting a single the value used by the function being the zeroed part of the number hence your result I edited your test2 ccc program to cast the value returned from frnd to a double then re compiled the test program using the 4f compiler option and it worked as advertised I suppose in hindsight those functions specifically supported only in single precision could have had a note in their function documentation Sorry for the confusion include lt math h gt main int x printf xlc x1lfThis should print 20 random numbers petween 0 and 1 n for x 07x lt 20 x oe a print st double frnd float 0 printf nThis should print 20 random numbers between 1 and 10 n for x 0 x lt 20 x printf sft u double frnd float 10 o i i bee PRO MC dint fix a ee aE Fm FS I now have a fast assembly lan guage fix to the limitations of the present dint in PRO MC It requires replacing the FDFIX module in LIBA However when I load liba rel into MLIB I get a symbol table overflow error Is there any way to replace this module without resorting to the kludge of putting the new FDFIX in a USERLIB Fm MISOSYS Inc You would need to split the library in two use splitlib which was given in apast TMQ Then adjust the half containing the revised module Then append the two modules with the DOS APPEND command use ST
103. ery frequently used due to the restrictions imposed by the C language These limitations imply that Structures are not to be dealt with as a single unit This limitation does not hold for pointers to structures Therefore a short hand operator gt is used to make pointers to structures and structure members easier to use In the examples above birth is a structure of type date month and day are members of the structure and pdate is a pointer to a structure of type date More later on structures As you can see we haven t yet discussed the and amp operators Operators type amp sizeof All of these operators are unary or mon adic operators This means they need only one operand la The truth value of a is reversed If a was TRUE non zero itis now FALSE zero If a was FALSE it is now TRUE Since I declared a to be 10 earlier after the a the result returned will be FALSE zero a The one s complement of the operand a is returned Just invert each bit of the operand If a bit was a one switch it to a zero and if the bit was a zero switch it to a one a a at a These are the increment or decrement operators They may prefix or postfix the operand If the operator prefixes the operarnid its value is taken after the incre mentordecrement Ifthe operatorpostfixes the operand its value is taken and re turned by the expression before it
104. es if the HLregister pair was used to obtain the value of c from the stack you might see the following instruction among others generated as a result of compiling the above C state ments LD HL O Load HL pair with 0 The 0 is contained in the instruction and doesn t take up any data storage Side effects come into play when there are noexplicit C rules as to how an expression is to be evaluated In this article a chart is used to summarize the rules of precedence and associativity for the various operators If no rule of evaluation applies the C compiler is free to evaluate an expression or sub expressions as it sees fit Theresults expected or not are called side effects To overcome side effects break up larger expressions or statements and use explicit temporary values When expressions involvearithmetic with different data types a conversion Or pro motion to a common data type occurs Since both data types are of a common type the result is also of that type Since lower datatypes areconverted to higher types the process is called promotion Of course there isa set ofrules for this conver sion or promotion The ladder of promo tion if I can be allowed to invent a phrase is shown to illustrate this promo tion double float unsigned long long unsigned int unsigned short int short unsigned char char Besides arithmetic expressions type con versions can take
105. es is covered on page 1 MAILFILE Address mail list LB Each issue of The MISOSYS Quarterly database example Some folks have asked me if TMQ is contains program listings patch listings MISOSYS Customer information going to continue pastissue VILiV Right and other references to files we have database placed onto a disk Where feasible the text accompanying an article is also on DISK NOTES DISK NOTES 7 2 corre sponds to this issue of TMQ The disk is formatted usually for TRS 80 LDOS LS DOS usersat40D1 that s40 tracks double density one sided MS DOS users can request a 5 25 360K disk If you want to obtain the fixes and the listings you may conveniently purchase a copy of DISK NOTES priced at 10 Plus S amp H The S amp H charges are 2 for US Canada and Mexico 3 elsewhere now there are about 260 subscribers 40 or so non US To mail at 3rd class bulk rate for US subscribers it requires a mini mum of 200 pieces Each annual renewal has resulted ina 20 reduction in sub scribers That trend implies that Volume VIII would not have a sufficient base to continue 3rd class mailing So unless something changes to project areversal of the downward subscription trend con sider that TMQ will cease publication with issue VIL iv era SST MISOSYS Forum LB Templates e I sponsor a forum on CompuServe You can reach some experts on TRS 80 and MS DOS subjects by dialing in then GO PCS49 or GOLDOS This
106. escending order Tag arrays that This communications package gives you the tools needed to get communications chores done quickly and effectively ADDS25 is set up to look like a Radio Shack DT 1 emu lating an ADDS 25 terminal Full cursor positioning reverse video and blinking fields are supported TERME allows one Model 4 4P to be used as a remote terminal to another running HOST portion of LS Host Term IMEN Ek control sequential file positioning line labels and more HOST lets your 4 4P operate remotely with password access for log in from another 4 4P using ADDS25 All video effects are properly transferred to the remote system CED a line editor with string search change partial load save We include a version of XMODEM for file transfer between renumber copy and move systems using the MODEM protocol as well as a utility that converts to from binary and HEX ASCII binary repre sentation to from INTEL Hex format and checksum files Enhcomp has a built in Z80 assembler You can easily create hybrid programs of BASIC statements and imine assembly code statement high memory module techniques for your BASIC pro gram to access a machine code module ZBO MODE accesses BASIC s variables Full C Compiler You ll have to edit existing BASIC programs but the power and compieteness of EnhComp make that an easy task Requires our BASIC Reference Manual MC PRO MC If you are looking fora full C
107. evice to back up files from the hard drive The following material covers the meth ods I used to physically install the host adaptor and the hard drive into the 4P Other methods could be used to mount in a desktop installation i e a 4 or 4D What you will need To install a drive and host adaptor you will need indicates part available from ameter we can make the cables 1 two nylon secant 2 in length 1 2 two nylon nuts see text 3 one 12 long Y power cable 5 4 three 50 pin female header connectors 5 one 50 pin edgecard connector or 5 a fourth header connector and a 50 pin header pin strip 6 three feet of 50 conductor ribbon cable 20 for both cables Optional parts l one switch Radio Shack 275 636 2 20 red 22 gauge hookup wire 3 10 yellow 22 gauge hookup wire 4 20 9 conductor ribbon cable for joy stick 5 one 9 pin male D sub miniature IDC connector for joystick 6 one 10 pin header connector for joy stick 10 for completed cable Before you begin Before I began the installation I decided to also modify the 4P motherboard to add the port for external floppy drives This modification was covered in Tsun Tam s article Upgrade your 4P with external floppy drives originally appearing in 80 Microcomputing and reprinted with their permission in The MISOSYS Quarterly issue IV iii reprints available I would likewise recommend that anyone taking the time to inst
108. f OR This will tag the record only if the status field has both member ship states If you wish to add in the former or pro spective members to either of the above selections then you should simply re quest an OR connective in step 4 witha match string based on where you have the F or P status stored If this is also kept in field 1 then you are selecting field one athird or fourth time thatis nota problem so long as you do not add a field to the SORT STRING more than once Once the index file is created you use that file with the PRINT command to print only those selected records I also recom mend creating a macro JOB file for the sort select set of commands so you can automate the index file generation for the _ next time you need to re select The LB version 2 manual contains an extensive section which takes you through the motions step by step of creating a database It illustrates this activity with a mailing list application included with the package as a template When we released 2 0 we included that database template named MAILFILE This template is dis cussed in the Getting Started section of the User Manual Withreleases 2 0 through 2 2 the template files fit onto the Installa tion disk however with the added mod ules of 2 3 MAILFILE no longer fit We have various database templates available see current list herein MAILFILE ap pears on the 2nd template disk Becaus
109. fine MAXIMUM 1000 define TRUE 1 define CR 015 Octal value for a carriage return Note that constants if given a name are generally by convention represented by upper case names The define compiler directive functions to the C compiler as an EQUATE directive functions to an assem bler One line macros In the above examples wherever MAXIMUM is found in the C program it is replaced with 1000 Hex number constants are preceded witha 0x or 0X Octal number constants are preceded by just a 0 Another compiler directive can be used to include a file containing multiple define statements For example include file ext This tells the compiler to include the con tents statements in the file file ext Usually there are many standard con stants declarations and or expressions which you will include in most all of your C programs This being the case included with a C compiler is usually a standard header file of the most common con stants This file is what you will include in most of your C programs A character constant is formed from a single character enclosed in single quotes Certain special characters arerepresented with an escape sequence to denote it as a special character Here are some ex amples x single lower case character x RS single upper case character A r return n newline NOt null
110. fyou havea model 4 then you must have PRO WAM CRT output is in screen sized pages PRINTER output is paged wih column headings page numbers and titles for print outs that ioox identical to an assembler fisting Output to DISK produces afile suitable for MRAS EDAS configurable for others and is automatically seg mented into manageable file sizes You will even be promoted to change the output file diskette when the disk becomes full MRAS generates M80 compatible REL files Macro support includes REPT IRP and IRPC as well as standard macro parameters by both keyword and pesition It supports nested includes and a full range of nested conditionals MRAS incorpo rates a fast binary searched symbol table and the ability to enter symbol values from the command line Labels can be any length PRO WAM Application Pack Mister ED with 15 character significance Ithas fexidie output redirection of REL Disassembler listing and symbol table Mister ED is loaded with editor appilcations All are full screen which make your editing jobs easy Bast ofall these are all PRO MLINK supports virtual memory bit stream butfering REL and UNREL IRL library searching direct generation of complex program overlays and does not generate disk space for DEFS ragions in OSEGs and COMMONS The linker can generate either a normal executable command file CMD or a core image fila CIM MLINK supports the following specal link items 0 3 5 7 9 11
111. hat desire DOS formats listed above flagged with signify that earlier to use them include executing menu options right from DOS or versions of these DOS s are readable as well but one or more from a batch file or macro This can really speed up transfers sectors may be skipped due to a format problem in that version of when similar operations are performed frequently the DOS Disks that were formatted with SUPER UTILITY or SUW4 4P do not have this problem TRSDOS 6 02 01 or z n higher should not have this problem Disks formatted in any 5 25 TRSCROSS allows you to TAG all 80 track format or single density are not supported 3 5 720K files to be moved in ONE pass disks are readable in a 720K 3 5 MSDOS disk drive TRSCROSS Requires PC or compatible computer 128K and a TRSCAROSS converts TRS 80 BASIC programs normal 360KB 40 track PC or 1 2MB 80 track AT drive and SuperSCRIPSIT files in ONE PASS while Double sided operation is fully supported If you have more than COPYing to MS DOS one disk drive fixed drive or RAM disk operation will be much smoother TANDY 1000 requires more than 128KB memory No need to save your programs or files in ASCI or run a separate DMA TANDY 2000 is not supported at this ime due to a conversion program first before transferring TRSCROSS reads difference in disk controller and floppy drives Special data your tokenized BASIC program or SuperSCRIPSIT files directly files like PROFIL
112. hat for external or static variables the initialization is done only once For automatic variables which are initial ized in a function they are re initialized each time the function is called I may need to declare afew more variables to illustrate all of the operators However I will do so when each individual operator is introduced Let s begin Operators Q gt printf C is a very useful language to know n The 0 is called the function call opera tor The left and right parentheses sepa rate any optional arguments passed to the called function Square bracket operator s is used for arrays In this example an array of char acters whose name is buffer is declared to have 100 elements The is used to reference index or subscript elements of the array In this example the elements are buffer 0 through buffer 99 In C the index starts at 0 Be careful about your use of these subscripts since the C compiler does not check to see if the subscript you use is within the bounds of the array struct date int month day year birth struct date pdate ere amp birth we birth month 10 pdate gt day 3 The and the gt period and arrow operators are used when dealing with struc tures The operator is called the struc ture member operator because it connects the structure name and a member name Pointers to structures are v
113. have to invent Inside TMQ auto break case char const continue default do double else enum exter float for goto if int long register return short signed sizeof static struct switch typedef union unsigned void volatile while 27 _ Inside TMQ Volume VILi THE MISOSYS QUARTERLY spring 1993 Volume VIL ii them however since they are provided as functions in the Crun time or the installa tion computer specific library The in stallation specific functions run time func tions and functions of your own design aid in creating a more structured program One might expect and rightly so that the main body of the structured program is also a function It is in fact and is called main The parentheses are used to denote main as a function and can option ally enclose variable names representing parameters passed to the function There must always be a mainQ function in your C program as itis always the entry point Braces enclose all of the statements that make up a function C statements are expressions such as x 2 followed by a semicolon The semicolon is used as a statement terminator Statements may be if you wish grouped together com pounded into blocks A block is a state ment or many Statements which are en closed in braces This block or compound statement is treated as a single statement Braces surrounding the statements of a function such as main also form a block or
114. ht of the video tube Considering power consumption each Ce a eee a a a ae Inside TMQ Inside TMQ Volume VIL ii THE MISOSYS QUARTERLY spring 1993 Volume VIL ii original floppy drive draws0 8 ampsaver age at 12 volts 9 6 watts and 0 8 amps 4 watts from the 5 volt supply Peak current draw from the 12 volt supply increases to 1 3 amps 15 6 watts during motor turn on The Seagate ST157N draws 12 watts which is less than the total average power of the Tandon TMS0 1 floppy drive how ever the information at my disposal does not isolate the power consumption be tween the two supply voltages My host adaptor consumes about 1 5 watts from a 5 volt supply thus the ST157N with host adaptor should easily replace a single floppy on a total power consumption basis The 4P in which I installed the 40 mega byte drive was equipped with Tandon TM50 2 360K drives and an XLR8er board According to the Technical Manual the TM50 2 should consume the same power as the original TM50 1 installed However after installing the hard drive I made the observation that the videoscreen bloomed on access of the 5 25 floppy as the motor turned on Therefore I decided to reduce the power draw on the supply by replacing the remaining floppy with a3 5 drive as modern 3 5 floppy drives con sume very little power in the neighbor hood of 1 5 watts and only from the 5 volt supply Besides the 720K 3 5 drive would work better as a d
115. iable the called function can then change the value This call by reference is actually how array names are passed When an array name is passed as a vari able it is actually the address of the first element of the array It would be imprac tical tocopy the entire contents of an array and pass these separate copies as is done with other variables Any of the four data types int char float double can be represented in C by a variable Numeric and character constants are also used in C as data values A vari able issymbolically represented by aname This name is composed of letters and digits The first character of the name must be a letter and although large names are allowed only the first 8 characters of the name are significant A C convention is to use lower case for variable names and upper case for symbolic constants NOTE C keywords reserved words must be in lower case Variables must be declared before they are used In declaring a variable the data type the variable is to represent is stated For examples char c d e int x short b string 100 c d and e are declared to be each a single character x is declared as an integer b is declared as a short precision integer and string is a character array of 100 charac ters C numbers the elements starting at 0 So this array has elements 0 through 99 each one character in length Variables not only have a type associated with them
116. ine kerosene or a mix ture of the two get your calculators out for this one Japan alone could recover 11 54 billion gallons of fuel per year Fuzzy logic has come a long way since I first made mention of it a few years ago For those really interested there s a bul letin board maintained by Motorola which specializes in fuzzy logic Try 512 891 3733 at 300 9600 baud 8 N 1 Did you know that Smith Corona is the only domestic supplier of portable elec tric typewriters not that they re manu factured here in America SC s now re quired to pay a dumping duty of 16 on typewriters it imports from its production facility in Singapore Who s that Russian comedian with the famous line America what a country Brother International a Japanese company has moved their type writer production to Tennessee while our American Smith Corona moves produc tion to Asia According to Electronic Products the Oak Ridge National Laboratory with joint research by Eveready has developed a thin film battery which can be fabricated On semiconductor processing equipment to be included directly into an IC such as a computer memory chip According to Electronic Engineering Times Sarnoff Research Center after ten years of research has spun off a unit to market their S mart Sensing vision tech nology At the heart of the operation is a pyramid image processing chip named the PYR 1 The goal is to create low cost bo
117. ions of JCL and KSM Allows programs such as Profile 4 to ba totally automated FORTH Compiler HartFORTH HartFORTH is a full FORTH that conforms to the 79 STAN Cornsoft s arcade type games MISOSYS has licensed the action games previously published by The Comsoft Group Frogger Scariman Bouncezoids Crazy Painter and Space Castle are exceptional action games with great video and Alpha joystick support even the MISOSYS HD DARD The Model Lill version is an indirect threaded version the igvsti He s l w WIS joystick All games are for Model IIL or 4 in ill mode Ali five DOS 6 version is a direct threaded implemen tation providing games are included on a single disk Requires a DOS disk greater execution speed of 10 40 depending on the details of the actual program The kemal contains some additional useful words and utilities which tum HarlFORTH into a full fledged development system HartFORTH is designed to run under an operating system which is totally transparent to the programmer or user The virtual Memory that it accesses for storage and retrieval purposes is a normal DOS file that is requested by the FORTH system when it ls first entered HanFORTH supports double length integers string handling cursor manipulation graphics random numbers and floating point Maintenance GO MTC The GO MTC program collection provides maintenance support services for your computer operation DIRCH
118. ipt for gach printer you have PowerScript adds the ability to see an alphabetized directory without exiting the program sesing how much tree space you have and others It works on the Modell Illor4 versions of SCRIPSIT it will even make a Modal version of SCRIPSIT work on a Model IIl or 4 in the Ill mode Lastly PowerScript removes the limited copy feature of SCRIPSIT so that you may maka as many copies as you need or copy itto your hard disk without hassle animated TRS 80 screen graphics PowerDraw PowerDRAW allows you to create graphics mixed with text if desired and save them to disk k allows you to create up to 33 rames of animation and piay them like a movie it aiso allows you to save the graphics in several modes including BASIC listings CMD file format atc These can then ba merged into your own programs either in BASIC or machine language Many of PowerSoft s opening screens were created with PowerDraw In fact it even creates animated opening screens lo really pep up the program it also allows you to print the screens on Epson type and several other type of printers Lastly PowerDraw has the ability to load in many types of TRS 80 graphic s and convert them to BASIC listings like a BASIC program generator Block Graphics Drawing PowerDOT 2 0 This program is similar to PowerDraw but quite different It allows youto create hi res type screen graphics combined with text and
119. is probably the oldest forum still surviving from_t VicroNet days If yoy wantto see it Please note the availability of the follow ing LB database templates B Template Disk I continue how about popping on for achat DRA Dragon magazine ar Or a question ticle index GAMEINV Role playing game in The forum contains many programs to ventory download as well as lively discussions LEAP Parent group address which thread through the message sys roster tem You can direct a message to me at PROP Valuable property 70140 310 Post a message in private if record you don t want it broadcast PTA PTA roster STAMPS Stamp collection To use any template simply copy the files to your data drive create a path file using LB menu option 14 then add your data To create a template for others simply use LBMANAGE to duplicate your database then copy the new set of files to another disk Submit your templates to MISOSYS for publication They are available at 10 per disk 3S amp H or free for download from our CompuServe forum An MS DOS 360K disk will hold a pair of tem plate disks poem et ag ye een ge See DOS Manuals ge eee ee ee Don t forget that with our LDOS amp LS DOS BASIC Reference Manual whichcovers the interpreter BASIC which is bundled with LDOS 5 3 1 even the ROM BASIC portion the interpreter BASIC which is bundled with LS DOS 6 3 1 and both Model I M mode and Model 4 mode EnhComp com
120. iscussed later about printf and stan dard C functions If necessary functions can call themselves This process is called recursion As previously mentioned the main body of a C program is itself a function called main It can call functions as needed to perform designated tasks This main func tion the program itself can have param eters passed to it If parameters are passed to the C program the following syntax is used to declare them and the mainQ func tion itself main argc argv int argc char argv i program statements You are probably wondering why only two parameters inside the 0 after main Do I hear you asking what happens when I type in a command to tell the operating system to execute my program and I pass it more than two parameters You should be asking For example myprog pl p2 p3 p4 Since this is a command line given to the operating system there are actually five parameters or arguments The program name itself is the first parameter and the four others are pl p2 p3 and p4 The main function forthe C program myprog would be coded as is done in the example shown above The declarations for the variables argc and argv suffice for all parameters passed to the C program in the command line The variable argccontains the number of parameters passed includ ing one for the program name itself The variable argv is actually a pointer to an array of pointers Each e
121. it in and install the software Drive kits include a 50 pin host interface cable and the hardware clock Full implement of status lights included power ready select read and write Adda joystick or hardware clock for but 20 additional per option see price schedule Aerocomp Hard Drives now available from MISOSYS MISOSYS is also the sole source of remaining brand new Aerocomp hard drives All Aerocomp drives include status LEDs software driver and formatter power and host cables and installation Job Control Language We are building their 20M and 40M drives We also have Montezuma Micro CP M Hard Disk Drive drivers available MISOSYS Inc Contents Printed Matter PO Box 239 DIN Sterling VA 20167 0239 kl U S A Address Correction Requested Forwarding and return postage guaranteed Attention Postmaster Order any hard drive kit or unit from MISOSYS and we ll pre install either LS DOS 6 3 1 or LDOS 5 3 1 at no extra charge eeeeseeaeogoegoeee00 0080 090 gt Prices currently in effect Complete MISOSYS Hard Drive e 20 Megabyte kit 395 A 40 Megabyte kit 495 e Joystick option 20 e Hardware Clock Option 20 LDOS software interface 30 e SCSI software interface 25 Aerocomp Hard Drives 20 Meg unit 350 40 Meg drive 450 H A with MFM software 75 Separate Hard Disk Controllers Xebec 1421 HDC 45 Adaptec 4010 HDC 45 WD1002S SHD 45 Drive power Y cable 5 X
122. ixes problems backs up most pro tected disks etc Super Utility has over 65 functions and features Does not work on hard disks Our ToolBox or ToolBelt has similar features tor hard drive use as weli as floppy SU does not support Newdos 80 double sided disks Super Utility Plus 4 4P 4D The Modal 4 version of Super Utility has all the features of the Model Ll version but uses the larger amount of memory for quicker operations plus utilizes the three function keys It boots right up in a Model 4P without having to first load the MODELA lii ROM file Hard Disk Check Repair amp Modify LDOS ToolBox lf you own a hard disk and use LDOS this is the pertect insurance policy for your data The LDOS TOOLBOX is like a Super Utility for hard disks Features Disk Check and Disk Repair Sector Modification plus many many other useful utilities that makes using a hard drive even easier Each program contains a builtin heip command so many times you don t even need to look things up in the manual just press lt Enter gt for helpl A very wise buy for hard disk users Model 4 ToolBelt This is similar to the LDOS TOOLBOX except it is for the Model 4 TRSDOS 6 operating system all versions Super Fast Hard Disk Backup and Restore Back Rest BACK REST has proven to be a great time saver for thousands of TRS 80 hard drive users BACKREST can back up 10 megabytes in about 10 minutes and 20 meg in about 30 40 minutes
123. ke a floppy Vertically mount ing the 3 5 hard drive on either edge not either end is an acceptable mounting Inside TMQ 20 Inside TMQ a red Volume VILii THE MISOSYS QUARTERLY spring 1993 Volume VIL ii position according to the specification sheet This will most likely require some fine tuning of the mounting holes in the drive cage to allow for proper positioning of the drive bezel The mounting hole positions for 5 25 drives are a standard all drives have screw holes in thesame location But these positions are relative to the body of the drive case The problem with the 4P is that the drive cage mounts with the front bezel of the drive fitting flush against the case front Different drives have different thick nesses of front bezels there s no standard for that If the drives fit through the front case there would have never been a need to modify the hole positions of the cage however because the holes must be posi tioned according to their displacement from the front of the case drives with different thicknesses of front bezels will require different locations for the mount ing holes Youcan find the exact locations for the holes somewhat easily as follows 1 After removing the drive cage from the 4P remove the floppy drive which is on the closed side of the cage This is the drive 1 floppy and it will be removed to provide a position for the hard drive 2 Now hold the hard d
124. laces Soit sa good safety valve But instead of complaining Install via SET the NOSET code could perhaps make itself a bit more helpful and just do it without talking so much So let s revise this code snippet Listing 3 Almost home The user needs to enter only SIMPLE FLT and the rest happens automatically In effect the program gets executed twice first to find that the SET command was missing and then again to do itright But since filter files are typically very short the time is of minor concern compared with the convenience Convenience Then why bother with the FLT extension Con sider the SET command assumes de fault extensions FLT or DRV but any extension can be used if it s spelled out So if we rename our file SIMPLE CMD and add the CMD extension to the noset Inside TMQ Inside TMQ Volume VIL ii THE MISOSYS QUARTERLY spring 1993 Volume VII ii string SET AA SIMPLE CMD then the user needs to enter only SIMP LE Simple indeed No asterisks no syntax no fuss There is a problem though if the name which we have hard coded such as our AA is already used by some device The installation fails with anothercryptic com plaint OVER in u se Of course we can NOs RRR always do a manual SET using any device name and now remembering to spell out the CMD extension But that brings back the expletives and kills the whole idea A smarter
125. le Note that since the cable is 9 conductor make sure you orient it properly towards pin 1 in the 10 pin header connector when you are crimping the IDC connectors With everything closed up re test the drive You now have a 4P40M A Inside TMQ THE MISOSYS QUARTERLY spring 1993 Volume VI ii YES OF COURSE WE VERY MUCH DO TRS 80 MICRODEX CORPORA TION SOFTWARE CLAN 4 Mod 4 Genealogy archive amp charting 69 95 Quick and easy editing of family data Print elegant graphic ancestor and descendant charts on practically any dot matrix and laser printer inquire about custom drivers for daisy wheel printers True Mod 4 mode fast 100 machine language Includes 36 page manual A EYA XCLAN3 converts Mod 3 Clan files for use with Clan 4 29 95 DIRECT from CHRIS Mod 4 menu system replaces DOS prompt 29 95 Design your own menus with an easy full screen editor Assign any command to any single keystroke Up to 36 menus can instantly call each other Command templates auto boot screen blanking clock more XT CAD Mod 4 Computer Drafting 95 00 The famous general purpose precision scaled drafting program Surprisingly simple yet it features CAD functions expected only from expensive packages Supports Radio Shack or MicroLabs hi res board Output to pen plotters Inquire about our new driver for laser printers XT CAD BILL of Materials forxT CAD 45 00 Prints alphabetized listing of parts from xT CAD dr
126. lement of the array one for the program name and one for each successive parameter is actually a pointer to the parameter The before the variable argv is a unary operator It says that the variable it precedes contains an address It uses this address to fetch the contents sto Variables Constants and Expressions Let s move on to the next topic that of variables constants expressions and op erators Variables in C and in any lan guage are used to manipulate data in storage A variable name is composed of letters and characters and optionally the character to improve readability of the name as you can see char byte of storage Don t forget to define declare variables before you use them Also don t choose a variable name that is the same as a C reserved word keyword or statement If you do don t worry the compiler will tell you Constants are used in C for the same reasons they are used in other languages Callows for several types ofconstants 1e number character and string constants Itisusually good programming practice to use a special feature of the C compiler to define constants As you ll discover equating a constant to aname will make it easier to change later on Just update it where itis defined andevery occurrence of it will also be updated automatically by the C compiler at compile time Here are some examples of the C compiler directive define de
127. les must be declared before they are used I will declare a few so they can be used in our sample expressions int a b c d Variables can be initialized in their decla ration statement As you might guess an Operator the equals sign is needed to accomplish this For example int a 10 int b 5 int c 2 An easier way to initialize the above vari ables is int a 10 b 5 c 2 Well anyway it takes less lines in your program On the other hand you may want to use a Separate line for each defini tion in order to document the use of the variable by means of a comment string To accomplishthe initialization the vari able name is followed by an equals sign andaconstant The constant s value serves as an initializer Multiple initializations can be performed in a single statement as is done above when separated by acomma The comma used in this way as a separa tor is not an operator and does not man Inside TMQ 32 Inside TMQ Volume VIL ii THE MISOSYS QUARTERLY spring 1993 Volume VILii date the rules of evaluation as does the comma operator Some variable types external and static are automatically ini tialized to zero by default of the C com piler However as stated by K amp R it is better programming practice to state their initialization anyway If automatic vari ables are not initialized their values will be of an undefined value Garbage You should note t
128. les to LSDOS Then I tried to use UNREL but got a similar message Then another idea ocurred to me Using SPLITLIB I created another library equal to the first by specifying a large size so the result was a single file Then I used MLIB successfully to sepa te the modules of this new file and then T a S isting My question is why L80 SPLITLIB DECODREL and the LIB from CP M can read the files but MLIB and UNREL can t unless I pass them through SPLITLIB DDUTY 02 06 00 running under LSDOS 6 3 1 I have a special board called EVM which is a microcomputer without a keyboard or display It has an RS232 port so it can be used with a computer The software inside the board has an assembler a debuger and a text editor Pm making a program for the TMS7000 microprocessor The text edi toris very limited so edit the sourcecode inthe TRS 80 model4 thendownload the program to the EVM then assemble it for debugging That s when DDUTY comes into play In one partition Irun COMM to download the program and to operate the onboard debugger In the other partition I use the SAID editor so I can go step by step checking my program using COMM and when I find an error just switch to SAID and correct the source code then back to COMM to debug some other section It is very convenient to do it this way I found thatwhen DDUTY is switch ing from one partition to an other and in that moment characters arereceiv
129. listed as closed out have not even sold one copy in the past year so there just cannot e any legitimate fuss from anyone You or others may be interested in some other old stuff I have been digging up in trying to clean out the back room I came across a Data Dubber originally sold by The Peripherals People I also found a brand new Omikron Mapper I have a Micromation board with 8 floppy drives Letters to MISOSYS 12 Letters to MISOSYS Volume VIL ii which was used to turn a Model Tinto aCP M machine There s the Stringy Floppy I also have a System 9710 by Micropheral Devices Thatinteresting box connects up to a specially adapted IBM Selectric II typewriter to turn it into a printer The thing connects up to the parallel printer port This was used by some of the early types in the business for doing User Manu als My early manuals were done on it The Selectric II is still used here as a typewriter Some of this stuff may be offered to the Smithsonian There s anold 10 Meg 8 IMI hard disk drive andapower supply for it whichis almost as big as a4P Interesting stuff Fm BP Roy I wouldn t say I was shocked at your comment about re duced emphasis on the Model J II IV software with future support limited to Model 4 operating systems and a few utilities but I was saddened That surely will drive me and many others to the MS DOS world And I still really like these old machines S
130. lso have a data base package called LB86 which has a data base conversion utility called LBCONV which can di rectly read your Profile data base file se and create an LB file set LBCONV can Letters to MISOSYS Volume VIL ii THE MISOSYS QUARTERLY spring 1993 Volume VIL ii also convert LB format to dBASE format This requires the Profile file set to be transferred to the PC as binary images If you can TRSCROSS the files or modem the files you can then directly handle the Profile data with LBCONV LB86 cur rently sells fer 99 S amp H you can take __ 50 off by trading in your Profile MLIB Double Duty LB Fm AM Tecamachalco MEX Roy I was reading my TMQ VI and I found it s time to renew my Subscription In addi tion I want to buy some software But first Ihave somecomments and questions about other programs I have MLIB 4 0 and UNREL 1 0b I was trying to take a look atsome of the routines in the library of the high resolution graphics for FORTRAN GRPLIB REL and the fortran library using UNREL so I tried to separate them using MLIB but got the error invalid file format The program spent some time loading the libraries be fore the error was displayed so I figured that was some problem with the way the rel files terminated and MLIB expected to Imoved the rel files to CP M and used the LIB program and successfully sepa ratedany modules I wanted I moved back the separated modu
131. ly liketo use the KI DVR with SAID rather than having to reset KI before using it Nasty things happen with KI DVR resident even with type ahead off TED has no problem recognizing the presence absence of KI DVR Is some _ thing wrong or am I missing something Fm MISOSYS Inc The problem is one of syncronization The LDOS 5 3 1 key board driver was updated subsequently to last implementation of SAID SAID can t find the LDOS 5 3 1 KI driver because of a number of reasons First the module name of the 5 3 driver was KI3 or KI1 for the Model 1 5 1 4 version the 5 3 1 driver has a module name of KI Next SAID needs to index the special character conversion table to change the code for the up arrow key from 5BH to OBH the table was moved in release 5 3 1 Letters to MISOSYS Letters to MISOSYS Volume VIL u THE MISOSYS QUARTERLY spring 1993 Volume VIL The solution to the problem is to patch SAID to introduce the search changes necessary to find the KI driver of 5 3 1 The following patch should work for Model IIE operation Patch to Model III SAID 1 1 Allows finding KI driver D2A 35 I F2A 35 3 D2B 38 SKI F2B 38 KI1 D2A C8 Al FE F2AC8 E7 FF Eof De DIRCHECK amp BACKUP Fm HAB Jacksonville FL Dear Mr Soltoff By now you probably have had several queries from readers of Computer News 80 in which David Goben said in the February 1993 issue th
132. mensional arrays For example int a 10 20 This declares a two dimensional rectan gular array Elements of a multi dimen sional array in C are stored by rows Viewing storage as linear elements of the array are seen in storage order if the right most index varies the fastest Now how can arrays be initialized Arraysare initialized differently than other variables Only external and static arrays can be initialized automatic arrays can not be initialized External and static ar rays are initialized as shown in this ex ample static int numbers 10 0 1 2 3 4 5 6 7 8 9 Remember in the absence of explicit ini tialization all elements of external and static arrays are initialized automatically to zero In initializing external and static arrays fewer initializers can be used than there are elements In this case the remaining elements will be zero C also disallows more initializers than elements Wouldn t it be nice to be able to repeat an initializer or just to initialize specific elements and ignore others Well sorry C does not provide a means to do that Here is an example of a character array and its initialization xy static char me E C Terwilliger Jr ion ssi Ove shore A E Quick How many elements does the array me have Use the comments ruler line to help you count Did you guess correctly with 21 Each character between the quotes is an element plus the 0 which is
133. nment statement Below ptr is shown on the left of an assignment char ptr a b b Toe ts ptr amp a ptr ys es After the above statements are executed a will contain the same value as b ptr is a pointer reference In the case above it actually references a ptr contains the ad dress of aand ptr references the character stored at the address in ptr Having the address of a variable is very useful Remember from a previous part that C passes copies of variables as argu ments to a called function This is call by value The called function can not alter a variable in the calling function Actually it could if the variable used in both func tions was an external variable Now that you have learned about the amp operand you can use it to pass as parameters to a function addresses of pointers to vari ables The called function can declare the arguments passed as pointers and alter the referenced data Looking back overtheabovediscussionon arrays do you remember the problem of assigning values to an array Consider this now that you are familiar with arrays and pointers char myname myname Earl C Terwilliger Jr This also is not a string copy But it is a valid expression mynameisa pointer and it is assigned the address of the string Comparing these two C statements with the ones shown to illustrate arrays you should be wondering about the relation ship between an array
134. ntel 8080 files to Zilog 280 files Converts CR LF sequences to asingle CR By usingthe CR c parameter in the command line the character c will be interpreted as a logical line end This desktop manager gives keystroke access to 4 memory resident pop up applications and disk access of others A Func tion Key lets you invoke DOS library commands PRO WAM tums your TRS 80 intoa powerful machine because itcomes with many useful and powerful time savers and desk organizers Here s some of what you get This powerful combined disk based line editor and Z80 macro assembler assembles from one or more nested source disk files or memory buffer features nested conditionals with ten pseudo ops nested 7 level MACROs with parameters both pesitionaland by keyword cross reference listings and a separate full screen text editor Translates M to HL extended instructions LDX B O H l and PSW are changed to BC DE HL and AF changes lt DB DS w An ADDRESS file data base prints cards and mailing labels OW SET gt to lt OEFB DEFS DEFW DEFL gt Throw away that black book and your Rolodex file The expression evaluator supports left to right evaluation of add sub mul div mod shift logical AND OR XOR NOT binary ops EQ GE GT LEA T SHL SHR unary HIGH LOW Labels may be up to 15 characters long start with A Z or positions 2 W HEAD pipes formatted address data into your letters 15 may also use 7
135. nter type and character size from a pop up list box Select one of four canned report formats narrow or wide carriage Table reports a Form report or an address mailing label using one of six different sizes of labels _ including labels printed two three and four across Label formats also include formatting for a Rolodex card and a3 by 5 index card Label formats automatically select the needed fields from your database definition For printing associate any of the ten index files and you control exactly what records get printed even a subset of indexed records can be selected for printing to give you a means of recovering from that printer jam halfway through your 30 page printout You can even force a new page when the key field of an index file changes value Up to ten different printout definition formats can be maintained for each database Reports may be sent easily to a printer the console display screen or to a disk file useful for subsequent printing or downstream data export to other programs Report formatting allows for multiple across mailing labels multiple copies of the same record or even form printing one record per page for sales books You can easily generate mail merge files of address or other data for your word processor Or you can use LB s built in form letter capability Help is on the way The main menu even provides a shell to DOS so you can tempo rarily exit LB to perform other DOS commands L
136. o the right on the second label and two spaces on the third label Presumably this would con tinue on subsequent labels However Example 2 shows that using the instead of the Control Code there is no problem I would be obliged if you could offer any advise to overcome this situation My printer is a PANASONIC KX P1180 Fm MISOSYS Inc The use of control codes in LB86 and equivalently LB is for the control of printer functions al though you have found that any character value may be generated with a control code The reason why LB permits any value to be a control code is that printers may us any Character or sequence of characters for control purposes they do not limit themselves to ASCII control codes But the LB User Manual is quite specific Letters to MISOSYS 16 Letters to MISOSYS Volume VI u in stating its treatment of control codes On page 98 the following statement re veals your problem In printing control characters LBDM will notcount the char acters used to define the control code Therefore not only are the sequence of characters within and including the backslashes ignored for the purposes of column counting neither are any of the character values generated from the con trol code Thus your use of acontrol code with a value of 156 to print the British POUND sign will print as such on your printer but LB86 does not increment its column counter So when you ar
137. ocate memory modules to high memory hoping to protect them from use by lowering the operating system s HIGH pointer A great deal of consternation prevailed when high memory had to be used to load hard disk drivers and enhanced keyboard drivers Tocounteractsome of this difficulty some DOS vendors provided a small and I do mean small amount of space in lower memory for use by non DOS programs Unfortunately a handful of bytes is by no means sufficient for most programs which need inter program communications space to utilize for that purpose Wouldn t it be great if there were a standard means of providing such a inter program communi cations region Well there just could be Most low end C programmers should be familiar with the two arguments passed to a main program argc and argv These arguments are the means to access data passed to the program viaa command line invocation But in the world of C there is usually a third argument env MS DOS users should be somewhat com fortable with the concept of an environ ment This is an area of memory set aside to store user defined configuration data such as a PATH string a PROMPT se quence or a SHELL specification Essen tially the environment in MS DOS is used to store the strings of data associated with these specifications uniform DOS service calls can then access the data so programs may know at runtime how the user has established his or her machine configura
138. oesnt support muititasking so only the fore ground application receives CPU time The third partition can ba used to execute DOS library commands Our new 2 6 0 release also works with expanded memory known to the DOS such as our XLR8er board A BANK parameter lets DoubleDuty use any pair of adjacent memory banks With ex panded memory and DoubleDuty run ScripsitPro along with other programs If you thought you needed another computer think again With DoubleDuty you can now have two for the price of one DOS Manual Hard Disk De fragger HDPACK When your hard drive files become fragmented with excessive directory extents access speed degrades Your program will finish in less than the optimum time Now with our HOPACK utility youcan restore that ZIP to yourcomputer HOPACK will automati cally and intelligently re pack the fragmented files on your drive which will improve the performance of file access time HDPACK provides a visual display of its de fragging operation which in minutes can restore a ten megabyte directory of files to a mininum number of extents HDPACK can even work on floppy diskettes too PUTS ZIP IN YOUR DRIVE Mod 4 features for Mod M Hardware Interface Kit This will allow you access to your Model 4 hardware featureswhile using LDOS 5 3 Here s what you get e KI4 keyboard driver uses lt CTRL gt key lt CAPS gt key and function keys e SETZRAM switches to Model Ill RAM mode BANK pro
139. oid Nim will make everyone laugh to watch these life like creatures as they shake their heads up and down or side to side and blink at you stupidly as they wait for you to make a move Then Leo invented how to make the TRS 80 produce sound and added it to NIM He then followed Android Nim with the other games even getting Radio Shack to sell Dancing Demons which is a real scream The disk includes the famous games ANDROID NIM BEEWARY DUEL ING DROIDS DANCING DEMONS SNAKE EGGS and ANI MATED LIFE All games feature full sound effects and some of them are avenin3 part harmony You and your family will just tove this diski Dancing Demon even features saving your song and dance routines to disk and four of them are included The possibllities are endless and it is always entertaining A great way to show off what your computer can do and always fun TRS 80 Mod I amp II GAMES KIM WATT GAME DISK Contains Space Colony Symon Capture Horse Race Slots These are some games that Adventure Intemational pub lished back in the early 70 s Originally these were sold on three separate diskettes or tapes but we have combined them all on one disk for you collectors TRS 80 Mod I amp II GAMES Lance Micklus Greatest Games This 3 disk set is a great collection as it features space games Space Trek adventure games Dog Star Adventure gambling games The Mean Craps Machine which also includes a tutorial booklet
140. ointer All other conceivable arithmetic includ ing shifting or masking is illegal Note a pointer containing NULL or 0 is a special case The C language guarantees that if a pointer points to valid data it will not contain 0 The 0 value is usually used to indicate anerror condition Anexampleof this would be when a storage allocate function is called This function may have been designed to return anon zero pointer to the beginning of the allocated storage If storage can not be allocated it could return a NULL zero value indicating an error of some type occurred Consider the statements below for the discussion following char ptz static chaz af 5j test ptr a ptr ptr is a pointer to type character ptr is initially set to the address of the array a This is written as amp a 0 or simply a Next ptr is incremented to point to the next element of the array This is written as pt r Other possible ways to code it in thisexample could have been ptr tptr ptr or ptr Note that ptx would create a different undesired result than ptr The and operators are of equal precedence and associate right to left From the above statements you can conclude that array subscripting can be done by incrementing a pointer You can also conclude that the following two expressions are equivalent ptr a ptr amp a 0 Note that in effect an array name is a pointer expression
141. ome later C hereinafter referred to as C I got tried of typing is characterized as a low level language A C source program is compiled assembled into an executable machine language program This is not however why it is called a low level language It is called that because it deals with data items much the same way as machine instructions do Machineinstruc tions deal with characters bytes num bers and addresses These objects are what C deals with also To illustrate this we ll take a look at C s data types a are only four data types char a single byte one ee acter int an integer float floating point single precision double floating point double precision The int data type can be further qualified to be short int long int or unsigned int The length of these number data types is specific to the machine for which the C compiler was designed You might be wondering at this point about how high level tasks are per formed Or for that matter how is any task accomplished which other languages per form but for which you don t see a C vocabulary word You say you don t see any read write I O string manipulation or array processing statements in C s above listed vocabulary Iexpectnot Such things are specific to a particular machine You can of course invent functions to do these high level tasks and explicitly call them in C Usually you don t
142. on It is the parentheses immediately following a variable name that denote it as a function rather than a variable data type The optional param eters passed to a function can be declared by default but it is a better programming practice to explicitly declare them The left and right brace which en close the expressions or logic performed by the function are the next ingredients to completing a function The expression s enclosed by the bracesis are called ablock Blocks are not necessarily limited to use in functions As we will see later they are also used in the main body of a program Enclosing braces are merely used to asso ciate an expression or groups of expres sions as a single entity A complete example of a function is int prtval c int c printf The parameter value passed was d c return The function prtval is passed a parameter c which is declared to be an integer tured programming techniques return 0 Within the braces of the prtval function return x another function printf is called The printf Inside TMQ 29 Inside TMQ Volume VIL ii THE MISOSYS QUARTERLY spring 1993 Volume VII 1i function is part of the standard C function library It is passed two parameters in this example The address of the string of characters enclosed in double quotes is the first parameter The second parameter passed to printfisthe value ofc More will be d
143. on defense spending Texas Instruments is in the news from another new angle angling mirrors It recently demonstrated live video basedon its digital micro mirror DMD technol ogy The DMDs which are micro me chanical spatial light modulators are alu minum mirrors about 17 microns wide attached to poles at two ends and sus pended over static RAM The mirrors tilt 10 to the right or left depending on whether the SRAM cell under the mirror is holding a 1 or a 0 A large 640 x 480 array of the mirrors is assembled which provide pixel resolution of a VGA screen in a projector device In the projection system light is beamed through a The Blurb 2 The Blurb Volume VIL ti THE MISOSYS QUARTERLY spring 1993 Volume VIL ii condensor lens and then through a red green blue filter wheel which is synchro nized with the video information fed to the DMD chip The filtered light is then pro jected onto the DMD chip whose mirrors are deformed according to the digital in formation that has been written to the chip s SRAM The image is reflected from the mirrors through a projection lens onto alarge screen TI has plans for DMD arrays up to 2 048 x 1 152 mirrors for use in HDTV systems Video compression schemes are hot Ac cording to Electronic Engineering Times a bold breakthrough was demonstrated via closed circuit TV at this winter s Con sumer Electronics Show by video startup 3DO The 3DO
144. on disk board games Mean Checkers Machine as wall as some dam useful programs that you might use for real purposes Also has some educational games for the kids TRS 80 Software and Hardware from MISOSYS Mod 4P internal 1200 bps modem Model II or 4 RS 232 Serial Card RS 232 Serial Card or Kit MISOSYS acquired the remaining stock of genuine Aerocomp seriaicards foryour Modal Ill or 4 Replace your broken serialcard with this brand new work alike replacement or get a kit to install a serial port in the computer without an existing one TT512P Modem MISOSYS has the TeleTrends 300 200 baud Hayes compat ible modem which slips right into the Model 4P s Internal modem slot This has a full AT command set capability For now you Modei 4P foiks can upgrade to a real Hayes compatible modem operating at 1200 baud it s just what you needed for your 4P es Model M1 4 Floppy Disk Controller Hard Disk Drives and Parts Floppy Disk Controller FDC MISOSYS MSCSI Hard Drives oppy Disk Controller FDC Genuine MISOSYS MSCSI hard drive kit packages plug into Model 4 4P 4D and Modal Ill computers The 11 x 10 x 4 75 LWH beige drive case has space for a half or full height drive 115V 230V 30 watt power supply and fan hard disk controller HDC host adaptor H A optional hardware real time clock RTC LED status lights and 50 pin SCSI tamale connector Optional Joystick port with joystick
145. one command from DOS such as SET AA SIMPLE We know that the SET command estab lished a Device Control Block DCB for the filter and stored its name such as AA in our example in bytes 6 and 7 of that DCB Since register IX already points to DCB we can easily fetch that name stuff it into a FILTER command string and execute that command So let s rearrange the end of the loader Listing 2 The loader willreplace the dummy char acters with the device name specified in the SET command Since a filter normally is intended for one particular device printer in this example the name suchas PR can be pretty safely hard coded into the loader The done message is com bined with the filter command string and displays both thename of the installed routine and the names of the involved devices So far so good But once we were on the simplification binge the next question was why bother the user with the SET syntax anyway Could the installation of the filter be done by simply entering its name just like any DOS command or program Well maybe Remember that the loader checks the CAflag and jumps to NOSET when bit 3 is zero This may happen when a creative user enters SIMPLE FLT The DOS will execute it like any other program but the filter wouldn t work without a device estab lished by SET Most likely it would bomb the system because we d stuff all kinds of funny bytes into wrong p
146. or both If you have some doubt look at the C code below Main argc argv int argc char argv if argc lt 2 printf Error no parameter was given exit 1 targv printf e n argv 0 0 The arguments argc and argv are not new to you they were described previously As _ you noted argv is treated as an array and as a pointer in the above program Are you curious about the argv 0 0 expression used in the printf function What will print is a single character the first charac ter ofthe command line argumentafter the program name If the above program was called test to invoke it and pass it an argument you might type might be used as part of a larger program and the argv 0 0 could be used to test for a switch such as or in front of a parameter In the example invocation above lincluded the myfile dat parameter to suggest some possibilities for you to ponder The argv function parameter is a pointer to an array of pointers Here is a list of possible ways or forms in which you might see it used argv argv argv n argv 0 argv 0 argv 0 0 Having some trouble visualizing what each repre sents Look at a possible storage map chart of argv address I hope the above map will be of some aid Try and fit into the above map all of the ways of using the function argument argv Enough of this for awhile Let s switch topics and introduce s
147. ouncement coupled with sug _ gestions as to where people like me can turn for support Fm MISOSYS Inc By now I have had only one query concerning Goben s CN80 piece yours How many readers do they have Since I have not read what he wrote I cannot comment on that To my knowledge DIRCHECK does not free up locked out granules on floppies which were locked out as flawed In fact DIRCHECK warns you if a file is allo cated to a granule which is locked out due to a flaw In the case of hard drives there is no lock out table What has been common in the TRS 80 community of hard drives is to allocate a flawed granule during an integ rity check of the drive partition But since this is done in the single allocation table there is no way for any utility or the DOS to subsequently know that the granule is flawed compared to acorrupted directory with a granule allocated but not used DIRCHECK will indeed deallocate any granule on a hard drive which is unused but allocated however DIRCHECK prompts you to make sure of your in tended action The manual states Hard drive directo ries differ from those found in floppy _ drives in that they have no lock out table for flawed cylinders during formatting The manual further states It is not rec ommended to use a diskette with a flawed directory recover files by copying toa known good diskette What I would rec ommend is to 1 save acopy of the FR
148. piler BA SIC you can purchase the disk version of EnhComp for 23 98 plus 3 S amp H If ordering the EnhComp disk please note which version Model I HI or Model 4 The Blurb 5 The Blurb Volume VIL ii THE MISOSYS QUARTERLY spring 1993 Volume VILi MS DOS Products MISOSYS is a reseller of products pur chased from Ingram Micro thus we have access to a huge array of MS DOS prod ucts So if you are looking for some hard ware orsoftware to go with your MS DOS system why not get in touch with us for a quote Call write or FAX I still have some Tadiran TL 5296 6V lithium batteries usable in most AT class machines Don t wait for your battery to fail and lose your configuration data A spare s shelf life will probably out last your machine SCSI Driver MISOS YS hasaSCSIdriver H HD SWS now available for use with our H HD MHA Model III 4 host adaptor The SWS driver is for directly supporting a Seagate SCSI drive or exact equivalent it can handle a drive up to eight heads and 1226 cylinders approximately 80 megabytes Seagate drives which are in this capacity range include the 48MB ST157N the 60MB ST177N and the 84MB STI096N These drives are out of production how ever re furbished drives should be avail able at reasonable prices One source is listed in the 40M4P article in this issue Drivers for both Model III and Model 4 modes are included FAX Number _ x e wierd If
149. place when a function is called After all a function argumentis an expression Conversions can also take place across an assignment statement When this happens the value on the right side is converted to the type on the left side The above promotions can occur or the reverse process can also occur Demotion A word of caution The C language guaran tees any character in the machine s stan dard character set will never be negative whenused inarithmetic expressions How ever C does not specify whether variables of type char are signed or unsigned So be careful when using various bit patterns other than the standard character set because you may be dealing with negative values Later we will see how to force a type conversion using the cast operator Now that these points have been men tioned let s get back to more on expres sions As an expression is evaluated there isa precedence or order of evaluation It is important to know the order of evaluation when the different types of operators are combined in an expression especially if you want a correct result Remember the chart of the Operators available in C pre sented previously It shows the relative order level of precedence and the asso Ciativity of operators of equal precedence The associativity is given to show how expressions are evaluated if operators of an equallevelof precedence are found side by side in the same expression Since variab
150. plete for cer tain configurations Since I have recently put together a complete MAX 80 system for testing prior to sale including a hard drive I decided to dig into the difficulty Follow these steps 1 Apply the M80DVR FIX which is on the 5 3 0M disk Apply via PATCH SYS0 SYS SYSTEM M80DVR O N This will bring the driver up to Lobo s WIN product instead of the earlier UVC product 2 Apply the following patch to the SYSGEN module PATCH SYS7 SYS SYSTEM D0A 75 0300773A FOA 75 00000000 sedure for M80HD Don t a to build the BASIC ROM image onto SYSO SYS if you wantit Put the DOS onto the drive partition with head 0 4 Backup to the HD then switch to it as the SYSTEM drive Then SYSTEM SYSGEN to place a config file on it 5 Run the M80BOOT command This changes the BOOT SYS for M80 6 Apply the following FIXBOOT FIX to SYSO SYS but only to the hard drive PATCHSYSO0 SYS SYSTEMFIXBOOT O N D00 4D 21 DE 04 11 3F 1001 0700 ED BO 21 3C 10 00 D00 67 C3 94 10 7 If your hard drive has other than 4 physical heads apply the following fix PATCH SYSO0 SYS SYSTEM DOB D7 XX FOB D7 04 where XX is the number of physical heads 02 for instance 8 Move DIP switches 6 7 and 8 to the UP position BOOT from the hard drive a a re Sa Code updated en Fm MF Roy Has SuperUtility or ToolBelt ToolBox ever been updated to handle the 6 3 x directory structure i e
151. r Auto File Manager AFM AFM is a language that you can program your database ini The package consists of three integrated modules that can be called from within each other AFM Auto File Manager is the actuai data base program AFR Auto File Reporter is obviously the module that prints out your reports and AFU Auto File Utility recovers space and keeps the files integrity intact AF Mis a free form entry system which means that you can enter your data in any way you wanti You are not limited to a particular screen format In fact each record can have its own individuai display formati Really A unique feature is the ability to define the same field repeatedly within a record AFM s search routines will find every occurrence of a field within a record no matter how many times it is repeated An AFM record can be up to 4096 bytes long including fieldname information but each AFM record takes up only as much space as it needs If the record must ba expanded than more space is taken up onthe disk AFU will later allow you to recover unused space within an AFM database file The size of an AFM database file can expand to accommodate a full fifteen megabytes AF Mallows youto set printer parameters through aFORMScommand very similar to the FORMS command of many popular disk operating systems This allows you to control your repon formats Totaly independent of FORMS is a COLUMN parameter which is used for defining
152. r for source code preparation 46 which completely eliminate contorted string packing and DATA tions user commands IF THEN ELSE REPEAT UNTIL printer do not affect the sort but merely follow along may also be specified BSORT can also create an integer index array without affecting the actual orderof the elements in the sorted array For A supervisor program automates the edit compile test phases string arrays midstring parameters allow sorting based on a inherent when using compilers this makes using EnhComp portion or midstring of the key array elements BSORT goes tar almost as easy to use as your BASIC interpreter You also get beyond CMD 0 in capabllities and performance Disk Sort Utility Disk Sort Merge DSM A high speed disk virtual sorting utility that eliminates the burden of sorting from your applications software develop ment project DSM will create and maintain index files foryou Since the sort is disk virtual your only limitation is the amount of available disk space not availabla memory Sorts almost any type of field in a random access file integer Single and double precision and strings Files can have 65 535 records with an LRL up to 1024 Specify up to 24 select fields 12 for DSM51 Relations EQ LT etc may be applied to your criteria operators AND OR may be used Sort ascending or descending skip records that match a deleted racordvalue Save atempl
153. re copy or move records from one to another or automatically purge un needed records A third utility LBCONV converts to LB from pfsFILE4 Profile4 DIF dBASE II dBASE III and fixed record It also converts to DIF dBASE and tab or comma delimited files to enable easy porting of LB data to other systems Competitive Trade up policy Send in an original Table of Contents page from any existing database program and get LB Version 2 for half price That s only 49 50 S amp H Ordering Instructions Specify MS DOS and media size or TRS 80 4 version LB is priced at 99 5 S amp H US 6 Canada 7 Europe 9 Asia Pacific Rim and Australia Report generation Report generation incorporates a great degree of flexibility Your report presentation can be totally customized through print defi nition formats which you define on the screen as easily as you define the add update view screens You can truncate field data strip trailing spaces or tab to acolumn You control exactly where you want each field to appear on your report LB provides for a report header complete with database statistics database name date time andpage numbers A report footer provides subtotaling totaling and averaging for calculated dollar floating point and numeric fields print number of records printed per page and per report Many report formats can be automatically created by LB s define print autogen module You specify your pri
154. refund ifI just can t comprehend the new manual I am willing to try it My origina index page is enclosed Fm MISOSYS Inc From the description of your existing database and your desire to extract member records based on the STATUS field your solution is really quite simple Here s what you can do If you want to send a mailing to members who belong to either A or B i e their status field is either an A B AB or BA then use the sort select command 1 First specify field 10 sorted in as cending order with equal to any thing i e just ENTER this is to Cause a sort on the ZIP code Then specify AND for the next selec tion criteria 2 Next select on field one with a match string of A do NOT add it to the sort string this will select any record if the status field has an A in it The reason for the both the preceding and succeed ing asterisks are toensure the proper selection if the status field has the membership status in any order Then specify OR for the next selection criteria 3 Next select on field one with a match string of H do NOT add it to the sort string this will select any record if the status field has an H in it 4 Lastly there is no more criteria so designate an index file to use If you wish to send a mailing only to members of both the A and B groups then use an AND connective in step 3 instead o
155. remaining MSDOS related products The policy whereappli cable is to just send in an original Table of Contents page from an equivalent non MISOSYS software product with the trade in fee which is 50 of the price of our product So for LB 2 3 trade in any other database product and you can purchase LB orLB 86 for 49 50 plus S amp H How s that for a deal It doesn t matter for what system or Operating environment your trade in was designed for This offer does not extend to products re sold by MISOSYS or products on sale beee e es In this issue The long awaited re print of Earl Terwilliger s six part series on the C lan guage finally appears in this issue This C introduction should help put the language into perspective As the original series terminated prematurely after the 6th part because the LSI Journal folded perhaps I may just continue the series next time with new material on data structures and func tions Also sitting in the TMQ input box for a few years has been Rich Deglin s imple ment of an environment for LDOS and LS DOS Primarily designed for MC Rich put together stand alone DOS commands which could access the environment All the source code is on Disk Notes thus non C based programmers could intro duce the environment access to their pro grams if they so choose Rich did the code and I put together a short piece of text to present the concept of an environ ment Chris
156. rfemaleconnector which will be used to connect to the H A needs to be wired to the red side of the switch with the HD connector s red lead Before you wire that cable piece snip both the yellow lead and the black lead which is adjacent to the yellow as they will not be needed remember the H A uses only the SV sup ply snip them close to the body of the connector Now use a ten inch extension piece of wire you could get by with using the unused yellow lead previously snipped _ toextend theredlead of this cable tothe SV switch pole along with the red lead from the HD power cable I used heat shrink tubing to protect all the soldered connec tions electrical tape could be used as well The power cable going to the host adaptor can be routed as noted previously Connecting the signal cables To connect the H A te the hard drive prepare a 50 pin ribbon cable 18 inches in length with two header connectors one at each end The headers are positioned on the same side of the ribbon cable One end will be plugged into the hard drive the other into the HRD DSK DRV CON TROLLER port P4 on the host adaptor As the cable must pass over the back of the power supply CRT cage it cannot inter fere with the bracket which supports the LR Inside TMQ 22 Inside TMQ Volume VIl ii carrying handle Since the position where it wraps over the lip is exactly in that spot simply fold the portion of the cable over on i
157. rithmetic functions of multiplication division addition and subtraction respec Inside TMQ 33 Inside TMQ Volume VILit tively Since integer division in C trun cates the fractional part use the amp or modulus operator to obtain the remainder can not be applied to float or double operands Note that parentheses are also used around expressions to specify order of evaluation Watch out The C compiler can sometimes rearrange a parenthesized computation For some associative and commutative operators remember your arithmetic for and the C language does not specify the order of evaluation Use explicit temporary variables to over come this if in fact this re arrangement makes any difference Operators lt lt gt gt a gt gt 2 a shifted right by 2 bits b lt lt 4 b shifted left by 4 bits These shift operators perform left and right shifting of the bits in their operand The number of bits shifted is the right operand When an operand is shifted left vacated bits are filled with a 0 Right shifting an unsigned operand causes the vacated bits to be filled with zeros Right shiftin gasigned operand may be an arith metic or logical shift depending on the machine and the C compiler Operators lt lt gt gt ret ac lt c ret a lt c ret a gt c ret a gt c ret a c Each of these operators takes two oper ands and returns theresult of
158. rive on the outside of the cage so that youcan see its mounting holes align the front bezel of the hard drive to coincide with the bezel of the remaining floppy Mark the front to back position of the holes on the cage 3 Now slide the hard drive into the cage and check the displacement of the holes from the closed portion of the cage the drive electronics board will be adjacentto the remaining floppy holes do not line up exactly mark their displacement Typically the needed holes will be rela tively close to the existing holes a small round file will allow you to expand the existing holes to fit the mark Please re move the existing drives from the cage before using the file The same procedure can be used to ensure alignment of the holes for the 3 5 drive if you are proceeding with that change as well recommended This time re install one of the drives or install the hard drive into the closed side of the card cage and check alignment of the holes for the floppy aligning the front bezel with the front bezel of the existing drive Installing the Host Adaptor The host adaptor is a small circuit board approximately 3 625 by 6 25 in size The only available position is in the area containing the CRT power supply and video board I prefer to havea solid mount ing therefore I decided to mount the host adaptor above the power supply I chose to use 2 nylon standoffs connected to the power supply circ
159. s I found no resi due of files that don t belong there So if I m right he s maligned your product But if he s wrong On the TRS MOD134 national BBS echo have encountered hard drive owners who didn t know about your DiskDISK and SubDisk and thereby were unable to uti lize all of the storage spaceif the directory slots were full I ve told them about MISOSYS solution This shows you that I ll be in your corner as long as you have a corner And I hope you ll continue to reserve a corner for us Fm MISOSYS Inc I guess I will just have to disagree with Goben DIRCHECK will indeed de allocate any granule either not allocated to a file or belonging to a cylinder speciified with the H param eter However a properly constructed di rectory DIR SYS entry will show that an entire cylinder of granules is allocated tas when DIRCHECK analyzes such a directory it should find all granules of the directory cylinder allocated to the direc tory If you look on page 169 of THE SOURCE Volume 3 The Utilities you will find that lines 5350 through 5400 are initializing the number of granules allo cated to DIR SYS this number is the total number of granules on the cylinder DIRCHECK cannot possibly de allocate the unused allocated space beyond that actually used by the directory under these circumstances I also examined the code in my other hard disk driver implementa tions MSCSI and RSH
160. s not leave sufficient room to reach the hard drive so the easiest solution overall istousea Y poweradaptor cable I used a 12 adaptor cable Recollect that I wanted to be able to selectively power down the internal drive so that I could use the external port with another drive To isolate the hard drive from a signal stand point it is only necessary to disable the host adaptor that s the only thing seen by the computer Since the H A uses only the 5V DC supply the H A can be isolated by switching off the 5V going toit However itis just as easy to add a double pole single throw switch to disconnect both 12V and 5V going to the hard drive and host adap tor I used a Radio Shack Mini Flat Lever Switch part number 275 636 which re tails for 3 39 Using a switch gives you the ability of powering down the drive The hard drive has abouta half inch of free space above and below it since it is a 3 5 drive in a 5 25 mounting One of the locations can be used to mount a power switch on the front panel the other posi tion can be used to mount the 9 pin D Sub miniature connector used for the optional joystick All you need to do is to provide some careful drilling and filing of the plastic faceplate for the needed holes Al ternatively you can use the original 4 faceplate and add some brackets made with sheet metal to mount the switch and joystick connector that s what I did If you do not want to add a switch all you
161. sample expressions will be covered later The Operator Precedence chart is presented below Let s take a look at a sample C program which is a multiple file LIST utility The syntax for running it is LISTEM filel ext file2 ext file3 ext Each file name passed in the LISTEM command will be passed to DOS to ex ecute for each file name parameter The commands built and passed to DOS for the above example would be LIST filel ext LIST file2 ext LIST file3 ext Ste sample program below review the concepts just learned Notall of the programs statements will be clear but see how much you can understand Look ing at the comments may prove beneficial ee a a O Inside TMQ Inside TMQ Operators gt l 4 Operator Level 15 14 type amp sizeof 14 31 13 12 11 10 9 7 6 5 4 3 2 2 1 THE MISOSYS QUARTERLY spring 1993 Volume VIL ii NS een ata SRN ta recedence Table Type Primary monadic monadic arithmetic arithmetic shift relational relational bitwise logical bitwise logical bitwise logical logical logical conditional assignment assignment comma tetet 0 left to right right to left right to left left to right left to right left to right left to right left to right left to right left to right left to right left to right left to right right to left right to left right to left left to right Volume VILii THE MISOSYS QU
162. shed The exactcapability of FMAP is available for the Model 4 with our GO MTC prod uct M 33 100 at it s closeout price of 15 S amp H it s a steal because it also includes DIRCHECK FIXGAT IOMON RAMTEST and UNREMOVE Letters to MISOSYS 9 Letters to MISOSYS Volume VIL ii THE MISOSYS QUARTERLY spring 1993 Volume VIL1 To format and verify a single cylinder your best bet is Super Utility where have you been all these years SU should allow you toalso re formata floppy disk without losing any data GRASP was discontinued moons ago PowerDOT is a drawing tool using block graphics for display butcan print in graph ics mode to certain printers mostly old ones but Epson compatibility keeps you current Ce ee sscanf bug in MC Fm Richard VanHouten TEST1 CCC and TEST1 CMD illustrate the bug in sscanfQ As youcantell byrunning TEST1 it locks up when trying to scan a 2 word string using s s s I disassembled sscanf and found that it passes pointers to 2 subroutines to the main scan function one for getting characters from the buffer and the other from ungetting them I found that the get subroutine returns Ox0d when it finds end of string instead of Oxffff EOF asdocumented in the manual When sscanfQ is processing the space skip whitespace the Ox0d is considered whitespace and the program locks up try ing to get past EOF I have tried this with and without include lt ma
163. string name NAME should be in upper case text by convention The string can be anything consisting of printable ASCII characters in the range 20H 7EH To access the environment from a C pro gram it is necessary to simply supply the third argument to main For example include lt stdio h gt option ENVIRON ON extern char environ main argc argv envp int argc char argv envp In order to accomplish this feat it is necessary to revise the MCx ASM file to incorporate code which creates a global environment variable environ and in cludes the necessary pointer argument on the stack frame passed to mainQ The environment variable can be accessed through the global environment variable or through the environment pointer passed to main The option statement is a new one itallows the inclusion of the environ ment pointer initialization at the option of the programmer during the compilation of the C program Without the addition of the option ENVIRON ON statement no ad ditional initialization code is included and the environment is not accessible Note that the envp argument is typed similarly to argv itisa pointer toa pointer That s because the environment is con structed of strings in a manner identical to that of the command line arguments So if you wish your program can access the environment string by string However most use of the environment is made by accessing specific strings i e access
164. t brace which begins a block These variables can even have the same name as other variables Their dec larations supersede the identically named variables in outer blocks They exist only within the block in which they are de Clared Don t forget or confuse what you have learned previously about variable storage class and what you are learning now The above comments on variables declared within blocks hold true for exter nal variables too Now can we look at how variables can be initialized No freedom of choice is there Initializers If you would like to assign an initial value to a variable when it is defined C will aHew it AS an interesting point C does initialize certain variable classes for you If you do not specifically assign an initial value to an external or static variable C will initialize them to zero for you How ever automatic and register variables are not initialized automatically for you by C So don t count on them containing any thing worthwhile unless you specifically function or block is enter initialize or assign a value to them An equals sign and a constant expression are used to initialize simple variables Arrays and structures are initialized differently as we shall C later Here are some ex amples of simple initialization int a 5 int b c dz e 0 char g x h i y char f f int d 45 67 As you can imply this initialization saves
165. th h gt and got identical results TEST2 CCC and TEST2 CMD illustrate the bug in frndQ frndO is documented as returning a random float between 0 and 1 if passed a float 0 andto return a random float between 1 and the passed value if_ passeda float between 1 and 32767 Ihave Not tried to trace this one down Fm MISOSYS Inc Looks like we have a trade off You were right about the sscanf function Checking back to the source code the code does not match up with the comments I have included a revised copy of sscanf rel on this disk of yours You need to replace the copy in your libraries LIBC REL and MATH REL Disk NOTES will also include the relevant files Since you have to deal with LIBC which is a biggie you may need to split it into two pieces I provided a utility to do this a long time ago it is called splitlib A copy of itis also included Iam giving you a copy of the text page from the TMQ issue Split rel libraries can be re com bined with the DOS APPEND filel file2 STRIP command As far as the frndQ problem you were having itis caused by your attempt to use a single precision function in double pre cision mode The compiler float switch is quite clear on this aspect on page 3 7 where the f switch is documented It also refers you to chapter 5 where on pages 5 5 and 5 6 the matter is discussed in extreme detail What was happening was the float argument was actually being conv
166. the compari son a less than c a less than or equal toc a greater than c a greater than or equal to c a equal to c the result is TRUE or FALSE 1 or 0 The result is based upon the relationship of the two operands Note one of the more frequent errors by new C programmers is the failure to differentiate the operator from the operator The operator tests for equality while the always sets equality Inside TMQ THE MISOSYS QUARTERLY spring 1993 Operators amp 4 res a 0x01 res a amp Ox0f res a Oxf0 These operators provide C the capabilities of bit manipulations Bits of the left oper and can be ORed I ANDed amp or exclusively ORed by bits in the right operand Operators amp amp amp amp and or These operators logically connect their operands They should not be confused with the amp and bitwise operators These operators can be used to connect expres sions For example a 2 a 3 a 0 amp amp c 2 Operator a b c 1 c 2 This construct is a ternary three operator It provides an alternative to the IF THEN ELSE type logic If the expression to the left of the is TRUE then the expression immediately follow ing the is evaluated If the expression to the left of the is false then the expression after the is evaluated Operators
167. the existing con trollers and MFM drives drives with em bedded controllers started to make their way onto the scene Two types of embed ded controller protocols were ESDI and SCSI Since my host adaptor would be port compatible with the SCSI drive I decided to explore writing a driver to directly support SCSI drives The benefit ofthis would be to lower the cost do away with the controller and subsequent power consumption and take up less space for an internal installation Because of a require ment left undocumented in the Seagate SCSI Interface Manual the completion of the driver was delayed for well over 18 months Seagate proved quite elusive in the area of providing technical assistance As was noted in the VILi issue of The MISOSYS Quarterly I had finally ex tracted from Seagate the information needed to complete my SCSI hard disk driver Unfortunately the ST157N is no longer manufactured by Seagate how ever re furbished drives are available from jb TECHNOLOGIES 5105 Maureen Lane Moorpark CA 93021 800 688 0908 FAX 529 6057 for 190 You may also need a 5 25 adaptor housing I also have a small quantity of 20MB ST325N drives available for 150 My first thought of installation of the Seagate ST157N drive was a configura tion internal to the Model 4P computer That s arelatively compactunit prized by most folks owning one An un modified 4P has two half height 5 25 drives in a drive bay to the rig
168. though received the winter issue of TMQ I didn t pick up on the significance of what you were doing with the closeout prices I hope that in some way you will stay with us TRS 80 users as long as you can especiall who bought your hard drive and Sed o software and who at other times have purchased some of your fine utilities Icanadd more detail to what David Goben was saying now having read his warning against your DIRCHECK a second and then a third time He was saying that your DIRCHECK inadvertently makes gran ules within the directory available for Letters to MISOSYS 8 Letters to MISOSYS Volume VILii THE MISOSYS QUARTERLY spring 1993 Volume VIL ii accepting files Here s the way he putit in CN80 When a hard disk is formatted the unallocated granules ona directory cylin der are locked out so that files can not store data on that cylinder This is the proper thing to do The DIRCHECK program supplied with the HDPACK optimizer will note if gran ules are locked out on the directory cylin der and if it finds any it will then turn around and free them What this means is that a file can later have this freed space allocated to it and this spells trouble have difficulty believing this wouldhap pen as your DIRCHECK recognizes when it is being asked to work on a hard drive and I have to specify the H option if I want ittoproceed Further when Ilooked at my partition directory area
169. tion Programs may also make use of this space by adding additional environment strings dynamically In fact in the latest version of LB 86 I make use of the environment by storing video configura tion data which each LB86 module can access In the TRS 80 environment one can ex tend this concept of environment to set aside a block of memory whose contents can then be manipulated and accessed by a uniform set of procedures In the Model 4 environment it has been long estab lished that programs must honor the DOS high memory pointer thus reserving a portion of high memory for environment storage should be relatively safe Even in the Model IM environment the use of LDOS has fostered an atmosphere where programs honor HIGH The implementation of an LDOS andLS DOS environment provided with the pro grams routines and functions accompa nying this article were designed specifi cally for use with the MC C compiler however a programmer wishing to use the underlying concept should be able to du plicate the environment access routines Not all of the modules making up the environment package will appear in this article however all of the modules are included on the DiskNOTES corresponding to this issue of The MISOSYS Quarterly Inside TMQ 41 Inside TMQ Volume VIL ii THE MISOSYS QUARTERLY spring 1993 Volume VIL 1i Argument strings within an environment should take the form NAME string The
170. to accomplish this depending on the number and size of your data files The technique for doing this is covered in the PowerMAIL Plus Operator s Manual un der the topic Creating subfiles from a PMAILIDAT file 2 The record fielding of the ADDER file is discussed in the Technical Information section of the manual As you will see each PowerMAIL Plusrecord is contained in 128 bytes the record size Note that the manual has an incorrect value for the Data 2 field the size is 12 not 2 The ADDER file also contains an addi tional sector of data however since thisis exactly 256 bytes it can be thought of as two fictitious data records 3 You would use TRSCROSS to copy the PMAIL ADD file s as binary images That s just a mode you will specify in the TRSCROSS program 4 Once the ADDER file is moved to an MS DOS disk you can then build an LB86 database using the ADDER data file LBCONV needs to know the length of a record 128 and the type starting position and length of each field All fields with data usable by LB86 are ASCII information The length and starting posi tion of each field would be as follows Lastname 1 15 Firstname 16 10 Company 26 20 Addressl 46 20 Address2 66 10 City 76 15 State 91 8 Zipcode 99 10 Volume VILii 109 5 114 12 Data l Data2 With this set of specifications LBCONV will generate an LB database file set You would then be able to access your data
171. toDIALER for Hayes modems Z80 RELocatable Assembler The labeling disassembler produces an assembler source from in memory code or directly from a CMD type disk file Labels are generated for 16 bit references a reference is any relative instruction target address or a 16 bit target for load calf jump add or subtract instructions CALCulator gives you 4 functions at your fingertips RPNCALC gives 7 functions in bin oct dec and hex PSORT puts your PRO WAM data files in sort order EXPOR and MPORT functions allow you to move data across windows between applications and programs There s even an online HELP facility MRAS PRO MRAS An advanced Z80 assembly package for the programmer who wants a powertul and flexible development system it includes a macro assembler which generates either relocatable object code modules or CMD files directly a linker a librarian a tull screen text editor a utility for converting torom line numbered files and across reference tool for directly generated CMO files The disassembier allows you to build a screening data filetelling what segments of the program are to be interpreted as data regions You enter the addresses of the segments after analyz PRO WAM works with all programs which use standard DOS ing the target program s disassembly keyboard requests and honor the OOS high memory pointer requires one 32K RAM bank about 2K of high memory and a small piece of low RAM I
172. tructures A nice feature for a language is the ability to group variables of different types and treat them as one This grouping of vari ables called a structure in C is called a record in other computer languages Here is an example of the declaration of a sample C structure The struct keyword is used to declare a structure An optional name or tag can follow the struct keyword In this example Iused the tag of payroll The tag names the structure and can be used as a shorthand method for the complete structure declara tion For example to declare two more structures of type payroll it might be done as follows struct payroll personi person2 The variables declared in the structure are referred to as members Structure mem argv 0 or argv O 0 bers or tags can have the same name as other simple variables The C compiler can tell them apart due to the way they are used Members of a structure are refer enced as follows structure name member n a The is called the structure operator It connects the structure name to a member name Now as promised is a list of many of the most common errors found in a C pro ere er A LS Inside TMQ 40 Inside TMQ Volume VIL u THE MISOSYS QUARTERLY spring 1993 Volume VILii gram Keep these mistakes in mind as you code in C Looking out for these pitfalls will help you design a more bug free program Using
173. tself to position itas close to the bottom of the case as you can There is sufficient room for that positioning To minimize the pres sure on the cable when the rear panel is screwed into place tape a spacer onto the lip of the cage on either side of the cable I used a double thickness of ribbon cable If you have installed a header pin strip on the mainboard prepare a 12 length Us ing the edgecard it probably needs to be about an inch or two longer The connec tors are on Opposite sides of the cable As the orientation of pin 1 on the H A is Opposite to the orientation of pin 1 on the mainboard the ribbon cable will need to undergo a 180 degree twist Plug in the cables There is one screw holding the modem cover plate or blank panel onto the rear panel which is directly overhead the rib bon cable coming from the H A I recom mend you cut the length of this screw or find a shorter one so that the screw doesnot press into the cable or leave the screw out Want a joystick port If you intend on using the joystick port of the host adaptor you need to prepare a cable to extend from the hostadaptor to the mounting point Thatcable has a 9 pin D sub miniature male connector on one end and a 10 pin header connector on the other I mounted mine on a small bracket just beneath the hard drive it needed a length of 20 The cable was routed into the power supply compartment using the same cutout as the H A power cab
174. tten in machine language by the author of Super Utility this program is FAST and sorts up to 10 levels very Quickly If you keep track of names and addresses along with associated data for any situation this is the one to use Many churches organizations and businesses use PowerMail for all the different kinds of lists they need to pull from Each record has 24 user definabie flags to allow total customization for your exact needs r Form Letter Module Text Merge Create customized form letters and Labels with PowerMAIL This optional module for PowerMail allows you to create cus tomized torm letters orcustom labels lists etc with PowerMail Pius and any word processor that saves text in ASCI format Very easy to use and really gets the effect you want Allows completely definable report generating trom your PowerMail data 50 A Major Enhancement for SCRIPSIT 4 HI and I PowerSCRIPT This modification for Radio Shack s SCRIPSIT program turns it into a POWERHOUSE Our program merges with your copy of SCRIPSIT to create a new program PowerSeript allows you to add printer control codes directly in the body of your text Now itis easy to add underlining bold face the diffarent sizes of print etc Initially set up for the EPSON type dot matrix printers it is configurea bie to just about any printer during set up Ifyou have more thanone printer type then just setupa copy of PowerScr
175. uit board to provide a physical mount for the host adaptor Iused the same standoffs to mount the host adap tor above the power supply in my original external hard drive design The mounting holes in the host adaptor circuit board are in the positions utilized by the 60 watt supply of the Leadman case which is also the same mounting locations for the 38 watt Astec power supply used in the Model II The 4P of course uses the 68 watt supply which is larger and therefore does not provide existing holes in the same positions Here s where some ingenuity and daring comes into play I found that using two standoff mounts provided sufficient stability to the host adaptor In order to provide two mounting holes on both the power supply printed circuit board and the host adaptor board it is necessary to find corresponding hole locations which do not interfere with the circuit traces nor the components You must remove the power supply from its mounting panel to drill the necessary holes There are six screws three on either side which mount the power supply panel to the case Remove the screws and tilt the panel with the supply away from the case Re move the three power cables from the supply so that you can remove the panel Four screws mount the power supply to the panel Remove them and you can remove the power supply Place it on a work surface with the power connectors posi tioned towards the right Note the mylar insul
176. using LB86 You can automatically gen erate a view screen using LB s Define screen module LB s Define print module has a facility for automatically generating mailing label formats as well as form listings you can use LB Selecting amp Sorting TEESE Fm WEH Humboldt TN On June 4 1988 you shipped me item no L 50 510 Model 4 LB Data Manager and item no L 50 515 Model 4 LB Mtce Utility At about that time in my retired life I became extremely occupied with volun teer work for Lions Clubs Intemational and had no time to devote to any new computer projects I never took the above mentioneditemsoutoftheir package until a few a weeks ago I am presently main taining a mailing list of Lions members names and addresses about 1800 data sets using the label printing technique of Allwrite I cannot take all the data into memory of a Model 4 Dat onceanddo not have sorting capability My data is main tained in several files and insertions and deletions have to be done manually at the proper places Recently I decided to try to set up another data base which I maintain using Little Brother I have poured over the manual reading re reading and reading several times again trying to understand the pro cedure for setting up a data base I have concluded that LB is an extremely versa tile program and that the author of the manual undoubtedly knows a great deal about it Unfortunately it has proved ex Letters to M
177. versions are also available specify 6 3 1 F or 6 3 1 D Some Model I 5 3 1 features require lower case or DDEN adapior DOS and BASIC Reference Manuals Two new reference manuals are available from MISOSYS First we have the the 349 page LDOS amp LS DOS Reference Manual catalog number M 40 060 This single manual fully documents both LDOS 5 3 1 and LS DOS 6 3 1 in a convenient 8 5 by 5 5 format If you useone or the other or even both DOS versions you may want to bring yourself up to date with a single manual Gone are the many pages of update documentation Price is 30 plus 5 S amp H We also publish the LDOS amp LS DOS BASIC Reference Manual This 344 page book catalog M 40 061 covers the inter preter BASIC which is bundled with LDOS 5 3 1 even the ROM BASIC portion the interpreter BASIC which is bundled with LS DOS 6 3 1 and both Model J III modeand Model 4 mode EnhComp compiler BASIC One convenient 8 5 by 5 5 manual covers all four BASIC implementations for 25 plus 5 00 S amp H Since this new manual covers our compiler BASIC you can purchase the disk version of EnhComp for 23 98 _ eS ST LTC eee punt po p Rikdvkie SEREAS WU Piksar fhe DES Garabi I k TRS 80 Software and Hardware from MISOSYS Window Application Popup Z80 Assembler 8080 to Z80 Translator PRO WAM EDAS CON80Z Asourcetranslatorto help you convert your I
178. vides bank switch ing capability EXMEM handler allows for easy programming of memory bank V O MemDISK provides a one or two bank RAM disk e BANKER manages bank utilization All four modules come fully documented and are ready to instaliinto yourLDOS 5 3 system using a Model 4 computer A 128K machine is required for MemDISK DCT and the memory management facility TRS 80 Software and Hardware from MISOSYS Model M Utilities Utility Disk 1 14 utilities useful to novice and experienced LDOS users v COMP is a file and or byte for byte comparison utility v DCT allows you to view or modify the Drive Code Table v DIRCHECK checks the directory on a diskette and corrects most recoverable directory errors v MAP displays or prints the allocation granules or cylinders and sectors ol a file on a diskette V RAMTEST is a selt relocating RAM memory test v READ4O allows access to a 40T disk in an 80T drive v TYPEIN combines the functions of JCL and KSM Allows programs such as Profile 3 HD to be totally automated V UNKILL recovers files accidentally KILLed or PURGEd _ Model II Filters FILTERS This combines 23 fiers and utilities from FILTER Disks 1 and 2 with assembly source code at a clearance price v XLATE translation tor VO devices v LISTBAS print formatting tor BASIC programs v STRIP7 removes high order bit off ali characters v STRIPCNT replaces output gt 127 or lt 32 with a symbol a
179. xchange TRSTimes magazine List of Patches in this Issue Patch to Model II SAID 1 1 Procedure for booting MAX 80 from WIN Hard Drive Revised uname for MC only on Disk Notes The Blurb Volume VIL 1i THE MISOSYS QUARTERLY spring 1993 Volume VILii TMQ Index With the introduction of the TMQ Index articles and other material which has ap peared in past issues of TMQ can be ordered as a re print The index lists the number of pages associated with each re print a standard fee of 1 per page will prevail By the time you read this thes index will be available in three forms Aprintedcopy 10 4S amp H An LB Database file set on floppy disk 10 3S amp H e AnLB Database file set avail able for download from our CompuServe Forum as long as the forum remains avail able Upcoming at MISOSYS Over the past six months I have been working off and on at porting the LB86 Database Managerto the Tandy DeskMate environment that sthe MS DOS version Version 3 3 of the DM development sys tem has been used however version 3 5 has been acquired to continue the effort I am currently targeting arelease of the DM version of LBDM by summer Now Tandy has discontinuedall DeskMate development for at least a year their emphasis currently is on multimedia un der Microsoft Windows If you keep your eye on the PC marketplace you should easily see that Windows as taken over like the Blizzard of
180. xpres sions statements and blocks Remember aC statement is an expression followed by a semicolon For examples ee a 24 c getchar printf d n e 18 These are all examples of C statements Each expression is ended with a semico Inside TMQ Volume VIL ii THE MISOSYS QUARTERLY spring 1993 Volume VIL ii cause of the way the above compound if statement is indented you may be led to falsely believe that the else should be paired with the if it is aligned with An other important point to mention here deals with indentation It is generally prac ticed to have the else aligned with the if to which it belongs Thus the following is more readable lon It is used in C as a statement termina tor rather than a separator You might also note in the above example with the printf function a generalrule in C Wher ever itis permitted to use the value of some type of variable it is also permitted to use an expression of that type Hence the e 18 expression is used instead of having to assign it to some intermediate variable You can save a lot of coding using this rule but be careful You can also make if a 2 your program confusing if c 2 d 2 Whenever it is necessary to group state else ments declarations etc and treat them d 4 as one they can beenclosed in braces This createsa block or compound state ment This block
181. xtern An external variable defini Inside TMQ 28 Inside TMQ Volume VILii THE MISOSYS QUARTERLY spring 1993 Volume VILii tion appears outside of any function This actually defines the variable as external extern External variables are defined outside of any function and declared in the function which uses them Static static variables are stored in a fixed memory space They can be external or internal in nature When declared to be internal in nature they are like auto vari ables except they remain in existence in their fixed space External static variables are global in nature but are only accessible within a single C source program Static variables represent private permanent storage Register register variables are stored in machine registers They are used to store heavily used variables in order to improve performance of the C program Here is a sample of some variable defini tions and declarations auto int c extern char b register ri static xl As you Can see the storage class and data type can be used to specifically determine the properties of a variable Expressions functions and operators Functions in C are analogous to subrou tines in other programming languages They conveniently group commonly used expressions together Frequently used logic instructions instead of being typed in multiple times throughout the body of a program need only be typed in once as
182. y Cabie 26 1069A 26 1080 internal floppy Cabie 26 1080 A internal floppy Standby Power System 200VA HD Controiier Adaptec 4010A HD Controiier Xebec S1421A HD Controiler WO1002S SHD T80 to SCSI host adaptor PC Compatible Hardware ZOFAX 96 24 Fax Modem PC XT AT Infochip Systems Expanzi PC DJ10 Tape Backup PC DJ20 Tape Backup PC AB11 Tape Adaptor PC KE10 External tape adaptor case PC Tadiran TL 5296 AT 6V lithium battery The Fine Print 4 00 C 4 50 D 5 00 E 5 50 Freightcodes A 3 50 B H MM 020 H MM 040 R HD 020 R HD 040 R HD i40 H FD 2EX H FD CO4 H RC PM4 H HD CT4 H HD Co4 H FD 2NG H FD 2GA H FD 24P sold out H HD CA4 H HD CX2 H HD CW2 H HD MHA R Z1 FAX R iC EXP R TD D10 R TO D20 R TD A11 R TD Ki0 R P8 TL6 40 00 50 00 VVNBD OMA NnngOgD ADD WNOMAADA F 6 00 G 7 00 H 12 00 7 varies Allunmarked are 3 00 each Canada Mexico add 1 per order Foreignuse US rates times 3 for alr shipment Virginia residents add 4 5 Sales tax We accept MasterCard and VISA Checks must be drawn on a US bank COD s are cash money order or certifled check add 5 for COD See eh ae H Volume VIL ii THE MISOSYS QUARTERLY spring 1993 Volume VI ii Table of Contents The Blurb TMQ IdE siini Upcoming at MISOSYS s 000 Points tO Ponder sesssessssssssessse Trade in Policy sssssesssecsesess In this 1
183. your favorite C compiler Pointers Arrays Structures and Common Errors Could you use some POINTERS on how to STRUCTURE better C programs Oh You thought when you read the word POINTERS and the word STRUCTURE that this part would really be discussing techniques for improving your C code Ha Well OK not to disappoint you included in this part is a discussion of the most common errors or things not to do in aC program Will that help i P inters and Arrays Youjustsaw anexpression pt r Were you puzzled Remember back when the and operators were introduced It was stated that added one to its operand eres See z ee SEN ee ce aen RRUAN Draenen EAER asaan Paras oe eee Soe Soh oO See ses aaa subtracted one from its operand Be careful applying this to pointers The one referred to which is added to or subtracted from a pointer is actually a scale factor This scale factor is dependent on the type the pointer points to That means it is scaled by a size equal to the data type length This holds true for all pointer arithmetic For example in a Z80 based machine the scale factors are 1 for char 2 for int There are some rules to follow when doing arithmetic in C using pointers It is legal to add an integer to or subtract an integer from a pointer subtract a pointer from a pointer compare a pointer to another p
Download Pdf Manuals
Related Search
Related Contents
BEDIENUNGSANLEITUNG Polycom CX 300 User Guide User Manual ISB665-1327-01-English Manual VRC8 Universal Learning Remote Control User Manual CONTENTS YOD-CEN. 2. Composición cualitativa y cuantitativa. En 슬라이드 1 - NovusAuto.com IG SURODOR FRAISE MALABAR - FT Copyright © All rights reserved.
Failed to retrieve file