Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site phri.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxb!mhuxn!mhuxm!mhuxj!houxm!vax135!timeinc!phri!roy From: roy@phri.UUCP (Roy Smith) Newsgroups: net.wanted Subject: Re: Experience building an Assembly Emulator? Message-ID: <164@phri.UUCP> Date: Tue, 29-Jan-85 12:15:22 EST Article-I.D.: phri.164 Posted: Tue Jan 29 12:15:22 1985 Date-Received: Thu, 31-Jan-85 01:11:29 EST References: <77@gitpyr.UUCP> Distribution: net Organization: Public Health Research Inst. (NY, NY) Lines: 17 > I'm in the process of designing and building and emulator for IBM PC > Assembler. It seems the only really tricky things should be handling > interrupts. > Phil Hutto {akgua,allegra,amd,hplabs,ihnp4,seismo,ut-ngp}!gatech!gitpyr!pwh I once wrote (as a class project) an emulator for a mythical (fairly simple) machine architecture. The hardest part was setting the overflow flag. C doesn't support any way (that I know of) to detect carry/overflow. I ended up writing litle host-assembler (this was on a pdp-11) routines to do the arithmetic operations and return the result and also set the condition codes. Fortunately, the mythical machine did 2s-complement arithmetic. -- allegra!vax135!timeinc\ cmcl2!rocky2!cubsvax>!phri!roy (Roy Smith) ihnp4!timeinc/