Giter Club home page Giter Club logo

Comments (5)

dmsc avatar dmsc commented on August 26, 2024

Hi!

Hi! I'm trying to use emu2 on an executable that includes a call instruction prefixed by 0x66. According to this Stack Overflow question this means that it's supposed to explicitly set the behavior. Dosbox provides this disassembly for the instruction:

01FE:0112 66E8C6000000 call 01DE ($+c6)

That is a '386 instruction, as is any instruction prefixed with 0x66 the "operand size prefix", so it won't run on 8086 and 80286 processors that emu2 emulates.

I think that this instruction is there exactly to fail on old 16bit processors, as it is shorter to simply assemble as 3 bytes "E8C600" instead of the 6 bytes you are seeing.

What I'm wondering is if there's a semi-clean way of implementing this as an override, or what the appropriate change to do_instruction might be, to catch all the 0x66 prefixed instructions and have them zero out the upper bits of EIP. Is something like this out of scope for the project?

At least currently emulating 32bit instructions is out of scope, as you would need full 386 emulation to be useful.

Have Fun!

from emu2.

matthewturk avatar matthewturk commented on August 26, 2024

Thank you -- this is very illuminating! I suspect, but am only 98% sure, that adding 32 bit is likely out of my "feasibility range." I'm going to instead see if I can adjust the code generation from gcc to force 16-bit mode.

from emu2.

tsupplis avatar tsupplis commented on August 26, 2024

Why dont you consider using gcc-ia16?

from emu2.

matthewturk avatar matthewturk commented on August 26, 2024

@tsupplis I didn't know about it -- but now I will!

from emu2.

tsupplis avatar tsupplis commented on August 26, 2024

https://github.com/tkchia/build-ia16
Works and builds well on Linux. Requires tweaking on MacOSX but works well too then.

from emu2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.