assembly

Improving field get and set performance with ASM or Javassist

I would like to avoid reflection in an open source project I am developing. Here I have classes like the following. public class PurchaseOrder { @Property private Customer customer; @Property private String name; } I scan for the @Property annotation to determine what I can set and get from the PurchaseOrder reflectively...

Execute Assembly from Pascal

How can I execute this code from Pascal : MOV EAX, variable1 PUSH EBX, EAX MOV EAX, variable2 POP EBX AND EBX, EAX Where I define method/function arguments in function(variable1, variable2). This is a school assignment I don't know why they are making us do P...

How to convert an integer to a floating point value in x86 ASM?

I need to multiply an integer (two's compliment) by a floating point constant. Here is what I have: .data pi dd 3.14 int dd 0ah .code fld pi ??? fmul ST(1), ST How can I convert int to a floating point value for multiplying against pi? ...

Calling SDL/OpenGL from Assembly code on Linux

I'm write a simple graphic-based program in Assembly for learning purpose; for this, I intended to use either OpenGL or SDL. I'm trying to call OpenGL/SDL's function from assembly. The problem is, unlike many assembly and OpenGL/SDL tutorials I found in the internet, the OpenGL/SDL in my machine apparently doesn't use C calling conventi...

ASM: What does an 'h' suffix mean?

In x86 assembly, what does an h suffix on numbers represent? For example: sub CX, 13h ...

Is QEMU good for learning programming in assembler for ARM and PowerPC?

Hello! I want to learn programming in assembler for PowerPC and ARM, but I'm unable to buy real hardware for this purpose. I'm thinking about using QEMU for that. However I'm not sure if it emulates both architectures enough well, that I'll compile and run my programs in native assembler on it? ...

assembly of pdp-11(simulator)

I have this code on pdp-11 tks = 177560 tkb = 177562 tps = 177564 tpb = 177566 lcs = 177546 . = torg + 2000 main: mov #main, sp mov #kb_int, @#60 mov #200, @#62 mov #101, @#tks mov #clock, @#100 mov #300, @#102 mov #100, @#lcs loop: mov @#tks,r2 aslb r2 bmi loop ...

Fast format conversion open source library

Can someone advise me open source format conversion library? Optimized for SSE, SSE2. Formats for conversion: I420, YUY2, RGB(16-bit, 32-bit). I found only VirtualDub Kasumi library. ...

How to move value from the stack to ST(0)?

I am having trouble believing the following code is the most efficient way to move a value from the stack to ST(0): .data var dd 4.2 tmp dd ? .code mov EAX, var push EAX ; top of stack now contains a value ; move it to ST(0) pop EAX mov tmp, EAX fld tmp Is the temporary variable really necessary? Further, is there an easier way to g...

GCC: Compile to assembly with clarified correspondence to code?

When you break into the debugger in VS and open the disassembly window, each assembly fragment is displayed below it's corresponding code section (more or less). GCC with -S outputs only the stripped down assembly. Is there an option in GCC to show some correspondence to the original code? Source code is C++. ...

Assembly instruction address...

Why every time when I disassembly the same .exe file the same instruction is in the same address? And what address is that(RAM? HDD? Virtual?)? ...

C inline assembly of x86 fbstp instruction

Was wondering how to inline a usage of fbstp on a 32 bit I86 architecture. I tried something like int main( ) { double foo = 100.0; long bar = 0; asm( "pushl %1; fbstp %0" : "=m"(bar) : "r"(foo) ); ... But bar is unchanged. I have tried reading everything I can find on this but most example ...

Calculating ABSOLUTE ADDRESS / Registry values in Assembler (Intel 8086)

Hi guys. I know the ABSOLUTE ADDRESS of the next instruction is located 50000 (hex), and I know that the hex value that should be in the IP Register is 4000 (hex). My question is... Why does it work like this? I have the other registry values available if they're needed. Any idea? ...

Has anyone been successful at a assembler based led blinker for an xcore?

I am liking the http://www.xmos.com chips but want to get a lower level understanding of what is going on. Basically assembler. I am trying to sort out something as simple as an led blinker, set the led, count to N clear the led, count to N, loop forever. Sure I can disassemble a 10 line XC program, but if you have tried that you will...

Interrupt №13 (ah=48) - not working

I want fetch the parameters of my hard disk. Using the technique described here. This is code showing normal parameters of floppy disk: mov dl,00h mov ah,08h int 13h This is code, showing not valid parameters of hard disk (may be, my hard disk space is big (LBA)): mov dl,80h mov ah,08h int 13h And I've written this code: mov dl,...

Differences between Assembly Code output of the same program

I have been trying to replicate the buffer overflow example3 from this article aleph one I'm doing this as a practice for a project in a computer security course i'm taking so please, I badly need your help. I've been the following the example, performing the tasks as I go along. My problem is the assembly code dumped by gdb in my compu...

Substracting 64bit numbers in x86 assembler?

How can I substract 64 bit numbers using 386 assembler? ...

Are programming languages and methods inefficient? (assembler and C knowledge needed)

Hi, for a long time, I am thinking and studying output of C language compiler in assembler form, as well as CPU architecture. I know this may be silly to you, but it seems to me that something is very ineffective. Please, don´t be angry if I am wrong, and there is some reason I do not see for all these principles. I will be very glad if ...

How to get every virtual function index just as the compiler does?

Is there some plugin or tool which can read a .h file (or simply modify Intellisense itself) and spit out every function and it's virtual function table index? There's a pattern which I have yet to figure out having to do with polymorphism, and it gets 5x harder when you start to have 5 classes or more deriving from each other. No matter...

Problem with stack based implementation of function 0x42 of int 0x13

I'm trying a new approach to int 0x13 (just to learn more about the way the system works): using stack to create a DAP.. Assuming that DL contains the disk number, AX contains the address of the bootable entry in PT, DS is updated to the right segment and the stack is correctly set, this is the code: push DWORD 0x00000000 add ax, 0x00...