{ Game : eldenring.exe Version: Date : 2022-02-25 Author : cfe This script does blah blah blah } [ENABLE] bNoClip: db 1 globalalloc(cNoClipTread,$1000) createthread(cNoClipTread) label(cbStop) registersymbol(cbStop) label(cStart) label(cEnding) cNoClipTread: sub rsp,28 cStart: mov rcx,10 call Sleep cmp byte ptr[cbStop],1 je cEnding mov rax,[camadr] test rax,rax je cStart mov rsi,rax mov rdi,rax mov r15,fSpeed mov rcx,57 // VK_W call GetAsyncKeyState test eax,eax je @f call SinCos movss xmm1,[r15] divss xmm1,[cfTen] movups xmm0,[rsi] // Vector Pos // X += Sin Hor movss xmm2,[cCalculated] mulss xmm2,xmm1 addss xmm0,xmm2 // Y -= Sin Ver shufps xmm0,xmm0,E1 movss xmm2,[cCalculated+8] mulss xmm2,xmm1 subss xmm0,xmm2 // Z += Cos Hor shufps xmm0,xmm0,C6 movss xmm2,[cCalculated+4] mulss xmm2,xmm1 addss xmm0,xmm2 // XYZ store shufps xmm0,xmm0,C9 movups [rsi],xmm0 @@: mov rcx,53 // VK_S call GetAsyncKeyState test eax,eax je @f call SinCos movss xmm1,[r15] divss xmm1,[cfTen] movups xmm0,[rsi] // Vector Pos // X -= Sin Hor movss xmm2,[cCalculated] mulss xmm2,xmm1 subss xmm0,xmm2 // Y += Sin Ver shufps xmm0,xmm0,E1 movss xmm2,[cCalculated+8] mulss xmm2,xmm1 addss xmm0,xmm2 // Z -= Cos Hor shufps xmm0,xmm0,C6 movss xmm2,[cCalculated+4] mulss xmm2,xmm1 subss xmm0,xmm2 // XYZ store shufps xmm0,xmm0,C9 movups [rsi],xmm0 @@: mov rcx,41 // VK_A call GetAsyncKeyState test eax,eax je @f call SinCosAngle movss xmm1,[r15] divss xmm1,[cfTen] movups xmm0,[rsi] // Vector Pos // X += Sin Hor - 90° movss xmm2,[cCalculated] mulss xmm2,xmm1 addss xmm0,xmm2 shufps xmm0,xmm0,E1 // Z += Cos Hor - 90° shufps xmm0,xmm0,C6 movss xmm2,[cCalculated+4] mulss xmm2,xmm1 addss xmm0,xmm2 // XYZ store shufps xmm0,xmm0,C9 movups [rsi],xmm0 @@: mov rcx,44 // VK_D call GetAsyncKeyState test eax,eax je @f call SinCosAngle movss xmm1,[r15] divss xmm1,[cfTen] movups xmm0,[rsi] // Vector Pos // X -= Sin Hor - 90° movss xmm2,[cCalculated] mulss xmm2,xmm1 subss xmm0,xmm2 shufps xmm0,xmm0,E1 // Z -= Cos Hor - 90° shufps xmm0,xmm0,C6 movss xmm2,[cCalculated+4] mulss xmm2,xmm1 subss xmm0,xmm2 // XYZ store shufps xmm0,xmm0,C9 movups [rsi],xmm0 @@: mov rcx,20// VK_SPACE call GetAsyncKeyState test eax,eax je @f // Y += speed movss xmm0,[rsi+4] movss xmm1,[r15] divss xmm1,[cfTen] addss xmm0,xmm1 movss [rsi+4],xmm0 @@: mov rcx,11// VK_CTRL call GetAsyncKeyState test eax,eax je @f // Y -= speed movss xmm0,[rsi+4] movss xmm1,[r15] divss xmm1,[cfTen] subss xmm0,xmm1 movss [rsi+4],xmm0 @@: jmp cStart cEnding: add rsp,28 ret SinCos: fld [rdi+B4] // Hor fsin fstp [cCalculated] fld [rdi+B4] // Hor fcos fstp [cCalculated+4] fld [rdi+B8] // Ver fsin fstp [cCalculated+8] ret DegreeToRad: movss xmm0,[PI] movss xmm1,[HALF] divss xmm0,xmm1 mulss xmm0,[RIGHTANGLE] ret SinCosAngle: call DegreeToRad movss xmm1,[rdi+B4] // Hor subss xmm1,xmm0 movss [cCalculated],xmm1 fld [cCalculated] fsin fstp [cCalculated] movss xmm1,[rdi+B4] // Hor subss xmm1,xmm0 movss [cCalculated+4],xmm1 fld [cCalculated+4] fcos fstp [cCalculated+4] ret cbStop: db 0 cCalculated: dd 0 // Hor Sin dd 0 // Hor Cos dd 0 // Ver Sin cfTen: dd (float)10 PI: dd (float)3.14159265359 HALF: dd (float)180.0 RIGHTANGLE: dd (float)90.0 startfreecam: db 0 [DISABLE] bNoClip: db 0 cbStop: db 1 startfreecam: db 1 unregistersymbol( * )
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