Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!caip!topaz!uwvax!husc6!harvard!panda!genrad!decvax!decwrl!banks@viking.dec.com From: banks@viking.dec.com Newsgroups: net.micro.amiga Subject: Re: Wecker's VT-100 emulator and Lattice C Message-ID: <4625@decwrl.DEC.COM> Date: Mon, 4-Aug-86 10:41:47 EDT Article-I.D.: decwrl.4625 Posted: Mon Aug 4 10:41:47 1986 Date-Received: Sat, 9-Aug-86 02:22:17 EDT Sender: daemon@decwrl.DEC.COM Organization: Digital Equipment Corporation Lines: 32 Re: Making Wecker's VT-100 work with Lattice C: We've been successfully running said terminal emulator, compiled with Lattice for a few days now. It wasn't too hard to get it to work, although we still haven't gotten around to getting the Kermit code to work. In general, we brute forced a few undefined routines (make getenv be a null routine, etc). That much is pretty obvious. The show stopping bugs are related to bugs in Lattice C. The first is 3.03's inability to deal with [n+1], a construct which appears in many places in the initialization module. Declare m, m=n+1, replace [n+1] with [m] in all the places, and it successfully initializes. The second big bug is that Lattice sscanf always stores a long value, even if you didn't say "l" in the format string. The original VT-100 emulator code sscanfs into short ints, causing random memory to be overwritten when Lattice stores the longword instead. The solution is simple enough: search for all the scanf calls, and replace the definitions for all the scanf destinations with "int", defaulting to the native size for whatever compiler you're using. There are a couple of other bugs in the logic itself, which may or may not cause a guru. I'll post the fixes as soon as I get around to uploading them. All in all, I think it's a pretty neat emulator. It's the best VT-100 emulation I've seen on an Amiga so far, and it's nice to have a full 80 columns for a change. Thank you very much, Mr. Wecker! {Normal disclaimer about not representing or resenting my employer here ...} (DEC E-NET) Viking::Banks (UUCP) {decvax, ucbvax, allegra}!decwrl!dec-rhea!dec-Viking!Banks (ARPA) Banks%Viking.DEC@decwrl.ARPA