Coder Social home page Coder Social logo

kobzol / davis Goto Github PK

View Code? Open in Web Editor NEW
60.0 5.0 10.0 2.97 MB

Assembly debugger written in Angular 2.

Home Page: https://kobzol.github.io/davis

License: MIT License

TypeScript 72.82% HTML 3.87% JavaScript 21.80% Less 1.52%
angular2 assembly x86 typescript debugger debugger-visualizer

davis's Issues

Fix .data labels

Labels in .data section (except the first label) are treated as .text labels.

Fix dereference access

section .data
string_origin:
db 'ahojx', 0
string_result:
db ' ', 0
string_len:
dd 0x5

section .text
MOV ECX, [string_len]
load:
MOV EDX, string_origin
MOV BL, BYTE [EDX + ECX * 1 - 1]
SUB BL, BYTE 32
MOV EDX, string_result
MOV [EDX + ECX * 1 - 1], EBX

DEC ECX
CMP ECX, 0
JE end
JMP load

end:
HLT

MOV [EDX + ECX * 1 - 1], EBX is not working correctly

I think SBB emulation is broken.

By the spec it's defined as DEST ← (DEST – (SRC + CF));

But I think it's implemented as DEST ← (DEST – SRC + CF);

Reproducible with this snippet.

    MOV EAX, 10
    MOV EBX, -1 ; 
    ADD EBX, 1 ; CF = 1
    SBB EAX, 0 ; EAX = (EAX - (0 + CF)) = EAX - 1 = 9
    ; EAX should be 9, it is 11

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.