Comments (5)
I was trying to use it to circumvent the feature that the emulator exits immediately after the last instruction is executed, which means you can't inspect its results. So I was going to add an extra nop
at the end of my program, and found that I could not :)
from 8086-emulator.
You mean the nop
mnemonic in the assembler. Yeah, Unexpected Token : nop
At first I thought you meant that 0x90 wasn't special-cased as a nop
, but it doesn't need to be, that's only an optimization, until x86-64. (Since 0x90 doesn't zero-extend EAX into RAX like xchg eax,eax
does.)
from 8086-emulator.
@pcordes There's no assembler or machine code at all; this is an interpreter. So it's just that the nop
mnemonic is missing. xchg ax, ax
does work (doing nothing).
from 8086-emulator.
Hey @neldredge , yes the nop instruction is not implemented at all. The logic behind this was :
As far as we knew at the time of implementation, nop is used make cpu busy when syncing with some external chips which run on different timer/speed, or to adjust/force alignment of instructions so that instructions are aligned on 8/16 boundaries and their fetching is faster.
For this emulator, neither of these were a concern, so we chose not to implement at the time. (As the primary target of use was us.)
Now that more people are using this, and potentially using this as a lib, we should either add a nop
or at least specify it is not supported somewhere...
from 8086-emulator.
As a workaround, if you are using it as cmdline, you can either use the print instructions to print whatever you want to check, or add an int 3 at end, which should launch a debug mode, (similar to step-by-step mode) where you can poke around stuff.
from 8086-emulator.
Related Issues (16)
- PUSH/POP shift ss too much
- Memory offset wraparound is not correct HOT 3
- DIV/IDIV should trap on all overflow, not just divide by zero HOT 2
- Overflow flag is mishandled HOT 4
- next doesn't print some instructions correctly HOT 1
- MUL/IMUL flag setting is incorrect
- XLAT should support segment override
- CALL / RET ... is that implemented ? HOT 2
- INT 0x21, AH = 0x0a counts 1 character less, than it should.
- JL, JLE, JG, JGE, ... dont work properly HOT 2
- IMUL does not sign extend correctly
- AAA Does not clear upper nibble
- blind student HOT 6
- Overhaul the lexer parse and interpreter architecture to a better scheme HOT 5
- LEA instruction not working HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from 8086-emulator.