Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 (USS@Tek, v1.1) based on 4.3bsd-beta 6/6/85; site pogo.UUCP Path: utzoo!decvax!tektronix!orca!pogo!richk From: richk@pogo.UUCP (Richard G. Knowles) Newsgroups: net.emacs Subject: MicroEmacs 3.7 bug fixes Message-ID: <2677@pogo.UUCP> Date: Mon, 18-Aug-86 21:18:13 EDT Article-I.D.: pogo.2677 Posted: Mon Aug 18 21:18:13 1986 Date-Received: Fri, 22-Aug-86 02:10:47 EDT Distribution: na Organization: Tektronix, Inc., Beaverton, OR Lines: 77 ---------------------- This addresses the following bugs: Auto CMODE on files that aren't .c or .h -- (the rest are MSC specific, somewhat IBM specific) -- The real reason the structure REGS isn't defined for MSC ^P/^Q/^S problems with MSC Out of Stack Space when using the menu.cmd startup file. The real reason the structure REGS isn't defined for MSC. Not mismatched ifdef..end, but instead no ifdef for MSC. diff original/estruct.h my_changes/estruct.h 92c94 < #if MSDOS & LATTICE --- > #if MSDOS & (LATTICE | MSC) ---------------------------------------------------------------- ^P/^Q/^S problems with MSC result from the fact that the library routine kbhit() uses a dos call that does special character checking. The real catch is that MSC does not allow you to right a C routine that is a replacement, since all the dos calls either wait for a character, do special character checking, or return their status in a flag that is not returned by the MSC dos interface routine 'intdos' (carry flag only - we need zero flag). Either set TYPAHEAD to 0 or use the following assembler code to replace MSC's kbhit() routine (add to the list of routines to link). --- start of kbhit.asm --- name DOSINTF assume cs:_TEXT _DATA segment para public 'DATA' _DATA ends _TEXT segment word public 'CODE' public _kbhit ;******************************************************************* ; int kbhit (); -- returns true if char available, false otherwise ;******************************************************************* _kbhit proc far push bp mov bp, sp ; ; setup for BIOS keyboard routine call via INT 16h ; AH = 0 : read next ascii char, place in AL, scan code in AH ; AH = 1 : check to see if char available; ZF = 1 : no; ZF = 0 : yes ; AX = the char (also left in buffer) ; AH = 2 : return current shift status in AL ; mov ah,1 int 16h mov ax,0 jz return ; inc ax ; return: pop bp ret ; _kbhit endp ; _TEXT ends end --- end of kbhit.asm --- ---------------------------------------------------------------- Out of Stack Space when using the menu.cmd startup file. This is exactly what it says. Increase your stack space from the 2000 default to something more (I used 4k) either by adding/changing the /STACK:4096 option to the link or use the EXEMOD program provided by Microsoft to change the stack size as specified at load time (in hex): EXEMOD EMACS.EXE /stack 1000