Copyright 1984 by ABComputing July 15, 1984 ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» º Input/Output - Letters, Quips, and Tips º º º º by º º º º R. Readers º ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ Tidbit 1 from Bill Salkin ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ Would someone please tell Mr. Richard Rubenstein of Waterbury, Connecticut, that he did not include his return address! (Which makes it difficult to respond to his letter.) ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ Did You Know #1 ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ Did you know that DOS function call 30H, used to determine the DOS version number, destroys the contents of the BX and CX registers? (An undocumented feature.) Behold. AX=3061 BX=0001 CX=0001 DX=0001 SP=00FC BP=0000 SI=0001 DI=0001 DS=0961 ES=094F SS=0961 CS=095F IP=001B NV UP DI PL NZ NA PO NC 095F:001B CD21 INT 21 -G 95F:1D AX=0002 BX=0000 CX=0000 DX=0001 SP=00FC BP=0000 SI=0001 DI=0001 DS=0961 ES=094F SS=0961 CS=095F IP=001D NV UP DI PL NZ NA PO NC 095F:001D CB RETF -Q ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ One Assembler Bug ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ Study the snatch of code shown below. It assembles without errors or warnings (though one would think that DATA is an undefined symbol), but the LINKER reports an invalid object module was created by the assembler. (Tattle-tale.) Apparently, when the class name DATA is used in a segment definition, the symbol DATA can then be used as a variable without being declared. ;------------------------------------------------------------------------------ MAIN_DATA SEGMENT PARA PUBLIC 'DATA' MAIN_DATA ENDS ;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------ STACK SEGMENT PARA STACK 'STACK' DB 40H DUP('STCK') STACK ENDS ;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------ CODE SEGMENT PARA PUBLIC 'CODE' ASSUME CS:CODE, DS:MAIN_DATA, SS:STACK, ES:NOTHING MAIN PROC FAR ;STANDARD LINKAGE TO DOS PUSH DS MOV AX,0 PUSH AX MOV AX,DATA ;MISTAKE! TRYING TO ESTABLISH MOV DS,AX ; ADDRESSABILITY OF DATA SEGMENT. RET ;------------------------------------------------------------------------------ MAIN ENDP ;END OF "MAIN" PROCEDURE CODE ENDS ;END OF CODE SEGMENT END MAIN ;EXECUTE AT "MAIN" ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ Did You Know #2 ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ The new Microsoft assembler is at least twice as fast as the IBM assembler! (and also supports 8087 code.) ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ Did You Know #3 ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ Did you know that old C programmers never die? They simply grow C-sick. ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ Product Announcement ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ASSIST/I allows IBM System 360/370 Assembly Language programs to be written, assembled, and executed in an interactive, non-IBM mainframe environment (and in particular on the IBM-PC.) It features a full-screen debugger which: displays memory in hex and EBCDIC, can single-step through instructions, can set breakpoints, and can display a dump of registers and the PSW. The integral text editor in this package is patterned after WordStar. Contact Overbeek Enterprises, P.O. Box 726, Elgin, IL 60121 (312) 697-8420. ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ Wouldn't You Know It ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ April Fools are still fools in May! According to an April 18, 1984, Computerworld article, it has been suggested that the U.S give the Soviet Union Ada processors as a present. The flavor of the article is that Soviet computer technology is old and a nuclear war could occur because of faulty programming. Giving the Soviets Ada processors will not only "act as a sort of nuclear insurance policy, but will also help to drive the domestic market." The high reliability of the Ada language, so the article continues, can help us work toward a point where "we could at least trust each other's technology." Editor's Comment: Oy Vey! ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ Hate Letter (name withheld) ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ I HATE BASIC. (Editor's Comment: Very concise.) ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ Fire 1 from Jody Crawford ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ Dear Bill, I enjoyed reading the first issue of PC FIRING LINE which I received from the Programmer's Shop with my order. The only problem with these disk-based magazines is that you can't take them to the lake or bathroom very easily.... Editor's Comment: Being unable to take a disk magazine to the bathroom presents no difficulty if you have a PC in the bathroom. I have never regarded PCFL/PCUG as being light reading material anyway. But, paper magazines also have their limitations in a bathroom setting. Ever notice all those hard inserts? They should remove them from catalogs for the customers' convenience. Note to readers: Jody sells a product for weavers. The product includes a display of drawdowns (sinking or rising shed), a file system to store and retrieve complete weaves, or individual threadings, and a worksheet to use at your loom. Write to ByteWrite, Rt 1, Box 768, Mount Airy, NC 27030 (919)789-2983. ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ Fire 2 from Chet Floyd. ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ Dear Bill, I just had a disastrous encounter with what I suspect is a bug in PC (MS) DOS 2.00. While doing a Pascal compile, PAS1 used the 1st sector of the FAT as a directory on the hard disk. Upon notifying Microsoft, I was informed that a new version of MS Pascal, 3.2, supposedly has improved disk-full error handling. I also asked MS why, as a registered MS-Pascal owner, I had not been notified that 3.13 was available. They said: "We don't have the data base built yet, but we're trying to get to it." So much for ISV support. The more I think about what happened, I suspect that PAS1 was the victim of DOS as it attempted to extend the directory on a full disk, resulting in the 1st FAT sector being used for this new cluster. This sector has .LST, .SYM, and .BIN directory entries in it. The remainder of the sector was 00, and of course this sector appeared in the backup copy of the FAT. The XT hard disk was nearly full at the time of the crash. Needless to say, what remained was almost useless if a file required more than 1 cluster. Has this sort of crash occurred before? Maybe one of your readers knows if my suspicions are correct. ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ Fire 3 from Scott Evans ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ... As an old 8086 hand (I started in 1981 on the INTEL MDS with ICE-86) recently getting into the PC, I've found some good second generation books that your following might be interested in. For the beginner in assembly language, the Waite Group's "ASSEMBLY LANGUAGE PRIMER for the IBM PC & XT" is an excellent self-paced tutorial. I wish there had been something like this around when we were trying to decipher the INTEL "preliminary" documentation. For the lazy, the matching "BLUEBOOK of ASSEMBLY ROUTINES" is handy. This is where I'm getting a lot of the routines for my MACRO library. A more advanced text is Peter Abel's "Assembler for the IBM PC and PC-XT," published by Reston Publishing Company. This is probably the best assembly language book I've ever come across, but it's a little fast for the entry-level programmer. (My 13 year old son is doing fine with the Waite book, but has a puzzled look on his face when he tries to use the Able volume.) Well, that's all for now. I'm sure you know there are lots of us techies out here cheering you on, and we all wish you well. Your biggest problem is probably the overwhelming response from people like me who are up late at night playing with our toys when we should be sleeping or paying attention to our wives. (Editor's Comment: As soon as I find the time, I plan to review all available assembly language texts for the PC.) ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ File Name: ÛÛ letters.txt ÛÛ ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ