mrk@gvgspd.UUCP (Michael R. Kesti) (10/27/87)
---------------------------------------------------- PLEASE BE SURE TO READ THE ARTICLE WITH THE SUBJECT: "READ IF YOU SAVED MY SNIPPER POSTING", WHICH DESCRIBES AN ERROR IN THE FILE I POSTED. ---------------------------------------------------- Several people have emailed requests for the modifications that I made to PC Magazine's SNIPPER (Vol 6, No. 18) to make it work properly on my AT&T 6300. It didn't respond to the down arrow key at all, and the up arrow key sent the cursor to obvlivion. I was able to trace the problem to the initialization of the ROWS variable, which this program stores at 40:84. According to the magazine article, this location holds the number of display rows available if an EGA is used, or zero for all other display adapters. The initialization code reads this location and, if it is non-zero assumes that an EGA is present and leaves it alone; otherwise it writes the value 24 (decimal) there, under the assumption that a CGA or MDA is present. It subsequently uses the value stored at that location as the number of rows on the system display. On my machine this location holds the value 0xCE (206 decimal), and so is not changed. Needless to say, my display does not have 207 rows, and this explains the program's behavior. Note that I run v1.00 ROMs, and have been told that later versions don't have this problem. If you're also running old ROMs this diff shows how to make this little gem work. 31,33d30 < ORG 0084H < ROWS DB ? ; LAST ROW NUMBER FOR EGA < 149c146 < MOV DH,ROWS ; JUMP DOWN TO THE BOTTOM --- > MOV DH,24 ; JUMP DOWN TO THE BOTTOM 152c149 < CMP DH,ROWS ; AT BOTTOM OF SCREEN? --- > CMP DH,24 ; AT BOTTOM OF SCREEN? 261c258 < CMP DH,ROWS ; AT BOTTOM OF SCREEN? --- > CMP DH,24 ; AT BOTTOM OF SCREEN? 918,926d914 < < ASSUME ES:BIOS_SEG < < CMP ROWS,0 ; IS NUMBER OF ROWS ENTERED HERE < JNE MUST_BE_EGA ; IF YES, AN EGA MAY BE PRESENT < < MOV ROWS,24 ; IF NOT EGA, MUST BE 24 ROWS < < MUST_BE_EGA: -- ===================================================================== Michael Kesti Grass Valley Group, Inc. | "Initiative comes to those P.O. Box 1114 Grass Valley, CA 95945 | who wait." UUCP: ...!tektronix!gvgpsa!gvgspd!mrk | - Alex "655321" Delodge