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 
by

Assembly Online Compiler

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.

About Assembly

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.

Syntax help

Assembly language usually consists of three sections,

  1. Data section

    To initialize variables and constants, buffer size these values doesn't change at runtime.

  2. bss section

    To declare variables

  3. text section

    _start specifies the starting of this section where the actually code is written.

Variables

There are various define directives to allocate space for variables for both initialized and uninitialized data.

1. To allocate storage space to Initialized data

Syntax

variable-name    define-directive    initial-value 
Define DirectiveDescriptionAllocated Space
DBDefine Byte1 byte
DWDefine Word2 bytes
DDDefine Doubleword4 bytes
DQDefine Quadword8 bytes
DTDefine Ten Bytes10 bytes

2. To allocate storage space to un-initialized data

Define DirectiveDescription
RESBReserve a Byte
RESWReserve a Word
RESDReserve a Doubleword
RESQReserve a Quadword
RESTReserve a Ten Bytes

Constants

Constants can be defined using

1. equ

  • To define numeric constants
CONSTANT_NAME EQU regular-exp or value

2. %assign

  • To define numeric constants.
%assign constant_name value

3. %define

  • To define numeric or string constants.
%define constant_name value

Loops

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.

Procedures

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