carlosrafaelgn / asm86 Goto Github PK
View Code? Open in Web Editor NEWA JavaScript assembly x86 compiler + emulator for educational purposes
Home Page: https://carlosrafaelgn.github.io/Asm86/
License: Other
A JavaScript assembly x86 compiler + emulator for educational purposes
Home Page: https://carlosrafaelgn.github.io/Asm86/
License: Other
http://carlosrafaelgn.com.br/asm86/
Menus (eg: language) do not close when I click somewhere else, and when I try to move windows (eg: Console) it just selects everything.
Nice work. Does it support equates?
example:
SOME_CONSTANT equ 0x3
Looks to me like imul is not setting flags properly on this particular case! Thanks, Erik
mov eax, 0x2
mov ebx, 0x7FFFFFFF
mov edx, 0xDEADBEAF
imul ebx ; <----- after this CF & OF should be set/true/1 but they are cleared
mov eax, 0x4
mov ebx, 0x7FFFFFFF
mov edx, 0xDEADBEAF
imul ebx ; CF & OF properly set to true/1
mov eax, 0xFFFFFFFF
mov ebx, 0xFFFFFFFF
mov edx, 0xDEADBEAF
imul ebx ; CF & OF properly set to false/0
mov ebx, 0xDEADBEAF
ret
for the assembly x86 emulator, how it work? can you share the tutorial etc. Why it differ with NASM assembly code?
Hi,
here's the issue.
"Using the SAR instruction to perform a division operation does not produce the same result as the IDIV instruction. The quotient from the IDIV instruction is rounded toward zero, whereas the “quotient” of the SAR instruction is rounded toward negative infinity. This difference is apparent only for negative numbers. For example, when the IDIV instruction is used to divide -9 by 4, the result is -2 with a remainder of -1. If the SAR instruction is used to shift -9 right by two bits, the result is -3 and the “remainder” is +3; however, the SAR instruction stores only the most significant bit of the remainder (in the CF flag).
"
[https://software.intel.com/sites/default/files/managed/39/c5/325462-sdm-vol-1-2abcd-3abcd.pdf]
When I run this code
mov al, -9
sar al, 2
the result stored in al
is 0x3D but it should be 0xFD(-3)
Tested on my local machine.
This works:
0x34
however several documents also show:
34h
Would be great if we can get this to read either. Thank you.
The below snippet is from the book "Practical Reverse Engineering"
mov dword ptr [eax], 1
mov ecx, [eax]
mov [eax], ebx
mov [esi+0x34], eax
mov eax, [esi+0x34]
mov edx, [ecx+eax]
This fails to step through with:
Invalid writing address: 0x00000000
Is there a specific syntax I need to use? Thank you.
e.g.:
mov al,255
add al,1
CF will not be set, when it should be. The code assumes that the register (AL) is 32-bit and checks flags accordingly.
Thank you in advance.
I compile and run this asm on my linux:
mov al, -128
neg al
Overflow flag will be 1
after neg al
But in this emulator, overflow flag is 0
after neg al
Is this a bug? I'm not very familiar with asm.
Thanks!
can you help me, how to print value of variable at console after summation of the variables value?
example:
MOV AL, NUM1 ; NUM1=15d
ADD AL, NUM2 ; NUM2=34d
ADD AL, NUM3 ; NUM3=56d
how i can print the total value in console? I'm very stuck even I refer the load example. Thank you!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.