Path: utzoo!news-server.csri.toronto.edu!rutgers!usenet!ogicse!emory!samsung!spool.mu.edu!munnari.oz.au!metro!macuni!sunb!ifarqhar From: ifarqhar@sunb.mqcc.mq.oz.au (Ian Farquhar) Newsgroups: comp.sys.amiga.emulations Subject: Re: Emulator Mechanics [Transpiler] Message-ID: <1338@macuni.mqcc.mq.oz> Date: 13 Mar 91 03:24:04 GMT References: <5097@mindlink.UUCP> Sender: root@macuni.mqcc.mq.oz Organization: Macquarie University, Sydney, Australia. Lines: 32 In article <5097@mindlink.UUCP> Chris_Johnsen@mindlink.UUCP (Chris Johnsen) writes: >Ian Farquhar (ifarqhar@sunb.mqcc.mq.oz.au) suggested that a compiled module be >run concurrent with an emulator type section so that in some parallel way, any >references within the source executable, which would also be loaded during >runtime of the emulation, could be validated. It could be argued that this >should be placed on the pro side of the ledger, but the incurred overhead >during execution would be large. This function, I had imagined initially, >would be carried out during the transpiler phase and not attached to, or >burdening, the runtime execution. No, I suggested that an image of the original code, without translation, be carried around with the compiled code, with indexes into the compiled code's equivalent sections that would allow jump tables and so forth to function correctly. This would be a memory intensive but low-time-overhead time way of resolving problems. It should also be noted that such a system would allow trapping of addresses that need to be handled by special code (hardware locations etc.), and that the image is also used for data storage, meaning that once loaded and allocated, the program would be unlikely to need any further allocation of heap. This system solves two problems: the data/code differentiation (if you accidentally compile some data, it is no great problem) though a much more minor problem remains if a couple of opcodes are missed because of data being accidentally compiled and the compiler assuming an opcode is the data for a false opcode, and also the problem of jump tables and jumping to locations stored in registers. -- Ian Farquhar Phone : + 61 2 805-9400 Office of Computing Services Fax : + 61 2 805-7433 Macquarie University NSW 2109 Also : + 61 2 805-7420 Australia EMail : ifarqhar@suna.mqcc.mq.oz.au