basm Questions
4
Solved
I was trying to run the following,
type
Vector = array [1..4] of Single;
{$CODEALIGN 16}
function add4(const a, b: Vector): Vector; register; assembler;
asm
movaps xmm0, [a]
movaps xmm1, [b]
...
3
Solved
3
Solved
This is easy in AVX with the VBROADCASTS command, or in SSE if the value were doubles or floats.
How do I broadcast a single 8-bit value to every slot in an XMM register in Delphi ASM?
2
Solved
According to the "Using Assembler in Delphi", eax will contain Self. However, the content of eax is 0 as shown. I wonder what is wrong ?
procedure TForm1.FormCreate(Sender: TObject);
var
X, Y: Po...
3
Solved
For my BigInteger code, output turned out to be slow for very large BigIntegers. So now I use a recursive divide-and-conquer algorithm, which still needs 2'30" to convert the currently largest know...
0
Another discrepancy between Delphi and FPC BASM:
program PopTest;
{$IFDEF FPC}
{$mode delphi}
{$asmmode intel}
{$ELSE}
{$APPTYPE CONSOLE}
{$ENDIF}
var
B: LongWord;
procedure Pop(A: LongWord...
Transmigrant asked 30/12, 2015 at 9:24
13
Solved
I am learning assembler quite a while and I am trying to rewrite some simple procedures \ functions to it to see performance benefits (if any). My main development tool is Delphi 2007 and first exa...
Lode asked 12/9, 2009 at 11:28
1
Solved
I'm working on a JIT compiler, and trying to figure out how to output proper cleanup blocks for managed types such as strings.
The disassembly of the cleanup block for a function that has one loca...
2
Solved
I have some Delphi/assembly code that compiles and works fine (XE2) for Win32, Win64, and OSX 32. However, since I need it to work on Linux, I have been looking at compiling FPC versions of it (so ...
Accommodate asked 15/5, 2013 at 8:6
3
Solved
I have a problem. I have following x86 delphi code which is written in ASM. I need to port this to AMD64?
type
TCPUID = array[1..4] of Longint;
function GetCID : TCPUID; assembler; register;
as...
Granny asked 14/12, 2012 at 7:3
3
Solved
I want to be able to convert a single line of ASM into shellcode. I.E:
CALL EBX
How do I go about doing this, and also being able to properly convert this shellcode so that I can store it in a v...
2
Solved
I have some sample source code for OpenGL, I wanted to compile a 64bit version (using Delphi XE2) but there's some ASM code which fails to compile, and I know nothing about ASM. Here's the code bel...
Incase asked 22/5, 2012 at 3:11
2
Solved
What I would like to do is, using assembly, create a class instance, call one of it's methods and then free the instance.
I know I'm missing something very important and probably very simple, but ...
Scalpel asked 16/5, 2012 at 13:54
1
Solved
How can I check using Delphi 2007 that a box is AVX capable.
My question is only restricted to querying the support in the CPU (Assumption is made that the OS is OK / Windows 7 with SP1).
The PDF...
Buckle asked 30/3, 2012 at 11:32
3
Solved
The c++ way to do it is here (under Windows).
The same answer but under Linux using GCC.
Excerpt of the relevant asm code as I understand it:
mov eax, 1
cpuid
mov features, edx
I'm not very co...
1
Solved
Let's say that I want to read from absolute address gs:$30 in 64bit mode, so the asm code looks something like:
asm
mov rax, gs:[$30]
end;
...and compiler translate this code to...
65 48 8B 0...
Flyer asked 15/12, 2011 at 13:51
2
Solved
A recent Delphi project i've inherited has a procedure in ASM. I'm a complete ASM newbie, so i dont understand it. I've read up on the various ASM instructions to try and decipher the procedures fl...
5
Solved
Question
Are there any resources for learning how to use assembly in Delphi?
Background Information
I've found and read some general assembly and instruction set references (x86, MMX, SSE etc)....
Togliatti asked 17/8, 2011 at 1:37
5
Solved
If I do this
var
a,b,c:cardinal;
begin
a:=$80000000;
b:=$80000000;
c:=a+b;
end;
c will equal 0, since the addition overflowed. What's the best way to catch this overflowed boolean? (a+b<a...
Cosher asked 20/6, 2011 at 22:45
5
Solved
I have this procedure that swaps the bytes (low/high) of a Word variable (It does the same stuff as System.Swap function). The procedure works when the compiler optimization is OFF but not when it ...
1
Solved
I am having a problem to access an element of an array in assembly(delphi).
The code is:
procedure TMaskBit.AllocBuffer;
begin
SetLength(DataIn, 6); //array of integer
DataIn[0] := 1 ;
DataIn[...
3
Solved
I am using Delphi 2010. Is it possible to tell Delphi to not generate a prologue for a function? I'm writing some pure assembly functions like this:
procedure SomeAssembly; stdcall;
begin
asm
.....
2
Solved
I am running into some weird behaviour with Delphi's inline assembly, as demonstrated in this very short and simple program:
program test;
{$APPTYPE CONSOLE}
uses
SysUtils;
type
TAsdf = class...
Tenpenny asked 9/2, 2011 at 22:1
2
Solved
When writing a Delphi procedure or function in assembly code, which registers must be saved and restored to the original value at the end of the procedure?
When calling another Delphi procedure or...
Adlai asked 24/8, 2010 at 14:27
1 Next >
© 2022 - 2024 — McMap. All rights reserved.