--------------- FIDO MESSAGE AREA==> TOPIC: 239 C LANGUAGE Ref: EGZ00016 Date: 12/29/97 From: BOB STOUT Time: 10:39pm \/To: SIMON AVERY (Read 2 times) Subj: Pritty Lites... On , Simon Avery (2:255/90@fidonet) wrote: LS> Where do I get peekb() and pokeb() and are they freeware? > Ahh... So much for my aspirations of portability. Just checked and they're > both Borland-specific. Does anyone else know of a similar thing Leslie > might be able to use? Simon... In case you missed my reply to Leslie, portable versions are in SNIPPETS. See PCHWIO.H and PCHWIO.C. --- QM v1.00 * Origin: MicroFirm : Down to the C in chips (1:106/2000.6) --------------- FIDO MESSAGE AREA==> TOPIC: 239 C LANGUAGE Ref: EGZ00017 Date: 12/29/97 From: BOB STOUT Time: 10:41pm \/To: KURT KUZBA (Read 2 times) Subj: HOW2: Manipulate GIF/JPG On , Kurt Kuzba (1:154/750@fidonet) wrote: RS> I'm not surprised. If anyone had ever made embedded Ami controllers, I'd RS> be using one. > Just out of curiosity, are there many embedded controllers based on the > 6502/6510 processors? I enjoyed the simplicity of the instruction set on > those, and find the x86 series to be unnecessarily complicated to maintain > legacy code. Kurt... There were a few, but I made quite a comfortable living for a number of years by embedding Apple II motherboards. Some of the places I put them were in a pipe inspection system (for oil drilling pipe), various pieces of dedicated production test equipment, and a even a fetal ultrasound monitoring system. Unfortunately for this conversation, I programmed them all in 6502 assembly. > The C compilers for the 6510, such as the Commodore 64 seemed to compile o > a very compact and well ordered form, along with having a less obstructed > instruction set to work with in the first place. The Commodore magazines > all said that C was the wave of the future. Who knew? They're all gone and > C is just taking center stage. :) Ah, speak of topicality and there it is! ;-) At the time I worked with them, the only native code compilers were Orca/C and Aztec C/65. I had Aztec since it was cheaper, but never seriously used it in any of my jobs. What I did use was a great little compiler for old Apple integer basic, which I hand-tweaked using the intermediate assembly. The biggest problem inherent in 6502 C compilers was the 256-byte stack. It was usually impractical to use it as the program stack, in which case, another stack had to be implemented somewhere else in software. Later variants of the 6502 (e.g. the 65816) overcame this problem, but by then the chip had been eclipsed by other designs. > Maybe they'll make a 64-bit system with a simple IS and scrap all the old > code and start fresh. Rumors exist. Who knows? The next generation Intel/HP chip (Merced) will finally abandon the x86 architecture, although it will continue to support it in software emulation. Although all I know about it comes from confidential sources with signed NDA's, one good indicator is to look at HP's PA-RISC chips of this decade, which are actually quite nice. The PA-RISC and MIPS architectures are among my favorites in current technology. Of the technologies available at the time of the original IBM-PC design, the NSC 16xxx and 32xxx architechture was also quite nice - regular and orthogonal, even better than the 68xxx series. Of course, it had the handicap of being a NSC product and, as Jon Guthrie once said, " When it comes to CPU's, National Semiconductor couldn't sell everlasting life!" --- QM v1.00 * Origin: MicroFirm : Down to the C in chips (1:106/2000.6) --------------- FIDO MESSAGE AREA==> TOPIC: 239 C LANGUAGE Ref: EGZ00018 Date: 12/29/97 From: BOB STOUT Time: 11:06pm \/To: DAMIAN WALKER (Read 2 times) Subj: H On , Damian Walker (1:2502/666) wrote: > I take it someone's already mentioned the large number of superfluous > letter H's that appear in your messages? They are usually at the eginning > of each line, but formatting mucks that up. Damian... I've noticed that myself, but mostly in replies originating in Zone 2. Without further information, I continue to assume that it's either a mail reader or ZoneGate problem. Perhaps if those who see this could drop me some private mail indicating what mail reader they're using, the mystery could be solved. BTW, I answered this in the Echo, rather than in NetMail, because many of my outbound international NetMail messages seem to disappear into black holes when they hit the ZoneGates. Inbound Netmail seems to work. It's probably a problem with my setup (which basically hasn't changed for almost a decade), triggered by external changes in the network over time. However, email is such a reliable alternative, I've been loath to invest the time to track it down. --- QM v1.00 * Origin: MicroFirm : Down to the C in chips (1:106/2000.6) --------------- FIDO MESSAGE AREA==> TOPIC: 239 C LANGUAGE Ref: EGZ00019 Date: 12/28/97 From: KLAUS MAHLMANN Time: 01:43pm \/To: TORBJORN KRISTOFFERSEN (Read 2 times) Subj: problem Hallo Torbjorn! Am 26.12.97 schrieb Torbjorn Kristoffersen folgendes zum Thema "problem" an All: TK> When I run this code and type in a string like : "hello" then the TK> hexvalue of "hello" is printed on my screen as "olleh". TK> code: TK> int i; TK> char a[220]; TK> printf("Text: "); TK> gets(a); TK> for(i=0;i { TK> printf("%x",a[i]); TK> } With two different compilers (ICC for OS/2, BCC4.52 for DOS), compiling the above source gives an EXE that produces: D:\TEMP\TEST>test Text: hello 68656c6c6f which is what you should expect. TK> What's wrong here.. ? Nothing?!? Tschuess, Klaus Disclaimer: The opinions expressed are solely those of the author. And are most probably wrong anyway. --- FleetStreet 1.18+ * Origin: Paradatec GmbH (2:241/550.40) --------------- FIDO MESSAGE AREA==> TOPIC: 239 C LANGUAGE Ref: EGZ00020 Date: 12/29/97 From: SUNIR SHAH Time: 04:38pm \/To: DARIN MCBRIDE (Read 2 times) Subj: In Message DM> [Hey, if Sunir ain't here no more, someone has to fill his spot...] Yeah, well, I've come back to haunt.... I really have to get back into Fido sometime... Or watch TV. Don't mind me, I'm just back home for winter holidays. I'm going back to Ottawa shortly. SS --- Maximus 3.01 * Origin: Heat of the Night, Deep River, Ontario, 613-584-1752 (1:241/17) --------------- FIDO MESSAGE AREA==> TOPIC: 239 C LANGUAGE Ref: EGZ00021 Date: 12/24/97 From: ANTHONY TIBBS Time: 11:57am \/To: SIMON AVERY (Read 2 times) Subj: Very large executables with BC45? BB>>> This is much less sophisticated than yours, but compiles BB>>> down to 2 KB in PCC:- AT>> Yep, PCC generates great code. SA> "Slow" "Buggy" and "limited" - but surely not "great"! "Yep, PCC generates TIGHT code." --- PointEd 2.0 * Origin: The Tibbs' Point - Ottawa, Ontario, Canada (1:163/215.38) --------------- FIDO MESSAGE AREA==> TOPIC: 239 C LANGUAGE Ref: EGZ00022 Date: 12/24/97 From: ANTHONY TIBBS Time: 11:58am \/To: TREVOR DENNETT-THORPE (Read 2 times) Subj: Pointer to a string TD> test_str[] = "This is a test"; TD> ... TD> ... TD> clr_string(/* need to pass the location of test_str to function TD> /*); TD> ^ What would I put here as an arg? char *, char &??? TD> My guess is I do that with a pointer. I don't know a damn thing about TD> pointers!! Could someone help me out here, please? DOS and I'm not bothered about ANSI portability!>. Thanks. I've done the same thing, and nothing has to be done differently. --- PointEd 2.0 * Origin: The Tibbs' Point - Ottawa, Ontario, Canada (1:163/215.38) --------------- FIDO MESSAGE AREA==> TOPIC: 239 C LANGUAGE Ref: EGZ00023 Date: 12/30/97 From: KURT KUZBA Time: 04:25am \/To: LESLIE SATENSTEIN (Read 2 times) Subj: Pritty Lites... LS> Where do I get peekb() and pokeb() and are they freeware? They are in Borland, and other compilers also. What they do is create a far pointer to the location specified in the arguments, and then manipulate or return the value at that address. You can emulate them easily just using pointers. my_int = peekb(0x0040, 0x0017); my_int = *((char*)0x00400017L); These are the same, though you may have to specify a far pointer in some implementations. > ] I will not tell my History Teacher to, "Get over it"........ --- * Origin: *YOPS ]I[* 3.1 GIG * RA/FD/FE RADist * Milwaukee, WI (1:154/750) --------------- FIDO MESSAGE AREA==> TOPIC: 239 C LANGUAGE Ref: EGZ00024 Date: 12/30/97 From: KURT KUZBA Time: 04:25am \/To: FRANK MASINGILL (Read 2 times) Subj: Which way is more C++? FM> Which of the two versions below is better in using FM> classes? They both yield exactly the same results: FM> (Please include why) Your subject is off-topic, but not your question. :) I assume you meant to post this in C++? The answer is that in the first example, your code is in your class declaration segments, which should be in a .H file, which should not contain any code. The code should be separate from the class declarations. This applies to C and to C++ alike. You are likely to see class declarations with the code contained within, only in small programs which are so simple that there is no real reason to even place class declarations in a separate file. Neither is more C++, but the latter is more C. > ] I am Elvis of Borg. Thank you... Thank you very much........ --- * Origin: *YOPS ]I[* 3.1 GIG * RA/FD/FE RADist * Milwaukee, WI (1:154/750) --------------- FIDO MESSAGE AREA==> TOPIC: 239 C LANGUAGE Ref: EGZ00025 Date: 12/30/97 From: KURT KUZBA Time: 04:25am \/To: NEIL HELLER (Read 2 times) Subj: WHAT DOES THIS WARNING ME NH> temp_uword = 60000; /* warning on this line */ NH> "constant is long in function main()". Try writing temp_uword = 60000; as temp_uword = 60000L; The compiler is warning you that you have included a long constant and not specifically indicated that it SHOULD be anything other that the default type, an integer. It will work, but it wants you to know that there is some ambiguity in your code. Just adding the L to 60000 should take care of the warning. A specific cast to type may be used, also, to ensure that everything is as it should be. temp_uword = (unsigned)60000L; This may seem like overkill, and it may be, but it will inform the compiler that you DO, indeed, know what you are doing and have things just the way you want them. > ] Wait a minute... ///\oo/\\\ Almonds don't have legs......... --- * Origin: *YOPS ]I[* 3.1 GIG * RA/FD/FE RADist * Milwaukee, WI (1:154/750)