|||||| |||||| || || |||||| |||||| || || ||| || || || || ||| |||| |||||| || |||| Your || || || || ||| || || |||||| |||||| || || |||||| |||||| GEnieLamp Computing || |||||| || || |||||| RoundTable || || || ||| ||| || || || |||||| |||||||| |||||| RESOURCE! || || || || || || || ||||| || || || || || ~ WELCOME TO GENIELAMP A2Pro! ~ """"""""""""""""""""""""""" ~ Going Loopy ~ ~ Optimizing Integer Division ~ Variant Records ~ ~ Inside XMODEM ~ Tour of 8/16 Central ~ ~ HOT NEWS, HOT FILES, HOT MESSAGES ~ (and 100% technobabble free!) ////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ GEnieLamp A2Pro ~ A T/TalkNET OnLine Publication ~ Vol.4, Issue 16 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" Editor.......................................................Nate Trost Publisher.................................................John Peters Copy-Editor............................................Bruce Maples \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\//////////////////////////////////// ~ GEnieLamp IBM ~ GEnieLamp ST ~ GEnieLamp [PR] ~ GEnieLamp Windows ~ ~ GEnieLamp A2Pro ~ GEnieLamp Macintosh ~ GEnieLamp TX2 ~ ~ GEnieLamp A2 ~ LiveWire (ASCII) ~ GEnieLamp MacPRO ~ ~ Solid Windows ~ Config.sys ~ A2-Central ~ ~ Member Of The Digital Publishing Association ~ GE Mail: GENIELAMP Internet: genielamp@genie.geis.com FTP: sosi.com ////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ >>> WHAT'S HAPPENING IN THE APPLE A2Pro ROUNDTABLE? <<< """"""""""""""""""""""""""""""""""""""""""""""""""""""" ~ June 1, 1994 ~ FROM MY DESKTOP ......... [FRM] HEY MISTER POSTMAN ...... [HEY] Notes From The Editor. Is That A Letter For Me? A2PRO ROUNDTABLE STAFF .. [DIR] TOUR OF 8/16 CENTRAL .... [TOU] Directory of A2Pro Staff. Great Programmers Magazine. LIBRARY BIT BONANZA ..... [LIB] DEVELOPERS CORNER ....... [DEV] HOT Files You Can Download. News From Online Developers. LOG OFF ................. [LOG] GEnieLamp Information. [IDX]""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" READING GEnieLamp GEnieLamp has incorporated a unique indexing """"""""""""""""" system to help make reading the magazine easier. To utilize this system, load GEnieLamp into any ASCII word processor or text editor. In the index you will find the following example: HUMOR ONLINE ............ [HUM] [*]GEnie Fun & Games. To read this article, set your find or search command to [HUM]. If you want to scan all of the articles, search for [EOA]. [EOF] will take you to the last page, whereas [IDX] will bring you back to the index. MESSAGE INFO To make it easy for you to respond to messages re-printed """""""""""" here in GEnieLamp, you will find all the information you need immediately following the message. For example: (SMITH, CAT6, TOP1, MSG:58/M530) _____________| _____|__ _|O__ |____ |_____________ |Name of sender CATegory TOPic Msg. Page number| In this example, to respond to Smith's message, log on to page 475 enter the bulletin board and set CAT 6. Enter your REPly in TOPic 1. A message number that is surrounded by brackets indicates that this message is a "target" message and is referring to a "chain" of two or more messages that are following the same topic. For example: {58}. ABOUT GEnie GEnie's monthly fee is $8.95 which gives you up to four hours """"""""""" of non-prime time access to most GEnie services, such as software downloads, bulletin boards, GE Mail, an Internet gateway, multi-player games and chat lines. GEnie's non-prime time connect rate is $3.00 an hour. To sign up for GEnie, just follow these simple steps. 1. Set your communications software to half duplex (local echo) 8 bits, no parity and 1 stop bit, at 300, 1200 or 2400 baud. 2. Call (with modem) 1-800-638-8369. Upon connection type HHH. 3. Wait for the U#= prompt. Type: JOINGENIE and hit RETURN. When you get the prompt asking for the signup/offer code, type: DSD524 and hit RETURN. 4. Have a major credit card ready, as the system will prompt you for your information. If you need more information, call GEnie's Customer Service department at 1-800-638-9636. SPECIAL OFFER FOR GEnieLamp READERS! If you sign onto GEnie using the """""""""""""""""""""""""""""""""""" method outlined above you will receive an *additional* six (6) free hours of standard connect time (for a total of 10) to be used in the first month. Want more? Your first month charge of $8.95 will be waived! Now there's no excuses! *** GET INTO THE LAMP! *** """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" [EOA] [FRM]////////////////////////////// FROM MY DESKTOP / ///////////////////////////////// Notes From My Desktop """"""""""""""""""""" o TOP OF THE PAGE >>> TOP OF THE PAGE <<< """"""""""""""""""""""" LIONS AND TIGERS AND GSBUG, OH MY! Putting the June Lamp together has """""""""""""""""""""""""""""""""" proven to be quite a challenge! A2Pro has been quiet as of late. I would suspect that many people were occupied with the same thing I had to deal with this month--the end of school. Whew, well, finals, nice weather and all that aside, we do have a nice, if slightly brief GEnieLamp for you this month. Below you'll find a rather wide mix of conversation ranging from FOR-NEXT loops in Applesoft BASIC to patching IIGS Toolbox calls. Be sure and check out some of those Internet digests described in the library column, they can be rather entertaining! Until next month, try not to crash TOO often... Nate Trost GEnieLamp A2Pro [EOA] [DIR]////////////////////////////// A2PRO ROUNDTABLE STAFF / ///////////////////////////////// By Nate Trost [A2PRO.GELAMP] ______________________________________________ APPLE II PROGRAMMERS & DEVELOPERS ROUNDTABLE _____ ______ ______________________________________________ /_____|/______\ /__/|__| ___|__| /__/_|__| /_____/ Your Sysops: Greg Da Costa (A2PRO.GREG) /________|/__/ __ __ __ Todd P. Whitesel (A2PRO.TODDPW) /__/ |__|__/______ /_//_// / Nathaniel Sloan (A2PRO.HELP) /__/ |__|________// / \/_/ Nate Trost (A2PRO.GELAMP) [*][*][*] [EOA] [HEY]////////////////////////////// HEY MISTER POSTMAN / ///////////////////////////////// Is That A Letter For Me? """""""""""""""""""""""" By Nate Trost [A2PRO.GELAMP] o BULLETIN BOARD HOT SPOTS o WHAT'S NEW o PROGRAMMER'S TIPS o MESSAGE SPOTLIGHT >>> BULLETIN BOARD HOT SPOTS <<< """""""""""""""""""""""""""""""" [*] CAT11, TOP22, MSG{1}..............Patching The Apple IIgs Tool Box [*] CAT15, TOP6, MSG{100}...............................Event Manager [*] CAT17, TOP2, MSG{19}............................XMODEM and YMODEM [*] CAT36, TOP3, MSG{183}................Rumors, Wishes and Vaporware [*] CAT36, TOP10, MSG{173}.................................ORCA/Pascal [*] CAT36, TOP11, MSG{184}......................................ORCA/C >>> WHAT'S NEW <<< """""""""""""""""" NIFTY LIST DATA FOR 6.0.1 I just thought everybody would like to know """"""""""""""""""""""""" that file #4095 is now available in the library. It's Dave Lyons' NList.Data update for System 6.0.1 and allows you to use Nifty List with all of the new tool calls and such. (type m530;3 to get to the library, followed by 6 to download a file and 4095 for the file number. :-) (A2PRO.HELP [ Sloanie ], CAT1, TOP30, MSG:95/M530) RPROGRAMINFO RESOURCE I'm about to upload the completed documentation and """"""""""""""""""""" Rez type definition for rProgramInfo, version $0000. It is unchanged since the last discussion on it a couple of months ago. It should be available by tomorrow, if all goes well. I hope everyone starts to use it! I will be adding rProgramInfo resources to all my programs as soon as possible (some already have them, actually). (POWERPC.PRO [Sheppy], CAT16, TOP13, MSG:219/M530) >>> PROGRAMMER'S TIPS <<< """"""""""""""""""""""""" IMPLEMENTING XMODEM I'm playing around with writing some code to do """"""""""""""""""" simple Xmodem (Checksum). I ran all around GEnie looking for good info, but didn't find a whole lot. Before I explain where I'm at, let me warn you that I've never done ANYTHING with protocols, so I'm starting from a pretty clueless point. What I did find allowed me to start a transfer and get most of the packets, but I'm running into a glitch at the end. As I understand it (and this seems correct from my experiments) each packet of data in a standard Xmodem transfer is 128 bytes. This is prefaced by $01 (SOH), followed by a block count and a one's compliment of the block count. Finally at the end of the packet is one byte for the checksum. So what we have is a total of 132 bytes coming in. Correct so far? Now what I was doing was grabbing the first three bytes (and displaying them so I could see that the numbers were coming in right) and then waiting for 129 bytes before sending an ACK. So far this worked. I used a straight text file as a D/L experiment and displayed each packet as it came in (in another window, seperate from the block clount), and everything was coming in great until the final packet. I had thought that the final packet would be padded to 128 bytes if it was smaller, but each time I tried it died at the same point, showing me that 67 bytes had come in. So my next thought was that there was an EOF char in byte 66 of that last packet, but that turned out to be just a RETURN ($13). How exactly am I supposed to determine that the final data packet has been sent? Thanks for any help! (Just wait till we get up to Binary II decoding!) Update: Apparently I was doing something wacky last night because I re-wrote the code and GEnie did infact send all -128 byte- data packets like I expected. NOW, it appears that the last packet was padded with a bunch of $192s. So what remains at this point is to find out how many of those $192s are pads (I assume it's possible that any of the last chars of the data packet could in theroy be $192). Is there a byte hidden in that last packet that gives me the length? Also, I still don't know how to tell that the last packet has been sent. Further Update: I took a shot that might be the magic byte I was looking for and it was, I can now tell the end of the file. However I still have the dogone $192s. Am I right in thinking that these should be NULLs? (HANGTIME [Tyrant], CAT17, TOP2, MSG:19-21/M530) <<<<< Hangtime, there is no way to tell in Xmodem what the exact length """"" of the file is. The standard practice is to pad the last block with ^Z's. ASCII 192 isn't a ^Z, so I'm not sure what you're seeing. Just about every implementation of XModem I've ever seen just saves the file with the ^Z's still in it at the end. The way to tell if the transfer is over is if the last character in the packet is a ^Z. As you can see, this leaves it open for a few problems as to length, etc., but that's where Binary II and MacBinary come in... Dave (JUST.DAVE, CAT17, TOP2, MSG:22/M530) >>>>> The standard (which one? ;) says to pad blocks with $1A (^Z) as """"" Dave said. And, as you came up with later on, a transfer finishes when the receiver gets an EOT ($04) or CAN ($18). The indeterminate length is yet another reason for Binary IIs popularity. Originally, ASCII Express used an extension to XMODEM to preserve the Apple II file information. In the DOS days, if you received a dummy first block of SOH+128 ($81) and block number of $00, then following the EOT at the end would be a dummy file info record as returned from DOS 3.3s file manager. When the ProDOS version of AE Pro appeared, it sent the ProDOS _GetFileInfo result parm block instead. There was some handshaking between the EOT and the dummy info block too, just to make sure it all went through OK. Regards, Richard (You'll be wanting to know the XMODEM-CRC, XMODEM-1K and XMODEM-4K changes next!) (RICHARD.B [Richard], CAT17, TOP2, MSG:23/M530) XMODEM CHECKSUMS I do have a problem with xmodem 128. I do quite well in """""""""""""""" getting and sending the SOH, blk#, $FF-blk# and the 128 bytes of data, but I just can't get the checksums right (both checksum and CRC) First, when I calculate them, which byte should I get out first? Bits 15-8 or 7-0? And which of them is called most significant byte? In my case I sent 15-8 first Now to the checksum. I think I have to add all bytes, one after the other, the result is the checksum then, right? So I coded it like this: int calcks (char *data, int count) { int cks = 0, i; while (--count >= 0) { cks = cks + ((int) *data & 0xFF); ++data; } return (crc); } Alex (A.CORRIERI [Alex], CAT17, TOP2, MSG:24/M530) >>>>> Here is the simple checksum function out of Joe Campbell's _C """"" Programmer's Guide to Serial Communications_: unsigned short x_sndcksum (char *buff) { static int chksum, i; for (cksum = i = 0; i < 128; ++i) cksum += *buff++; return (cksum % 256); } The receiving checksum function is similar. Let me know if you need it. CRC is a whole chapter in Campbell's book. This is an excellent book by the way. If you can find it in your library, check it out. It is also available in many bookstores having a decent selection of computer programmming books. David (D.WALLIS2, CAT17, TOP2, MSG:25/M530) <<<<< Thanks for the example. """"" now to validate: when I send a block of "a"'s then the checksum is: 128 * 97 = 12416 ^ ASCII(a) still the other end reports a checksum error, and when resending the block it goes wild on many other things. So obviously something else is wrong Alex (A.CORRIERI [Alex], CAT17, TOP2, MSG:28/M530) >>>>> Alex, since I have JUST been reading the specs I am pretty much as """"" lost as you, but IF I understood the specs correctly then the problem is you're using too much information. The checksum is (I believe) only one byte, so as you add the hex values you toss the carry. I'll stop there and hope that someone with a better understanding comes along. (HANGTIME [Tyrant], CAT17, TOP2, MSG:29/M530) <<<<< HangTime is correct. The checksum is the addition of all the data """"" bytes in the block, and you only send the least significant byte (if you're doing assembly, just toss the carry as you're adding; if you're using a higher language, take the number modulo 256). Dave (JUST.DAVE, CAT17, TOP2, MSG:30/M530) >>>>> > ..if you're using a higher language, take the number modulo 256. """"" In this specific case, it's faster to use a bitwise operation. (I don't remember if the optimizer will do this for you or not. I don't think so.) From C: checksum = (checksum + newByte) & 0x00FF; From Pascal: checksum := (checksum + newByte) & $00FF; This is one program where the speed you get from a dumb trick like this could really help. After all, you gotta keep up with all that data flowing in! Mike Westerfield (BYTEWORKS, CAT17, TOP2, MSG:31/M530) FOR-NEXT LOOP LIMITS In Applesoft BASIC, is there a limit on the number """""""""""""""""""" of nested For-Next loops one can have? I have been trying to write a program that has as many as 15 nested loops in one area and I keep getting a "Out of memory" error when the interpreter gets near the 9th or 10th one. Is there a good manual on the market that defines these limits? I gave a lot of mine away when I gave away my Apple II and replaced with a IIGS, fool that I was. John W. Butler (J.BUTLER7, CAT9, TOP7, MSG:122/M530) <<<<< According to the "Applesoft BASIC Programmers' Reference Manual" """"" (one of the official Apple programming books, published by Addison-Wesley), you may only nest FOR/NEXT loops up to 10 layers deep. I'd suggest finding a copy of this book (Resource Central should have it, and possibly a local bookstore might have a copy they want to get rid of) if you want to do much Applesoft programming. It covers just about everything, and has a handy reference card, too. (T.BUCHHEIM [ Tim 'pi ], CAT9, TOP7, MSG:123/M530) >>>>> John, you can get around this limitation by using "counter """"" variables" for the outermost layers of your loops. For example: 100 Z1 = 1: Z2 = 1: Z3 = 1 110 FOR Z4 = 1 TO 100: FOR Z5 = 1 TO 100: FOR Z6 = 1 TO 100 120 (do routine) 130 NEXT: NEXT: NEXT: Z3 = Z3 + 1: IF Z3 > 100 THEN Z3 = 1: Z2 = Z2 + 1: IF Z2 > 100 THEN Z2 = 1: Z1 = Z1 + 1: IF Z1 > 100 THEN 150 140 GOTO 110 150 (continue program) This isn't nearly as efficient as using FOR-NEXT loops, obviously. This is why you reserve your 10 permissible FOR-NEXTs for the innermost loops, which change =many= more times than the outer ones do. Note that in my above example Z1 increments only 100 times while Z6 increments 1 trillion times! TomZ (T.ZUCHOWSKI, CAT9, TOP7, MSG:126-127/M530) FAST DIVISION I know how multiplication, division, and modulo by powers """"""""""""" of two can be done quickly and how multiplication by an arbitrary constant can be broken down into shifts and adds. Can division and mod be broken down somehow? I just figured out how division is done. I think in p/q, you keep shifting the high bits of p into a new number. At each shift, you compare to q. If greater or equal, you subtract q from the "new number" and shift a one into the answer, else shift a zero into the answer. The only optimization I could figure out for a hard coded q is that you could initially shift by a certain number of bits. Like, if dividing by 5 (101), you could shift 3 bits of p out before doing a compare, but this doesn't buy much. Jay (JAY.KRELL, CAT11, TOP8, MSG:47/M530) <<<<< Indeed division can be broken down into shifts and subtractions. """"" I'll leave the explanation to one of our local mathematics wizzes (sp?) (mainly because it would take me ages to figure it all out again :( ), but you should try and get hold of an old book called "6502 ASSEMBLY LANGUAGE SUBROUTINES" by Lance A. Leventhal and Winthrop Saville. (ISBN 0-931988-59-4) It provides 6502 assembly code for multiplication and division, and other such wonders. (RICHARD.B [Richard], CAT11, TOP8, MSG:48/M530) >>>>> Jay, even easier: take the source for the ORCA divide and unwind """"" the loop. For some specific constants, you can, of course, do better. In some cases, subtract is even a good option! (For example, in some graphics programs, you might know the answer will be a very small number.) Did you have a specific constant in mind? Mike Westerfield (BYTEWORKS, CAT11, TOP8, MSG:49/M530) >>>>> The answer to the question you actually asked is a research item """"" for optimizing compilers. Division by a constant cannot be decomposed in the same way as multiplication by a constant, because the instruction stream for division changes based on the value you have at each point, whereas the instruction stream for multiplication can be arranged to depend on only one of the operands (so we make him the constant). It is possible to rewrite the division in terms of a fixed-point multiplication by the reciprocal of the divisor, but you need a double precision multiply that gives you the high half of the product and this is sometimes too expensive to beat a standard division algorithm pumped by unrolling and such. Todd Whitesel (A2PRO.TODDPW [growf?], CAT11, TOP8, MSG:50/M530) >>> MESSAGE SPOTLIGHT <<< """"""""""""""""""""""""" I said I'd dig around and come up with some source that shows how I patch tools (the tool itself, not the dispatch vector) Well, here it is. This is part of a PIF on my system which patches the Event Manager so that the default event queue is 16k (I hate overflowing the queue, and there is no legal way to determine the queue size... aurgh!) This is in Merlin-16 format. PatchEM phb ;save entry data bank php ;save entry 'rupt status phk ;stack my code bank plb ;and use as data bank * * Load tool(s) that will be patched * (could load several here) * pea $0006 ;EventManager tool number pea $0302 ;minimum version desired _LoadOneTool ;load it up bcs :BadVer ;Oops... * * Verify tool versions are one(s) expected * (and not psbly a later version) * pha ;result space _EMVersion ;get the real version number pla and #$0FFF ;keep valid bits cmp #$0302 ;is it ver 3.02? bne :BadVer ;no, time to quit * * I usually install a rqst proc here * bra :GetPtr ;go do the patching * * Something is wrong, err loading the * EM, EM version error, duplicate IPC * (which prevents duplicate patches!) * :BadVer lda #-1 ;boolean true sta 6,s ;tell OS to unload me bra :Die ;and exit now * * Here's the fun stuff! * Get pointer to the FPT * :GetPtr pha ;long result pha ;space is needed pea $0000 ;System FPT desired pea $0006 ;Event Manager tool number _GetTSPtr ;Get pointer to the FPT * phd ;save current DP tsc ;lay the DP tcd ;over the stack sei ;put off as long as possible... * * Patch FPT for new StartUp handler * ldy #$000A ;index EMStartUp function (hi) lda [$03],y ;get hi word of entry sta Chain1+3 ;stuff into my exit JML * lda ^#DoOn ;hi word of my routines entry sta [$03],y ;stuff into the FPT * dey ;idx low entry point pointer dey * lda [$03],y ;get EMStartUp entry low inc ;cnvt to real adr sta Chain1+1 ;stuff into my exit JML * lda #DoOn-1 ;my codes entry point sta [$03],y ;stuff into the FPT * * Obviously other tools in the set could * be patched here in the above manner * * * Lock in the changes * _SetDefaultTPT * * Clean up direct page and stack * pld ;restore entry Dpage pla ;pop off old stuff pla ;that was a DP plp ;restore the 'rupts * * Usually I have a _ShowBootInfo call here * (falls into :Die, a common exit routine) * * This exit point is used when aborting * the patching operation. The Unload * flag (on the stack) has been set. * :Die plb ;restore entry data bank rtl ;back to the boot! This method isn't quite what Apple describes in TN #101 (Patching the Toolbox) but the net end effect is the same, and it works fine on both ROM_01 and ROM_03 machines. (at least with System 6.0.1, which what I use, and which most of my stuff requires). -Harold (H.HISLOP [Harold], CAT15, TOP1, MSG:83/M530) [*][*][*] While on GEnie, do you spend most of your time downloading files? If so, you may be missing out some excellent information in the Bulletin Board area. The messages listed above only scratch the surface of what's available and waiting for you in the bulletin board area. If you are serious about your Apple II, the GEnieLamp staff strongly urge you to give the bulletin board area a try. There are literally thousands of messages posted from people like you from all over the world. [EOA] [DEV]////////////////////////////// DEVELOPER'S CORNER / ///////////////////////////////// News From The A2Pro Online Developers """"""""""""""""""""""""""""""""""""" By Nate C. Trost [A2PRO.GELAMP] >>> ONLINE SUPPORT IN A2PRO <<< """"""""""""""""""""""""""""""" CAT TOP COMPANY === === ======= 29 INDEPENDENT DEVELOPERS ONLINE 2 DYA/DigiSoft Innovations Online 8 Simplexity Software Online 14 Quality Computers Q-LABS Online 20 DreamWorld Software Online 26 METAL/FV Software Online 32 Kitchen Sink Software Online 38 EdIt-16 (Bill Tudor) 30 PROCYON, INC. 31 SOFTDISK PUBLISHING 33 GS+ MAGAZINE 34 JEM SOFTWARE 35 PRODEV, INC. 36 THE BYTE WORKS Each month this column feature highlights and news from various developers who provide support via A2Pro. >>> NEWS FROM THE BYTE WORKS <<< """""""""""""""""""""""""""""""" PROJECT MANAGER IDEA Comments are pretty different, though, Joe. I still """""""""""""""""""" think it's weird that C programmer's comment out the entire program. ;) Seriously, the big problem with scanning comments is the same as scanning the regular include information for each language: it requires language sensitive parsing. If you're doing language-dependent modules anyway, you might as well go the extra step and grap the information that's already in the file. Scanner's of that level are not difficult to write, it's just that you need one for each language, and a way to add new ones. I'm not likely to do that in the near future. On the other hand, there does seem to be a lot of interest in this. From here to the end of the message, I'm just speculating -- even moreso that usual for this topic. :) Would there be enough interest in a project manajer to make it worthwhile to create a complete, stand-alone project manager? Here's a possible set of features: 1. Simple desktop interface for adding/removing/compiling/setting flags for files. 2. Stand-alone app that could run from the text shell or from PRIZM. I expect it could run from GNO, too. 3. Automatically build dependency lists for C, Pascal, assembly, and Modula-2. Forget Integer BASIC, and all of the non-commercial add-on languages. FORTRAN would be added when available. 4. Capable of _building_ a project without entering the graphic interface part. In plain terms, you could build a project with a simple shell command. You use the graphcis interface solely to change the project, as in adding new files or changing flags. 5. This is really stretching it, but the project manager could also be a structured browser, displaying dependencies between modules. It might even display function dependencies. I dunno... is there any interest in such a beast? Would it make you more likely to get a 2.1 update for $10 when it is available? Would you pay real cash dollars for this as an add-on utility? Mike Westerfield (BYTEWORKS, CAT36, TOP3, MSG:189/M530) PASCAL TYPE-CASTING I have tracked down a somewhat weird problem in my """"""""""""""""""" program involving the bit 0 optimizer. When unoptimized or bit 1, 2 where set, the following worked fine. where^ := byte(13); after writing some other data to a buffer pointed to by where, I wanted to end the steam with a simple return. As said above only the intermediate code peephole optimizer did fail (at run time); that is another value than 13 was passed (probably 0, havn't checked) now I changed the line to where^ := 13; So what does this optimizer do? Or what other type casting rules aren't allowed here? Alex (A.CORRIERI [Alex], CAT36, TOP10, MSG:175/M530) <<<<< Alex, the compiler should not allow you to make a mistake like: where^ := byte(13) but it is actually a mistake. Type casting in ORCA/Pascal is _not_ a data conversion operation. Pascal has built-in functions for that. Type casting is an instruction to the compiler to treat one kind of data as if it were a different kind. In the case of a constant, this just doesn't make sense -- you can always give the constant in the correct format or use a data conversion function. With 13, there is no need, so lets look at a better example: let's assume where is a character pointer, rather than a byte pointer. In that case, using the dta conversion function chr is correct: where^ := chr(13) Using type casting is not correct: where^ := char(13) {unnecessary, ugly, & not supported} I'll tighten up the error checking, but you should just stuff 13 in without the type cast. Save type casts for situations like this one, where x is, say, a character variable: where^ := byte(x) This makes sense the way type casting is implemented: You are telling the compiler that you _know_ x is not A byte, but that you want the compiler to treat it as if it is a byte for this operation. Mike Westerfield (BYTEWORKS, CAT36, TOP10, MSG:177/M530) OFFSET INTO RECORD I am looking for a "trick" in Pascal to get the offset """""""""""""""""" into a record. This is an example of what I'm trying to do: I have a record with 5 different sized strings. A sort routine needs to sort a list ctl with respect to one of these 5 strings (user-selected at run time). If I can record an offset into the record, the same sort procedure could be easily used to sort a list for this type of record (or any other size/type of record that contains strings- the ultimate goal). MIKE: IMHO, this would be a good ORCA specific routine to add in an upgrade. A call that will return the offset into a record- kinda like SizeOf returns the size of the entire record... you supply the particular item you desire the offset of, the procedure returns the offset. e.g.,: aRecord = record anInt : Integer; aString : String[ 10]; aByte : byte; end; VAR theRec : aRecord; GetOffset( theRec.aByte) would return 14. Rick (R.ADAMS48, CAT36, TOP10, MSG:179/M530) <<<<< Rick, assuming you have a variable somewhere (preferably a global """"" one; it will make things more efficient), you can get the offset like this: offset := ord4(@myRec.aByte) - ord4(@myRec); Mike Westerfield (BYTEWORKS, CAT36, TOP10, MSG:180/M530) VARIANT RECORDS I don't remember in which topic we were discussing update """"""""""""""" suggestions, but since this one concerns Pascal, here goes: I think it would be useful to be able to override variables within objects as well as methods. Of course, the compiler would require a variable of the same size, but the variable could be different. This would be particularly useful for objects that contain objects: Anobject = object ( tObject) winObj : FatherObj; end; NextObject = object ( Anobject) winObj : SonObj; override; end; I've tried to think of all the things that would cause this to be impossible, and could solve all of the "down" sides, but I don't know the "inner workings" so could be missing something. I already have an application in mind for such an implementation. Is it possible? Rick (R.ADAMS48, CAT36, TOP10, MSG:182/M530) >>>>> Overriding variables is not necessary. You can create a variant """"" record and use the variant record inside the object. Also, I hesitate to add features to a programming language, especially Pascal, when there is another way to accomplish the same thing. The discussion of new features was in topic 3. Mike Westerfield (BYTEWORKS, CAT36, TOP10, MSG:183/M530) <<<<< Ah, yes. Variant records. Can you tell that I've never really """"" used that useful feature before? :) Now's the time to learn. Thanks, Mike. Rick (R.ADAMS48, CAT36, TOP10, MSG:184/M530) >>>>> You haven't really used variant records much? Wow! How do you do """"" much toolbox work w/o at least a variant record type for splitting/combining words in a longword? :) (BTW, I got this from Mike Westerfield's Pascal books..don't think I could come up with this on my own :) type convert = record case boolean of true: (long: longint); flase: (lsw,msw: intgeger); end; Then you can use things like this: menuID := convert(eventRecord.taskData).msw; menuItemID := convert(eventRecord.taskData).lsw; (T.BUCHHEIM [Tim 'pi], CAT36, TOP10, MSG:185,87/M530) .SYM REBUILD RULES Could you explain the rules for rebuilding the ORCA/C """""""""""""""""" .sym files, and especially the conditions upon which the compiler decides to delete this file without saving a new one. I am working on a desktop program for which ORCA/C consistently deletes the .sym file when it exists and creates it when it does not (that is, for the first compile, it saves it, and for the next one, it deletes it). As a test, I compiled that program twice in a row without making any changes to it (I didn't even edit it), and ORCA/C surely deleted the .sym file in the second compile (it wrote it in the first one). My compilation is not using any options (ie, it is just COMPILE PROG.CC). As this program is a desktop one, the .sym file is huge (about 150 KB), so this deletion is frustrating at best. Of course, this does not happen for all programs. As Murphy's law dictates, it works fine for a non-desktop program where there are only one or two files included, and thus a fairly small .sym file. This problem is occuring everytime with this particular program, even after reboots and power downs, but I have already seen it happen with other programs of mine (I believe they were all desktop ones, ie with a large set of files included) more or less randomly (ie when I was not expecting it, as I didn't change the stuff which I think is written in this file). I am currently using ORCA/C 2.0.2 A1 you uploaded some time ago, but this also happened in 2.0.1 (not sure about 2.0) under ORCA/shell 2.0.3 (I believe that's the latest one). Philippe (P.MANET1 [Philippe], CAT36, TOP11, MSG:191/M530) <<<<< Philippe, ORCA/C uses the following rules for .sym files: """"" 1. If one is found, it is examined and a source code fragment is compared with the source in the .cc file. Assuming they match, any information in the symbol table up to that point is used. If they do not match, the .sym file is rejected. 2. If no .sym file is found, one is created. 3. If a .sym file is rejected, all information previous to the rejection is used. The .sym file is deleted, so it will be recreated on the next compile. 4. In addition to differences in source code, the following can cause the compiler to reject a .sym file: a. A write error when writing the .sym file. b. A change in the date of a .h file between when the .sym file was created and when it is being used. c. Use of the -r flag from the compile command. Mike Westerfield (BYTEWORKS, CAT36, TOP11, MSG:192/M530) THREE-BYTE INTS IN C I hitting major constraints in ORCA/C. Namely, I """""""""""""""""""" need to deal with tables of addresses minus 1 and two and three byte addresses. ORCA/C 2.0.2A1 doesn't allow any of the following in constant address (ie: initializing) expressions: subtracting one (for rtl'able addresses) >> 16, to get the bank / 0x10000, to get the bank storage into a word, for breaking up 3 byte addresses cast to unsigned int, for breaking up 3 byte addresses. For all of these, I'm dealing with addresses of functions. Sometimes I use the & operator, sometimes I don't. It should be optional. I need to deal with 3 byte addresses, banks of addresses, and addresses minus 1 in initializers. These are constant expressions in ORCA/M. I need them in C. Thanks, Jay (JAY.KRELL, CAT36, TOP11, MSG:205/M530) >>>>> Jay, three byte integers (except as bitfields) don't exist in C. """"" To do what you want with function addresses, you need to make sure the identifiers are declared and then cast them to (long) or (unsigned long) before you try to add, subtract, shift, mask, etc. The C language specifies this requirement, so ORCA/C is just obeying the standard. If you want to get the raw value of a pointer, you _must_ cast it to an integral type. If you don't the compiler has to assume you want pointer arithmetic (which is far more common in portable code, naturally enough) and that has many restrictions on it because it can be used reliably in all standard C environments. Todd Whitesel (A2PRO.TODDPW [growf?], CAT36, TOP11, MSG:206/M530) <<<<< I didn't try first casting to long. I'll have to try that. I know """"" C has no 3 byte type. One thing that didn't work that I thought should is initializing a "static" int to a pointer cast to an int. ORCA/C does not allow some compile time casts. It might be acting correctly, just not the way I want it to. I already modified the assembly code to work with what ORCA/C can do. int i; unsigned long j= (unsigned long) &i; /* this works */ unsigned int jj= (unsigned int) 0x12345678L; /* this works */ unsigned int k= (unsigned long) &i; /* this does not */ unsigned int kk= (unsigned int) &i; /* this does not */ unsigned int jk= (unsigned int)((unsigned long)&i); /* this does not */ You can cast a pointer to a long and a long to an int, but you cannot cast a pointer to an int, via long or directly. -- Jay (JAY.KRELL, CAT36, TOP11, MSG:207-208/M530) >>>>> Jay, the one thing in common with the cases that don't work is that """"" the relocation type of the initialized variable is the low 16 bits of the label, like you'd get with normal absolute addressing. Maybe Mike can tell us if there is a reason why those relocations can't be used by variable initializers. Todd Whitesel (A2PRO.TODDPW [growf?], CAT36, TOP11, MSG:209/M530) <<<<< Jay, you can already turn optimization on or off for an individual """"" subroutine. Because optimizations often span large chunks of code and frequently affect things that must work in pairs (like the entry and exit code for a function) I do not plan to change the optimizer so you can turn optimizations on or off inside of a function. As for the initializers, in the example you cited in message 208, I don't see any reason offhand why they would not all work. Some of the C rules for initializers are, shall we say, arbitrary though. I'll have to look at the code offline before I try to give a definitive answer. I'll file that message as a bug report and get back to you when I can. Mike Westerfield (BYTEWORKS, CAT36, TOP11, MSG:210/M530) MODULA-2/PASCAL DIFFERENCES General Modula-2 question about the """"""""""""""""""""""""""" difference between Pascal and M2. I'm translating some programs as part of the LTP Modula-2 class and find that the following is legal in Pascal: type values = 0..27; {legal code numbers} alpha = 'A'..'Z'; {alphabetic characters} var base: values; {base number} code: array[values] of alpha; {decode array} And the following is illegal in M2: TYPE values = [0..27] ; (* legal code numbers *) alpha = ['A'..'Z'] ; (* alphabetic characters *) VAR base: values ; (* base number *) code: ARRAY [values] OF CHAR ; (* decode array *) The M2 compile complains about "values" being in the ARRAY declaration saying that "expression must contain constant operands only". Well... it does, sort of. Officially "values" is a TYPE, but it is a subrange TYPE that contains only constant operands. I could recode this to use CONSTants like LoValue and HiValue in the TYPE and VAR declarations. Is this the more proper M2 thing to do? ------------------------------------------------------------------------- With indexCh declared as the subrange ['A'..'['], my attempt to translate Pascal's SUCC function to the Modula-2 INC function got the following: 37 : indexCh := INC (indexCh) ; ^ illegal size of operand (implementation restriction) Is this restriction going to go away soon or do I have to make up a type that is the subrange and use VAL and ORD to simulate the SUCC? (J.BOUCHARD3 [JAB], CAT36, TOP13, MSG:68/M530) <<<<< Try: """"" code: ARRAY values OF CHAR; In Modula-2, you don't use the '[' ']' characters around a subrange that is used as an array dimension. This seems a little odd to me, perhaps due to my Pascal background. Since [ and ] are used around the original subrange (they are not used there in Pascal) it sort of makes sense from a character- substitution standpoint. > ...my attempt to translate Pascal's SUCC function... I _think_ this is a bug. I could not duplicate the same error you found, though. Could you send a complete program for me to examine? Mike Westerfield (BYTEWORKS, CAT36, TOP13, MSG:69/M530) LOGO STRANGENESS Hi, everyone. My name is Jack Wilson. I'm new to """""""""""""""" GEnie, and also just started using 3D LOGO. I'd like to meet anyone else out there using it - exchange programs, ideas, problems, whatever. I've come up with several questions so far: 1. In the LOGO manual it says the __GO "name__ command will look for the matching __LABEL "name__ statement, but when I tried the following: TO TestGo GO "S5 SHOW "Step1 SHOW "Step2 LABEL "S3 SHOW "Step3 SHOW "Step4 GO "XYZ LABEL "S5 SHOW "Step5 LABEL "XYZ SHOW "STOP END it appears a __GO__ command causes a jump to the first __LABEL__ in the routine, regardless of whether the 'names' match or that there is a matching 'name' further down in the routine. Do I have something wrong? 2. I haven't been able to get the menu commands such as CHECK or DISABLE to work. I tried them in the form CHECK "File "Open but it doesn't do anything. (AJ.WILSON [Jack], CAT36, TOP32, MSG:125/M530) <<<<< The problem with GO is a bug. If you would like, I can e-mail a """"" fix. If you prefer some other way of getting the fix, give me a call. Without seeing your program, I can't be 100% sure, but I suspect that the problem with the Check command is that the menu name in most desktop programs has spaces around the name, and your command didn't. What you probably wanted to use was: check "\ File\ "Open It's subtle, I admit. I thought this was a bug in Logo until I looked closely! Mike Westerfield (BYTEWORKS, CAT36, TOP32, MSG:126/M530) [EOA] [TOU]/////////////////////////////// TOUR OF 8/16 CENTRAL / ////////////////////////////////// The Great Programmers Magazine """""""""""""""""""""""""""""" Chris Budewig [K.FLYNN] A full directory of all files on each issue of 8/16 and 8/16-Central can be found in file #3382 (ESC.INDEX.BXY). A condensed directory of the contents of this issue is included below. The code letters in parentheses next to each item mean: S : Source code -- what you need to create a program X : Executable program -- you can run this directly! D : Documentation -- tells how the program works and what to do with it A : Article -- explains a subject and probably the source code that demonstrates it >> 8/16-Central - July, 1991 - File #3426 << """""""""""""""""""""""""""""""""""""""""""" /ES.CENTRAL.9107/ ..About.This.Disk Introduction and complete catalog listing ..Contents Table of Contents ..Columns/ ....WhatsNew About the latest in the world of Apple II ....HyperLab/ (A) Nexus, a different kind of hypermedia program ....VaporWare Murphy Sewall's industry snapshot ..Q.And.A/ ....GE.TT GEnie TechTalk - Copyrighting your programs, deciding where to put machine language routines to be called from Applesoft, and displaying PaintWorks Plus/Gold animation sequences ....AOL.TT America Online TechTalk - In Search Of LZW compress/decompress routines, generating random numbers, disassembler programs, and accessing forked files from P8 ..Apple.II/ ....FrontEnd/ (SXA) Assembly source you can use to make a ProSel- like 'front end' for your own programs ....AWP.2.TXT/ (SXAD) An ampersand utility that allows you to read AppleWorks word processor (and text) files from within your Applesoft program ..Apple.IIgs/ ....Icons/ (SXA) Using Alert and Icon Resources with ORCA/C (under System 5) ....Animation/ (SXA) GS Animation secrets - some basic animation techniques ..nexus.read Nexus run-time program - for the demo of Nexus ..ES.CENTRAL.NXS A Nexus file to connect the text in this issue This month's HyperLab is a review a Nexus, a different kind of hypermedia program. Included in this issue is the run-time program which allows you to see Nexus in action. All of the articles in this issue have been linked together with the link file (stack?) ES.CENTRAL.NXS. Just launch Nexus.Read and open the file Contents to get started. Derek Young gives a would-be animator a few pointers on how animation works and what to do to make it happen. He talks about such basic animation techniques as screen addressing, drawing shapes, preserving the background, moving shapes, avoiding flicker, and scrolling text. >> 8/16-Central - August, 1991 - File #3427 << """""""""""""""""""""""""""""""""""""""""""""" /es.central.9108/ ..About.This.Disk Introduction and complete catalog listing ..Contents Table of Contents ..Columns/ ....WhatsNew The latest in the world of Apple II - A review of the APEX Programming Environment by Microgram ....HyperLab/ (SXA) HyperStudio scripting tip & a date/time XCMD ....VAPORWARE Murphy Sewall's industry snapshot ..Q.And.A/ ....LETTERS Readers Write - 8/16 Central subscription problems ....AOL.TT America Online TechTalk - Looking for the fastest way to update a window's contents ....GE.TT GEnie TechTalk - Setting standards for debug info ..Apple.II/ ....Scroller/ (SXA) Scrolls any rect on the 80-column screen ....Dungeon/ (SXA) Second in a series on adventure game program- ming - includes world building, English to computer, objects and non-player characters, the main event loop, and winning the game ....MENU.S (S) Unsure of what this goes with - seems to be the driver code for an 8-bit menuing system ..Apple.IIgs/ ....CALCMASK/ (SXA) The CalcMask call is neat, but what can it do? Ken Burtch shows you ....DInfo/ (SXA) Using DInfoGS to get info about the devices in your system - used to find a printer device ..Goodies/ ....FastAnim/ (SXD) User toolset for animation on the SHR screen ....APPLE.M.08 A monospace font resembling Apple's text characters It's the fight of the century! The duel of a lifetime! ... OK, maybe it's not THAT big a deal, but the Scroller article was submitted by Randy Brandt as a way to speed up DLT8 whose author, Karl Bunker, then solved the same problem a completely different way. Call it 'A Tale of Two Programmers?' Anyway, this assembly language utility can be used for scrolling any portion of the 80-column screen up or down. You know how there are some tool calls that seem to be pretty cool, but somehow you were never really sure what you could do with it? CalcMask isn't just useful as the basis of a paint program's lasso tool, it can be used for replacing one color in a picture or overlaying one picture on top of another! [EOA] [LIB]////////////////////////////// LIBRARY BIT BONANZA / ///////////////////////////////// HOT Files You Can Download """""""""""""""""""""""""" By Tim Buchheim [T.BUCHHEIM] >>> comp.sys.apple2 <<< """"""""""""""""""""""" File # 4136 CSA2PROG.22.BXY (ALL) Uploaded on 5/20/94 by B.TAO About 40K (d/l time approx. 4 minutes @ 2400 baud) Digest of messages from the comp.sys.apple2.programmer Usenet newsgroup, for the week ending May 19, 1994. This week's highlights (total of 51 messages): o Help me out!!? Boot block help? o How do I implement a scrolling menu? o Reading resources from external file File # 4135 CSA2GNO.22.BXY (GS) Uploaded on 5/20/94 by B.TAO About 36K (d/l time approx. 3 minutes 36 seconds @ 2400 baud) Digest of messages from the comp.sys.apple2.gno Usenet newsgroup, for the week ending May 19, 1994. This week's highlights (total of 51 messages): o How do I set the speed greater than 19,200 baud? o Screen blanking idea??? o alternate shells for Gno o lpr/lpd problem o using signals File # 4134 CSA2SUBJ.22.BXY (ALL) Uploaded on 5/20/94 by B.TAO About 6K (d/l time approx. 36 seconds @ 2400 baud) Subject listing for the comp.sys.apple2, csa2.comm, csa2.marketplace, csa2.gno, csa2.programmer and csa2.usergroups digests for the week ending May 19, 1994. File # 4133 CSA2PROG.21.BXY (ALL) Uploaded on 5/20/94 by B.TAO About 27K (d/l time approx. 2 minutes 42 seconds @ 2400 baud) Digest of messages from the comp.sys.apple2.programmer Usenet newsgroup, for the week ending May 8, 1994. This week's highlights (total of 33 messages): o ADB device programming QUESTION! o Looking for SmartPort info o Some Basic Prodos Questions o freeing memory File # 4132 CSA2GNO.21.BXY (GS) Uploaded on 5/20/94 by B.TAO About 30K (d/l time approx. 3 minutes @ 2400 baud) Digest of messages from the comp.sys.apple2.gno Usenet newsgroup, for the week ending May 8, 1994. This week's highlights (total of 39 messages): o Bug found in TMTerm 1.1 (don't use it!) o Screen Savers and GNO o using signals File # 4131 CSA2SUBJ.21.BXY (ALL) Uploaded on 5/20/94 by B.TAO About 6K (d/l time approx. 36 seconds @ 2400 baud) Subject listing for the comp.sys.apple2, csa2.comm, csa2.marketplace, csa2.gno, csa2.programmer and csa2.usergroups digests for the week ending May 8, 1994. File # 4130 CSA2PROG.20.BXY (ALL) Uploaded on 5/20/94 by B.TAO About 50K (d/l time approx. 5 minutes @ 2400 baud) Digest of messages from the comp.sys.apple2.programmer Usenet newsgroup, for the week ending May 1, 1994. This week's highlights (total of 61 messages): o 8bit programming still done? o Looking for SmartPort info/HS SCSI Card Tech Ref o Making Libraries in ORCA/C v2.0 o ORCA/C bug list version 2.1 o scrolling with TaskMaster File # 4129 CSA2GNO.20.BXY (GS) Uploaded on 5/20/94 by B.TAO About 40K (d/l time approx. 4 minutes @ 2400 baud) Digest of messages from the comp.sys.apple2.gno Usenet newsgroup, for the week ending May 1, 1994. This week's highlights (total of 51 messages): o DRWM 2.0 - what would YOU like to see? o Screen Savers and GNO o Xlogin beeping? o using signals File # 4128 CSA2SUBJ.20.BXY (ALL) Uploaded on 5/20/94 by B.TAO About 6K (d/l time approx. 36 seconds @ 2400 baud) Subject listing for the comp.sys.apple2, csa2.comm, csa2.marketplace, csa2.gno, csa2.programmer and csa2.usergroups digests for the week ending May 1, 1994. File # 4101 CSA2PROG.19.BXY (ALL) Uploaded on 5/1/94 by B.TAO About 11K (d/l time approx. 1 minute 6 seconds @ 2400 baud) Digest of messages from the comp.sys.apple2.programmer Usenet newsgroup, for the week ending Apr 24, 1994. This week's highlights (total of 15 messages): o Making Libraries in ORCA/C v2.0 o NSC Help Needed o how to patch shoutdown ?? o scrolling with TaskMaster File # 4100 CSA2GNO.19.BXY (GS) Uploaded on 5/1/94 by B.TAO About 23K (d/l time approx. 2 minutes 18 seconds @ 2400 baud) Digest of messages from the comp.sys.apple2.gno Usenet newsgroup, for the week ending Apr 24, 1994. This week's highlights (total of 37 messages): o Screen Savers and GNO o Slip for GS? o lpr problem o problem with .printer driver File # 4099 CSA2SUBJ.19.BXY (ALL) Uploaded on 5/1/94 by B.TAO About 3K (d/l time approx. 18 seconds @ 2400 baud) Subject listing for the comp.sys.apple2, csa2.comm, csa2.marketplace, csa2.gno, csa2.programmer and csa2.usergroups digests for the week ending Apr 24, 1994. File # 4098 CSA2PROG.18.BXY (ALL) Uploaded on 5/1/94 by B.TAO About 22K (d/l time approx. 2 minutes 12 seconds @ 2400 baud) Digest of messages from the comp.sys.apple2.programmer Usenet newsgroup, for the week ending Apr 17, 1994. This week's highlights (total of 30 messages): o Non-Blocking I/O in ANSI C? o Printer Driver in Develop? o Programing contest o Spazzing the system during errors File # 4097 CSA2GNO.18.BXY (GS) Uploaded on 5/1/94 by B.TAO About 34K (d/l time approx. 3 minutes 24 seconds @ 2400 baud) Digest of messages from the comp.sys.apple2.gno Usenet newsgroup, for the week ending Apr 17, 1994. This week's highlights (total of 46 messages): o DRWM 2.0 - what would YOU like to see? o GNO/SI and Orca/C problems... o Where is the header file for lgnoasm o hashing the shell in drwm??? File # 4096 CSA2SUBJ.18.BXY (ALL) Uploaded on 5/1/94 by B.TAO About 5K (d/l time approx. 30 seconds @ 2400 baud) Subject listing for the comp.sys.apple2, csa2.comm, csa2.marketplace, csa2.gno, csa2.programmer and csa2.usergroups digests for the week ending Apr 17, 1994. >>> Miscellaneous <<< """"""""""""""""""""" File # 4140 COLOR.CUBE.BXY (GS) Uploaded on 5/25/94 by AJ.WILSON About 2K (d/l time approx. 12 seconds @ 2400 baud) This program creates a movie of a rotating cube. It uses the perspective mode to draw a solid cube, with each side a different color, rather than the wire-frame stereoscopic view. It requires Byteworks' 3D LOGO to run. File # 4124 APATCH.BXY (GS) Uploaded on 5/15/94 by JAY.KRELL About 38K (d/l time approx. 3 minutes 48 seconds @ 2400 baud) apatch is a set of easy to use but poorly documented routines for patching the toolbox. An example in C is included that might make up for the lack of docs. Let me know if you need help using the routines, and be careful patching the toolbox. Assembly object code is included, but C object code is not. File # 4112 RPROGINFO.BXY (GS) Uploaded on 5/10/94 by POWERPC.PRO About 10K (d/l time approx. 1 minute @ 2400 baud) Documentation of, and Rez type definition for, the new rProgramInfo resource type (resource type $C004). The contents of this archive will allow you to create programs that other programs can look at to learn useful things about the program, including memory usage, required system software version, and information about system features used by the program. File # 4109 GSBF.BXY (GS) Uploaded on 5/7/94 by JAY.KRELL About 3K (d/l time approx. 18 seconds @ 2400 baud) GSBug crashes in a number of reentrant situations. This tiny init fixes one of those situations, X-ing over code that calls DebugStr. File # 4095 NLDATA6.0.1.BXY (GS) Uploaded on 4/30/94 by DAVE.LYONS About 39K (d/l time approx. 3 minutes 54 seconds @ 2400 baud) This version of the NList.Data file is up to date with System Software 6.0.1. Use it with the Nifty List v3.4 CDA or anything else which uses the file. [EOA] [RTC]////////////////////////// RTC WATCH / ///////////////////////////// Bits and Pieces from A2Pro Real Time Conferences """""""""""""""""""""""""""""""""""""""""""""""" By Tim Buchheim [T.BUCHHEIM] >>> Seeding Random Number Generators <<< """""""""""""""""""""""""""""""""""""""" Well, how can I generate a random # from 1 to 16 without having to enter a seed? Jeff - With any random number generator, you need to enter some kind of seed at some point. (else you'll always get the same numbers back. You must enter a seed. I'd suggest using the clock Use a Tick count? Yeah, the clock. Yep, _GetTick is great for a seed. Hard to duplicate the exact Tick at runtime B-)> Tick would be a good source of a seed, as would be the number of ticks between two given user keyboard events. (even more random as human nervous system delay is involved >>> Playing with the ORCA shell <<< """"""""""""""""""""""""""""""""""" But ProLine has a cooler shell. I'd like to be able to set ORCA's prompt to the current path. That would be spiffy :) (In ProLine, you can have it so that when the prompt is shown, the current prefix is accessed and displayed for the user). Brian: ahh. with some aliases, you could do that in ORCA :) How, Tim? Brian: by having an alias which will catch "prefix" commands and set the "prompt" variable Tim --- Ah! Make a 'prefix' alias :) yep :) Tim: I do that in Unix, but I could not figure out how to get the text to place into the prompt variable in Orca Bill: hmm...that could be hard :) I'm not sure :) I would have to look it up :) hmm..the easiest way to do it would probably be to write a utility to set the prefix which also sets the prompt variable at the same time. wouldn't be too hard, I'm sure then change the PREFIX entry in SYSCMD to "U" instead of "C" and put the utility in the utilities prefix [EOA] [LOG]////////////////////////////// LOG OFF / ///////////////////////////////// GEnieLamp Information """"""""""""""""""""" o COMMENTS: Contacting GEnieLamp o GEnieLamp STAFF: Who Are We? GEnieLamp Information GEnieLamp is published on the 1st of every month """"""""""""""""""""" on GEnie page 515. You can also find GEnieLamp on the main menus in the following computing RoundTables. RoundTable Keyword GEnie Page RoundTable Keyword GEnie Page """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" DigiPub DIGIPUB 1395 Atari ST ST 475 Macintosh MAC 605 IBM PC IBMPC 615 Apple II A2 645 Apple II Dev. A2PRO 530 Macintosh Dev. MACPRO 480 Geoworks GEOWORKS 1050 BBS BBS 610 CE Software CESOFTWARE 1005 Mini/Mainframe MAINFRAME 1145 Programming PROGRAMMING 1445 Data Comm. DATACOMM 1450 Windows WINDOWS 1335 GEnieLamp is also distributed on CrossNet, Internet, America Online, Delphi and many public and commercial BBS systems worldwide. o To reach GEnieLamp on Internet send mail to genielamp@genie.geis.com o Our Internet anonymous FTP address is: sosi.com. All current versions of GEnieLamp are available in the ~/pub/GEnieLamp directory. Due to the added expense involved, we ask that when you get GEnieLamp via the anonymous ftp for GEnieLamp, that it _not_ be ftp'd during the hours of 9AM and 5PM Eastern Standard Time. We appreciate your cooperation in this matter. o Current issues of all versions of GEnieLamp are File Requestable (FREQable) via FidoNet (Zones 1 through 6) from 1:128/51 and via OURNet (Zone 65) from 65:8130/3. SysOps should use the following "magic names" to request the current issue of the indicated GEnieLamp platform: Platform Magic Name To Use """""""" """"""""""""""""" GEnieLamp IBM .................. GLIBM GEnieLamp ST ................... GLST GEnieLamp A2Pro ................ GLA2PRO GEnieLamp Macintosh ............ GLMAC GEnieLamp TX2 .................. GLTX2 GEnieLamp A2 ................... GLA2 GEnieLamp Windows .............. GLWIN o Back issues of GEnieLamp are available in the DigiPub RoundTable Library #2 on page 1395 (M1395;3). o GEnieLamp pays for articles submitted and published with online GEnie credit time. Upload submissions in ASCII format to library #42 in the DigiPub RoundTable on page 1395 (M1395;3) or Email it to GENIELAMP. On Internet send it to: genielamp@genie.geis.com o We welcome and respond to all E-Mail. To leave comments, suggestions or just to say hi, you can contact us in the DigiPub RoundTable (M1395) or send GE Mail to John Peters at [GENIELAMP] on page 200. o If you would like to meet us "live" talk to us every Wednesday night in the Digi*Pub Real-Time Conference, 9:00 EDT (M1395;2). o The Digital Publishing RoundTable is for people who are interested in pursuing publication of their work electronically on GEnie or via disk-based media. For those looking for online publications, the DigiPub Software Libraries offer online magazines, newsletters, short-stories, poetry and other various text oriented articles for downloading to your computer. Also available are writers' tools and 'Hyper-utilties' for text presentation on most computer systems. In the DigiPub Bulletin Board you can converse with people in the digital publishing industry, meet editors from some of the top electronic publications and get hints and tips on how to go about publishing your own digital book. The DigiPub RoundTable is the official online service for the Digital Publishing Association. To get there type DIGIPUB or M1395 at any GEnie prompt. >>> GEnieLamp STAFF <<< """"""""""""""""""""""" GEnieLamp o John Peters [GENIELAMP] Publisher/Editor """"""""" IBM o Bob Connors [DR.BOB] EDITOR """ o David C. Leithauser [D.LEITHAUSER] HyperRead Editor o Brad Biondo [B.BIONDO] IBM Staff Writer o David Holmes [D.HOLMES14] IBM Staff Writer o Nancy Thomas [N.NOWINSON] IBM Staff Writer o Don Lokke [D.LOKKE] Cartoonist Windows o Tippy Martinez [WIN.LAMP] EDITOR """"""" o Brad Biondo [B.BIONDO] Windows Staff Writer o John Osarczuk [J.OSARCZUK] Windows Staff Writer MACINTOSH o Richard Vega [GELAMP.MAC] EDITOR """"""""" o Tom Trinko [T.TRINKO] Mac Staff Writer o Robert Goff [R.GOFF] Mac Staff Writer o Bill F. Martin III [W.MARTIN3] Mac Staff Writer o Ricky J. Vega [GELAMP.MAC] Mac Staff Writer ATARI ST o John Gniewkowski [GENIELAMP.ST] ST EDITOR """""""" o Mel Motogawa [M.MOTOGAWA] ST Staff Writer o Sheldon Winick [S.WINICK] ST Staff Writer o Terry Quinn [TQUINN] ST Staff Writer o Richard Brown [R.BROWN30] ST Staff Writer o Al Fasoldt [A.FASOLDT] ST Staff Writer o Fred Koch [F.KOCH] ST Staff Writer o Sandy Wolf [S.WOLF4] ST Staff Writer ATARI ST/TX2 o Cliff Allen [C.ALLEN17] EDITOR/TX2 """""""""""" ATARI [PR] o Bruce Faulkner [R.FAULKNER4] EDITOR/GEnieLamp [PR] """""""""" APPLE II o Doug Cuff [EDITOR.A2] EDITOR """""""" o Tara Dillinger [TARA] Co-Editor o Phil Shapiro [P.SHAPIRO1] A2 Staff Writer o Mel Fowler [MELSOFT] A2 Staff Writer o Darrel Raines [D.RAINES] A2 Staff Writer o Gina E. Saikin [A2.GENA] A2 Staff Writer o Steve Weyhrich [S.WEYHRICH] A2 Staff Writer A2Pro o Nate Trost [A2PRO.GELAMP] EDITOR """"" o Tim Buchheim [T.BUCHHEIM] Co-Editor ETC. o Jim Lubin [J.LUBIN] Add Aladdin/Scripts """" o Scott Garrigus [S.GARRIGUS] Search-ME! o Bruce Maples [B.MAPLES] Copy Editor o Mike White [MWHITE] (oo) / DigiPub SysOp o Susie Oviatt [SUSIE] ASCII Artist \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\//////////////////////////////////// Bulletin board messages are reprinted verbatim, and are included in this publication with permission from GEnie and the source RoundTable. GEnie, GEnieLamp Online Magazines, and T/TalkNet Online Publishing do not guarantee the accuracy or suitability of any information included herein. Opinions expressed are those of the individual, and do not represent opinions of GEnie, GEnielamp Online Magazines, or T/TalkNet Online Publishing. Material published in this edition may be reprinted under the follow- ing terms only. Reprint permission granted, unless otherwise noted, to registered computer user groups and not for profit publications. All articles must remain unedited and include the issue number and author at the top of each article reprinted. Opinions present herein are those of the individual authors and do not necessarily reflect those of the publisher or staff of GEnieLamp. We reserve the right to edit all letters and copy. Please include the following at the end or the beginning of all reprints: \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\//////////////////////////////////// (c) Copyright 1994 T/TalkNET Online Publishing and GEnie. To join GEnie, set your modem to 2400 baud (or less) and half duplex (local echo). Have the modem dial 1-800-638-8369. When you get a CONNECT message, type HHH. At the U#= prompt, type: JOINGENIE and hit the [return] key. When you get the prompt asking for the signup code, type DSD524 and hit RETURN. The system will then prompt you for your information. Call (voice) 1-800-638-9636 for more information. ////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ [EOF]