Info-IBMPC@C.ISI.EDU (Info-IBMPC Digest) (08/22/87)
Info-IBMPC Digest Friday, 21 August 1987 Volume 6 : Issue 58 This Week's Editor: Billy Brackenridge Today's Topics: TI PC+ Help Needed AAD ASCII Adjust Before Division Instruction In C, NULL is 0 Allen Holub's Shell Mode Switching Operating Systems WP for Science and the Real World 3.5" 720K drive on old AT Lotus 123 Compatible Software Wnet and DOS Program Name NEC V20 Compatibility Problem A Way of Implementing a System Pause Until an Interrupt BIOS.ASM Updated List of Phoenix AT ROM BIOS Messages Today's Queries: Booting Another Partition from Within DOS Problems Linking C and Assembler Zenith 304 Port Query Ethernet Transfer Rates for Real Products Inconsistent Modem CompuBible Program CBASIC & 10Mbyte Removable Drive Wanted Linear Optimization Package Wanted INFO-IBMPC BBS Phone Numbers: (213)827-2635 (213)827-2515 ---------------------------------------------------------------------- To: Brady%louie.udel.edu@ICSE.UCI.EDU Subject: TI PC+ Help Needed Date: Tue, 18 Aug 87 21:44:59 -0700 From: Jerry Sweet <jsweet@ICSE.UCI.EDU> Several TI PC users have informed me that the TI+ system has to be running in IBM emulation mode to run some applications (e.g. programs using Meridian Ada tasking). If your language system was developed by TI, chances are good that its run-time system is designed to use TI's interrupt structure, and not the IBM-defined interrupt structure. -jns ------------------------------ Date: Fri 7 Aug 87 06:55:10-PDT From: boykin@custom.UUCP (Joseph Boykin) Subject: AAD ASCII Adjust Before Division Instruction Organization: Custom Software Systems; Natick, MA I was looking through my handy-dandy 80X86 programmers reference and noticed something that I thought was a little strange. The AAD instruction (ASCII Adjust before division), does the following: AL = AL + (10 * AH). AH = 0 This instruction has a 'two' byte op-code, which really didn't seem necessary; i.e. why couldn't the instruction be encoded in one byte? OK, one-byte opcodes are valuable and you don't want to waste it on a semi-useless instruction. The other point was that the second byte was 0A. Humm, an instruction which multiplies the least significant nibble by 10 has a 10 as its second byte! Taking out my handy debugger I found that AAD *is* a one-byte instruction with the second byte acting as a parameter. Try coding the following: db 0d5h, 10h and you'll create an instruction which does: AL = AL + (16 * AH) AH = 0. I'm not sure what value such an instruction might have. Looking at the instruction timings a MUL is faster, but I'm sure someone will find a case where this is useful. If you do, let me know! Joe Boykin Custom Software Systems ...necntc!custom!boykin ------------------------------ Date: Wed, 19 Aug 87 06:54 CDT From: HARGED%eg.ti.com@RELAY.CS.NET Subject: In C, NULL is 0 > The BIGGEST problem (in my opinion) of transporting code from UN*X to > MSDOS is the usage of 0 (in UN*X) for NULL. In the small memory model, > this is no problem, as the size of a pointer is the same size as an > integer. However, in the large memory model, the size of a pointer (4 > bytes) is TWICE the size of an integer (2 bytes). This becomes a problem > when you try to pass a NULL pointer to a function. ... The problem is in the way the code being transported was written. To specify NULL as an actual parameter in a function call portably, it MUST be cast to a pointer of the correct type, as in bomb ((char *) NULL); This guards against the situation where sizeof(xxx *) != sizeof(int) AND when sizeof(xxx *) != sizeof (yyy *) != ..., as is the case on other architectures. NULL, like FALSE, is just another name for 0; the C language definition requires a particular semantic action when 0 is used as a literal pointer value. If the cast is not present, and no prototype for the function is in scope, the compiler has no way of knowing the type of the formal parameter, so it passes the literal 0 as an int (score one for the ANSI committee and function prototypes). The use of 0L for NULL is a kludge that will cause problems when transporting code developed under DOS to a non-DOS environment. Defining NULL as 0L doesn't even work in the DOS environment because across all the models you can't assume sizeof(xxx *) == sizeof(yyy *) == ... when considering both data pointers and pointers to functions. BTW, real sticklers for portability won't use NULL; they'll use something like #define NIL(type) ((type *) NULL) as in char *cp = NIL(char); if (cp != NIL(char)) { ... } bomb (NIL(char)); Now it doesn't matter how NULL is defined, as long as it is correct. richard hargrove usenet: ...!killer!richardh csnet: harged@ti-eg arpa: harged%ti-eg@csnet-relay ------------------------------ Date: 19 Aug 87 09:53:23 EDT (Wednesday) Subject: Allen Holub's Shell From: marty <Leisner.Henr@Xerox.COM> James Coombs sez about Allen Holub's shell: Haven't had a chance to look at it. I have heard loud complaints about bugs in Holub's shell (another product), but I can't say for sure that the complaints were justified. I've been using this shell for 6 months now. I recompiled it onto Aztec C and -- lo and behold -- the "bugs" went away. Turns out the Microsoft exec call does bad things. I now can have my system up without a crash for over a week. Before I recompiled on Aztec, I had to warm boot every few hours. I still haven't gotten around the enhancing the shell yet, since it works pretty good now (there are a few bugs, but it is easy to avoid them). And I felt the code was very maintainable (unlike most of the code I see professionally). marty GV: leisner.henr NS: martin leisner:henr801c:xerox UUCP: martyl@rocksvax.uucp ------------------------------ Date: Wed, 19 Aug 87 09:56:10 EDT From: Russell Nelson <bh01@clutx.clarkson.edu> Subject: Mode Switching Operating Systems I WILL NOT use an operating system that switches modes unless I have control over the mode switching. The whole point behind a multitasking operating system is that each process is protected from the rest, and vice versa. If a process runs in real mode, it can easily crash and trash the whole works. This is the reason I gave up on Windows development. This is the reason I don't bother with Minix. And it's the reason I won't run anything in the DOS box under OS/2. Microsoft makes a big deal about how OS/2 is backwards compatible. The only reason for backwards compatibility is so that people can run their *existing* software. This caused many headaches at Microsoft and is the main reason why OS/2 is taking so long. Microsoft has admitted as much. Well, more than half of the MS-DOS software out there exists solely to work around MS-DOS, like the Norton Utilities for example. The other half is significant software that will get rewritten for OS/2. Well, if half is useless, and half will be rewritten, why provide compatibility? Well, compatibility will save people from having to pay an upgrade fee. I dismiss this by pointing out that OS/2 is going to cost a bundle in the first place. Ok, compatibility will let people run their favorite program under OS/2 before it gets ported if it ever gets ported. Again I dismiss this by asking why they are running OS/2. The only reason to run OS/2 is if there is a program that runs under OS/2 but not under DOS. I contend that many years will transpire before software firms ignore the DOS market. Now, since the only reason to buy OS/2 is to run OS/2 programs, why wait for OS/2? Un*x is here now, it runs on an AT, it's relatively stable, and it's a reasonable solution. Someone (sorry; I don't remember who) has estimated that it takes five years for an operating system to mature. Remember CP/M? Just about the time the 8088 came along, CP/M was just maturing in the form of the Z-system. Do you really think that *anyone* will still be using their 80286 systems in five years? And if you point out to me that OS/2 is hardware independent, I have just one word to say to you: Un*x. If you have been waiting for the other shoe to drop, here it is: I have spoken to a person who has been in an Intel plant, and SAW a 80286 pin-compatible 80386. If you don't think that Intel is working on such a chip, you've never heard of the NEC V-20. I apologize for the length of this flame, but no one has said it before, and I felt it needed to be said. -russ GEnie: BH01 BITNET: BH01@CLUTX Internet: bh01@clutx.clarkson.edu uucp: decvax!sii!trixie!gould!clutx!bh01 [Please INFO-IBMPC is devoted to a technical discussion of the PC. If we branch out into Microsoft's or IBM's marketing decisions the flames will go out of control. Keep the discussions coming about tasking, mode switching, DOS compatibility etc., but keep them on a technical level. -wab] ------------------------------ Date: 19 Aug 87 10:04:00 PDT From: "ROBERTS, R L 31067" <roberts@afsc-sd.arpa> Subject: WP for Science and the Real World Have you taken a look at either TeX or Wordstar Release 4? I am using Wordstar Release 4, and I find it is very useful for both applications. I am constantly needing to embed "weird characters" in my text, and I haven't found a thing that I can't put in a Wordstar document file. And for regular letters, it is fine there... Although I am not familiar with TeX, I have heard that it handles mathematical symbols fairly easily, so it may also be a solution for you. Good Luck! Renee Roberts (ROBERTS@AFSC-SD.ARPA) ------------------------------ Date: Wed, 19 Aug 87 11:08:17 pdt From: kenzi%lbl-ux8@Lbl-Csa2.Arpa Subject: 3.5" 720K drive on old AT I have been trying to install an internal 3.5" 720K drive (bought from IBM) in an old IBM-AT (6MHz) running DOS-3.3. I followed the instruction that came with the drive and installed the device driver (INDSKBIO.SYS) but I only got 360K when I tried to format a diskette, although it recognized a full 720K pre-formatted by a Toshiba 1100. I read someone advising in this bulletin about a month ago to install DRIVER.SYS. I followed the advice and I DID get 720K in drive D! (I have a 5.25" 360K dive as A: and the 3.5" as B:, and a 40Mb hard disk as C:) As I understand it, the DRIVER.SYS installs an additional logical disk drive. And it does so well for the additional logical drive, but I still get only 360K on B: (which is physi- cally same as D:). Does anyone know how to get 720K on B:? ------------------------------ Subject: Lotus 123 Compatible Software Date: Thu, 20 Aug 87 11:47:25 -0400 From: Glenn Larsen <glarsen@note.nsf.gov> Message 67 asked whether there were any Lotus 123 compatible spreadsheets. There is one called ASEASYAS which reads and writes in .WKS format, is a Lotus look-a-like, and functions as does 123. The disadvantage of this program however, is the small spread sheet size, 200 rows by 50 columns. Its advantage is that it is shareware in the public domain so you can try it to see if it's any good. It is available from PC-SIG in San Francisco. I also have a copy of it in Engineering, Room 1115 if anyone wants a copy. ------------------------------ Date: Thu, 20 Aug 1987 10:09 PST From: MARY CONNER<8221984%UWAVM.BITNET@wiscvm.wisc.edu> Subject: Wnet and DOS Program Name First off, the inquiries I have received since my first submission indicate that there is interest out there in software to do network managing. We have such a package here at the University of Washington called Wnet. It is copyrighted to prevent unscrupulous uses, but permission is granted to freely copy and distribute the software, since we have no intention of setting up the administrivial details necessary to sell something. I am not sure if the source code is also permissible to distribute but I will find out and if so perhaps submit it to SIMTEL20 if I can find out how to do so. If we can ever get LISTSERV here to work, I'll put it here too. Secondly, with reference to the question and answer regarding how a program can find its own name, the word count mentioned in the answer (sorry, I don't have my copy of the Digest here for reference) does not specify the length of the ASCIIZ string. I've used this trick in several programs for finding where a program was loaded from, and that word count always comes up as 0001(hex) regardless of what I was doing. A chr(0) marks the end of the ASCIIZ string giving the name, and this is the proper way to find the end of the string not by using the word count. I've not been able to find out what that word count does, so if anyone knows, I'd be happy to find out. Actually, I've just remembered a third item. The last Digest mentioned that there have been no pledges from the Bitnet side towards the $50,000 that Columbia needs. First off, I'll put up $10 out of my meager student budget if you're willing to take it. Just let me know where to send the check. However, I wasn't aware that actual fund raising was going on, perhaps due to the recent inaccessibility of Bitnet from Arpa through the Wisconsin gateway. I suspect we've missed a few Digests over here because of that. In any case, those of us on the Bitnet side certainly should not expect a free ride off the non-Bitnetters. I'd like to suggest that the editor of the Digest include a running total of the amount collected for Columbia. I'd like to see how things are going with this effort and it's only one line in the Digest. Mary Conner 8221984@UWAVM.bitnet [I have learned more about how BITNET works. I retract my statement that it is easy to transfer files over BITNET. It appears non trivial to implement a files gateway to BITNET. We are still essentially without funding. I don't know what will happen on September 1. -wab] ------------------------------ Date: Thu, 20 Aug 87 10:57 EST From: SMITH%VAXSCS%rca.com@RELAY.CS.NET Subject: NEC V20 Compatibility Problem After installing a Fastcard IV Mutifunction/EMS board from PMI in Scottsdale, Arizona, on my IBM XT, my A drive would not work properly (directory was garbage). Also, the software supplied with the board, IMS, would not recognize my hard drive. This was highly unusual, since I was not using a clone and should not have any compatibility problems. A call to PMI revealed that the NEC V20 processor I was using in place is NOT compatible with the 8088. It is usually 'close enough' in most cases, but does not emulate the 8088 100%. Swapping back the original 8088 solved the problem and the Fastcard IV now works as advertised. The technical support I got from PMI was very good. I am posting this letter to make users of the NEC V20 processor aware of potential compatibility problems with add-in boards. I don't know if the NEC V30 would have similar problems. Susan Smith, GE/RCA Aero and Defense Moorestown, NJ 609-722-3766 ------------------------------ Date: Fri, 21 Aug 87 13:27:44 PDT From: rohan%lock.span@VLSI.JPL.NASA.GOV Subject: A Way of Implementing a System Pause Until an Interrupt Replying to Roland McGrath's query on how to pause until an interrupt happens, I would like to discuss the use of the setjmp and longjmp routines, which are a part of most C libraries (at least UNIX C and TURBO C). Using these routines could provide a semi-machine independent way of solving your problem. The setjmp routine is analogous to a save state macro that could be implemented in assembler. You pass it a variable defined to be of type jmp_buf (defined in setjmp.h). This is were the routine stores the program state. When first called, setjmp saves the status of your program, and returns a zero. You can then go on and execute whatever statements you wish--in your case an empty loop, or some form of sleep command (try getting some sleep, future versions of your program might not slow the system in OS/2). When an interrupt occurs, the interrupt handler routine that you have previously set up (possibly with a signal as I did below--signals are a way of catching interrupts like overflow and divide by zero), should terminate with a longjmp routine. The longjmp routine restores the state of your program, and you magically continue execution at the point just before returning from the setjmp routine you executed earlier, with the exception that this time the routine returns a one. All non-static program variables are now as they were before the call. You can test the number returned from the setjmp call, in order to determine if your actually running setjmp for the first time (in which case you will do your wait), or you are returning from a longjmp (you can continue on). Here is an example program. I just threw it together, so I hope it's all correct. #include <signal.h> #include <setjmp.h> jmp_buf program_state; ... void int_handler() { /* Handle your interrupt here! */ longjmp(program_state); } ... status = ssignal(SIG_INTR,(int_handler)()); /* turn on the interrupt */ if (setjmp(program_state) == 0) { /* Do your wait loop or sleeping here or */ /* you could be doing something useful. */ } /* Here is where you would continue after the interrupt or */ /* where you fell through your wait loop (like in a time out). */ status = ssignal(SIG_INTR,SIG_DFL); /* turn off the interrupt */ ... This is one way to solve your problem. There are many others. I bet your now confused! Rick Rohan Programmer, Lockheed EMSCO, 2400 NASA Road One, Houston, TX 77258 ------------------------------ Date: Wed, 19 Aug 87 19:10:59 EST From: John <JOHN%NCSUVM.BITNET@wiscvm.wisc.edu> Subject: BIOS.ASM Updated Here is the copy I was sent.. I haven't used it ( yet? ) ( i.e: don't know if I want to replace the good 'ole true blue bios ). I would be curious to hear from people who have used it.. John Nasty trick: telling everyone to get it from me.... ;-) [BIOS.ASM has been updated in the info-ibmpc lending library. -wab] ------------------------------ From: nemo@altger.UUCP Subject: List of Phoenix AT ROM BIOS Messages Date: 13 Aug 87 01:33:00 GMT This is a list of Phoenix AT ROM BIOS messages. I have found this information on BIX, on a conference called rombios. Many other hints about Phoenix bios are presents in this conference. I hope this can be useful for someone. My address is: altger!nemo (i think... i'm not sure...) [PHOENIX.TXT has been added to the info-ibmpc lending library. -wab] ------------------------------ Date: Wed, 19 Aug 87 13:37:44 ULG From: Andre PIRARD <A-PIRARD%BLIULG12.BITNET@wiscvm.wisc.edu> Subject: Booting Another Partition from Within DOS When MSDOS has booted from the active partition, is there a way (program) to boot an inactive partition without FDISK reassignment then reset. It seems tricky to perform the necessary resets (e. g. interrupt vectors) and load the boot record without getting into very machine-dependent code. But I might have missed something... Thanks. ------------------------------ From: obroin%hslrswi.UUCP%cernvax.bitnet@jade.berkeley.edu (Niall O Broin) Subject: Problems Linking C and Assembler Date: 19 Aug 87 11:07:12 GMT Organization: Hasler AG, CH-3000 Berne 14, Switzerland I am trying to use the interrupt driven IBM PC com port driver by Mike Higgins which was recently on the net. I am having some problems with TERM.C, the program which sets parameters on the drivers. TERM makes IOCTL calls to the driver and to this end it uses IOCTL.ASM, a short routine which just takes parameters off the stack and does DOS IOCTL calls. I think in fact that the assembly code could be replaced with int86x calls, but I haven't looked into this yet. BTW, I am using MASM 4.0, MSC 3.0 and MS-LINK 3.05. The code segment in IOCTL.ASM is named @CODE. When TERM.OBJ and IOCTL.OBJ are linked, three "fixup errors" are reported, at the three calls to the assembler IOCTL routine. Despite this, the resultant TERM.EXE seems to work O.K. - at least baud rate changes are stored by the driver. You might say, leave well enough alone, it works. But I want to know what this error is. Reading the link manual was not helpful. Reading the MSC manual, you find NO complete example of linking assembler and C. Reading further, I find the statement "assembler code should be in the _TEXT segment" (paraphrased). So I changed the name of the IOCTL.ASM CODE segment from @CODE to _TEXT. Lo and behold, LINK now produces no errors. BUT (you guessed it) the resultant TERM.EXE doesn't work. Not alone that, it hangs the machine and requires a re-boot (Sometimes it gives "divide error" when it crashes). Can anyone tell me what this error might be and how to fix it ? To avoid clutter, please mail replies to me and I will summarize to the net. #\\\\\-----\\\\\ Niall O Broin ###\\\\\-----\\\\\ AXE Software Development #####--------------- Hasler AG #######--------------- Berne #########\\\\\-----\\\\\ Switzerland ###########\\\\\-----\\\\\ ####### ///// ///// obroin@hslrswi.UUCP ####### ///// ///// ##### ///// It is better never to have ### ///// been born, but anyone that # ///// ///// lucky won't be reading this. ///// ///// [Try replacing anything of the form MOV ?X,OFFSET FOO with LEA ?X,FOO, Don't ask me why but the linker loves to generate bad code sometimes when you use the offset operator. -wab] ------------------------------ Date: 19 Aug 87 09:58:00 PDT From: "ROBERTS, R L 31067" <roberts@afsc-sd.arpa> Subject: Zenith 304 Port Query Does anyone know the correct addressing scheme for the Z-304 port on a Zenith Z-248 system? It is a 38 pin port, and they provide an adapter that brings that 38 pins out to a male "COM 3" port, and a female parallel port. I can't seem to find any descent documentation to show how to address these two ports. Zenith can't seem to tell me anything at all. Any ideas? Renee Roberts (ROBERTS@AFSC-SD.ARPA) ------------------------------ Date: Wed, 19 Aug 1987 15:55 CDT From: B89196%ANLVM.BITNET@wiscvm.wisc.edu Subject: Ethernet Transfer Rates for Real Products Does anyone have a defendable number for the transfer rate for PC hard disk to, say , a VAX over Ethernet? I have been bench marking various packages and some of the numbers I've seen are: 10 Mghz bit rate (ideal) 4 Mghz bit rate (after you add a DELUA to the VAX) 175 KB/sec 3COM Etherlink (max throughput -- pub) 37 KB/sec 3COM Etherlink best single station xfer (pub) 75 KB/sec DECnet DOS single station max (published) 2.5 KB/sec DECnet DOS single station file xfer (XT) (pub) 1.6 KB/sec DECnet DOS single station file xfer (XT) (meas) 21.8 KB/sec Datability RAF single station file xfer (meas) 80 KB/sec transfer rate (marketing claim by Technology Concepts) Is there a good figure to target in this area? Apart from the intelligence of the Ethernet interface boards, do all these discrepancies really lie in the software? John Slimick Morgantown Energy Technology Center Morgantown WV [On a PC the biggest factor limiting performance is the DOS/BIOS busy wait disk I/O. Many "best time" published results are to the NUL device or RAM disk because of this bottleneck. -wab] ------------------------------ Date: Thu, 20 Aug 87 2:13:12 GMT From: "James R. Kuterbach" <tocc@walker-emh.arpa> Subject: Inconsistent Modem I have recently purchased a computer in Hong Kong and have been unable to get the internal modem that came with it to work properly. When using Crosstalk in the debug RS232 mode, it drops DTR usually before connection is completed. The modem is Hayes compatible and is named "at 1200 Intelligent Modem" by Unique Hardware. The only straping available are eight on off switches that set port address (i.e. all in the on position is port 1.) I have tried this modem in a Corona IBM look alike at port 3 and it worked perfectly. My machine has a hard drive and controller board, a multifunction card which controls the two Teac floppies, game port, clock activated by the timer command and a mouse. It also has a color graphics board and of course the modem card. When booting up the screen displays "DKT Corp. Computer XT" "DKT/ERSO/ BISO 2.18 (C) 1986". When using Norton Utilities it reports built in BIOS programs are dated JAN 1, 1981. The BIOS signature is at hex para C800 and 32K-bytes display memory at hex B800-C000. 640 K-bytes main memory are reported at hex 0000 - A000 and the speed relative to IBM PC is 1.7 regular and 3.00 in turbo. The same problems occur at low or high speed but a little quicker in high speed. The same problems also occur when I physically remove the multifunction card and use the modem on port one or two. I believe but am not sure that the problem has something to do with DTE or DCE configuration but am unsure how to correct the problem. Any assistance you can render will be greatly appreciated. Jim Kuterbach ------------------------------ Date: 19 Aug 1987 22:35-EDT Sender: WAGREICH@G.BBN.COM Subject: CompuBible Program From: WAGREICH@G.BBN.COM I am looking for the name of the company who developed the CompuBible program for IBM compatibles and their US Mail address, as well as feedback about the program. The program is supposed to have search and print capabilities for the King James Bible (which is stored on disk in machine readable format). This is not the same program as THE WORD, developed by Bible Research Systems. I would appreciate knowing whether the search capabilities are flexible and retrieval is fast. Is the program worth the price (about how much does it cost?) thank you for any information you can give me about the CompuBible. ------------------------------ Date: 20 Aug 87 13:28:41 PDT (Thursday) Subject: CBASIC & 10Mbyte Removable Drive Wanted From: McNelly.OsbuSouth@Xerox.COM A friend of my room-mate's is looking for a copy of CBASIC and a removable 10 Mbyte disk drive. Both these items seem to be obsolete -- he can't even get them from the manufacturers. He really needs these items for a project he's working on for his church. If you have a copy of CBASIC or a 10 Mbyte removable disk drive, please either call Hal at (213) 466-0519 or reply to this message, and I'll have him get in contact with you. -- John -- ------------------------------ Date: Fri, 21 Aug 87 11:00:34 EDT From: rochester!kodak!bayers@RUTGERS.EDU (mitch bayersdorfer) Subject: Linear Optimization Package Wanted Organization: Eastman Kodak Co, Rochester, NY I am looking for a PC-compatible package (preferably with source code, preferably in 'C') which performs linear optimization. I have a set of equations, with linear, quadratic and cubic terms on up to 5 variables and I need to find an quasi-optimal set of those five variables which produce a solution within a specified range, within a certain coefficient of variation. If a solution cannot be found within the an initially given range of acceptable solutions, then expand the range of acceptable solutions, utilizing the amount of user specified range expansion for each variable as a measure of the critically of that variable.) A well behaved starting point will also be supplied by the user. If you are aware of anything similar to this, please let me know via net mail. I will post a summary of replies. Thanks. - Mitch Bayersdorfer ...!rochester!kodak!bayers ------------------------------ End of Info-IBMPC Digest ************************ -------