stc xchg edx,eax bound ecx,QWORD PTR [eax] loope 0x20 in al,dx cmp ebp,edi adc eax,0x27663694 sub BYTE PTR [edi+0x47af48c1],bl xchg ebp,eax pop ecx pop ss adc BYTE PTR [ebx+0x3b04d7aa],cl mov esp,esp fwait pop es jmp 0x21 mul BYTE PTR [ecx+0x547c9b3d] movs DWORD PTR es:[edi],DWORD PTR ds:[esi] movs BYTE PTR es:[edi],BYTE PTR ds:[esi] mov ecx,0x3f45521 cmp bl,BYTE PTR [eax-0x518ff066] or al,0x1c loop 0xffffffbd and eax,0x9f0831fa or al,al (bad) push esi push esi outs dx,DWORD PTR ds:[esi] bound esi,QWORD PTR [esi+0x56c7b420] lds edx,FWORD PTR [edx] rol DWORD PTR fs:[edi-0x460c6f2e],0x3e pop esi push edi (bad) cmp al,BYTE PTR [edi-0x6e] lock xchg BYTE PTR [edx-0x7b220900],dh push 0x312415fe neg BYTE PTR [edi-0x50] pop ebx out 0xba,al adc BYTE PTR [edx-0x75],0x53 inc esi xor DWORD PTR [ebp+eax*1-0x64],edi sbb eax,0xa6019b27 fist WORD PTR ds:0x62d98e4d jmp 0x7450599b push edx lods al,BYTE PTR ds:[esi] iret add ecx,eax bound ebp,QWORD PTR [ebx-0x28] ds:0x56b1b15f,al jg 0xb5 fst QWORD PTR [eax-0x65] (bad) jne 0xa4 nop adc al,0x37 outs dx,BYTE PTR ds:[esi] fadd st,st(6) adc DWORD PTR [esi-0x55],ecx leave adc ebx,DWORD PTR [ebx+0x1e0807c0] mov dh,0xb2 mov BYTE PTR [esi-0x64],0xd3 push ds clc mov DWORD PTR [edi+0x33339823],ebx mov WORD PTR [edi+ebp*1],fs ss test al,0x5e lds edi,FWORD PTR [ecx+0x4a] rcl BYTE PTR [ebx-0x6aa6a784],1 aad 0xf1 test esi,edi pop edi das mov eax,ds:0x493051ee sub DWORD PTR [eax+0x456953a1],edx jmp 0x47c6:0xd4e7f077 push ds in eax,dx rol BYTE PTR [ebp+edi*8-0xed6be04],1
Write, Run & Share Assembly code online using OneCompiler's Assembly online compiler for free. It's one of the robust, feature-rich online compilers for Assembly language. Getting started with the OneCompiler's Assembly compiler is simple and pretty fast. The editor shows sample boilerplate code when you choose language as Assembly
and start coding.
Assembly language(asm) is a low-level programming language, where the language instructions will be more similar to machine code instructions.
Every assembler may have it's own assembly language designed for a specific computers or an operating system.
Assembly language requires less execution time and memory. It is more helful for direct hardware manipulation, real-time critical applications. It is used in device drivers, low-level embedded systems etc.
Assembly language usually consists of three sections,
Data section
To initialize variables and constants, buffer size these values doesn't change at runtime.
bss section
To declare variables
text section
_start
specifies the starting of this section where the actually code is written.
There are various define directives to allocate space for variables for both initialized and uninitialized data.
variable-name define-directive initial-value
Define Directive | Description | Allocated Space |
---|---|---|
DB | Define Byte | 1 byte |
DW | Define Word | 2 bytes |
DD | Define Doubleword | 4 bytes |
DQ | Define Quadword | 8 bytes |
DT | Define Ten Bytes | 10 bytes |
Define Directive | Description |
---|---|
RESB | Reserve a Byte |
RESW | Reserve a Word |
RESD | Reserve a Doubleword |
RESQ | Reserve a Quadword |
REST | Reserve a Ten Bytes |
Constants can be defined using
CONSTANT_NAME EQU regular-exp or value
%assign constant_name value
%define constant_name value
Loops are used to iterate a set of statements for a specific number of times.
mov ECX,n
L1:
;<loop body>
loop L1
where n specifies the no of times loops should iterate.
Procedure is a sub-routine which contains set of statements. Usually procedures are written when multiple calls are required to same set of statements which increases re-usuability and modularity.
procedure_name:
;procedure body
ret