assembly

DEBUG For Linux

I'm now extending more my x86 Assembly knowledge and one of the best tools for learning is DEBUG. When I was learning Assembly(past 4 years) I was on Windows, but now I'm on Linux Ubuntu and the DEBUG tool is only for Windows. Then I want to know is there is any port or equivalent for Linux. Remember that I don't want to debug my code, ...

Text Editor For Assembly

I'm now developing on Assembly under Linux, but I love to develop on a editor that have syntax highlight feature. Then I want to know what is the best one for Assembly(that has syntax highlight). ...

Using gdb as a monitor?

Can GDB be used as if it was a traditional assembly monitor? As soon as you step into eg. library code it returns: No function contains program counter for selected frame GDB the debugger is able to step into unknown code but GDB the UI stops working. In this related question you can find a pair of proposed solutions but neither qui...

Hello World Bootloader

I'm learning MIPS Assembly by the book MIPS Assembly Language Programming, but my I've just started learning MIPS because I want to build a MIPS OS, but now as I can see, there isn't many documentation(I that isn't any) talking about boot and these things. Then I'm asking here for someone that have already done this to point me at the ri...

help on win32 api in assembly

why are the structure declarations in assembly different from those in the win32 api documentation.(i am coming from c++ and trying my hand at assembly language) for example i got this function prototype from icezelion's tutorials(tutorial3) WNDCLASSEX STRUCT DWORD cbSize DWORD ? style DWORD ? ...

Assembler and Jump instruction (how does it work)

How does jump works ? Does it set the IP register or does it increase it ?? Is it relative or absolute change of place were we execute the code? ...

Clarification on Binary file (PE/COFF & ELF) formats & terminology

I'm confusing little in terminology. A file that is given as input to the linker is called Object File. The linker produces an Image file, which in turn is used as input by the loader. I got this from "MS PE & COFF Specification" Q1. Image file is also referred to as Binary Image, Binary File or just Binary. Right? Q2. So, a...

VA (Virutual Adress) & RVA (relative virtual address)

A file that is given as input to the linker is called Object File. The linker produces an Image file, which in turn is used as input by the loader. A blurb from Microsoft Portable Executable "and Common Object File Format Specification" RVA (relative virtual address). In an image file, the address of an item after it is lo...

GMP-Assembly code???

Where i can find ASSEMBLY code for my program written for gmp-5.0.0 im using UBUNTU and G++ compiler.. command for compiling the code is "g++ test.cc -o outp -lgmp" actually i want to know what happens internally in terms of 1's and 0's... how the memory allocation will takes place and how the operations will performed on RAW bits!! ...

restriction on using #define'd functions/inline functions inside Assembly files

Is there any restriction on using #define'd functions/inline functions inside Assembly files. I referred bsd kernel in which two different implementations are defined. One is macro and other is a normal function ( both are for same function) In the c file splx is defined asfunction, http://ftp.hu.freebsd.org/pub/netbsd/NetBSD-release-4...

Assembly Coding Standard / Best Practices

I've know 8086 Assembly and now I'm learning MIPS Assembly by reading the books MIPS Assembly Language Programming and See MIPS Run, but I never stopped to think about the coding standards/best practices of Assembly. I want to turn me in a better developer each day, then want to know this to improve myself. ...

Regular Expressions and Assembly

I know 8086 Assembly and learning MIPS Assembly. Also, I'm learning Regular Expressions, then I want to know: How can I use Regular Expressions on them? ...

How might I convert Intel 80386 Machine Code to Assembly Language?

I've been given the following task: Consider the following sequence of hexadecimal values: 55 89 E5 83 EC 08 83 E4 F0 31 C9 BA 01 00 00 00 B8 0D 00 00 00 01 D1 01 CA 48 79 F9 31 C0 C9 C3 This sequence of bytes represents a subroutine in Intel 80386 machine language in 32-bit mode. When the instructions in this subro...

Translate a code using pointer, to Assembly in Pascal - Delphi

Hi all. I have this code below, and I want to translate it to ASM, to use in Delphi too. var FunctionAddressList: Array of Integer; type TFunction = function(parameter: Integer): Integer; cdecl; function Function(parameter: Integer): Integer; var ExternFunction: TFunction; begin ExternFunction := TFunction(FunctionAddress...

EXE format - how to Interpret CS:IP

Hi I've got a problem with EXE format http://www.delorie.com/djgpp/doc/exe/. I've loaded my file as hex into my editor (qedit) then I disassembled that and I was surprised ! My CS equalled 0 and IP also but code of my program (maybe it's 00000040 ?) is starting several bytes later and I can't be even sure because the code which I wrote...

how to get the size of a C global array into an assembly program written for the avr architecture compiled with gcc

I have a .c file with the following uint8_t buffer[32] I have a .S file where I want to do the following cpi r29, buffer+sizeof(buffer) The second argument for cpi muste be an immediate value, not a location. But unfortunately sizeof() is a C operator. Both files are compiled to separate object files and linked together afterward...

a Simple "Hello World" Inline Assembly language Program in C/C++....

i use devcpp and borland c compiler.... asm { mov ax,4 // (I/O Func.) mov bx,1 // (Output func) mov cx,&name // (address of the string) mov dx,6 // (lenght of the string) int 0x21 // system call } in the above code snippets i want to print a string with the help of assembly language... ...

GCC Extended ASM syntax: load 128-bit memory location as source

Hi all, GCC generates this code for the shuffle() below: movaps xmm0,XMMWORD PTR [rip+0x125] pshufb xmm4,xmm0 Ideally this should be: pshufb xmm4,XMMWORD PTR [rip+0x125] What is the extended ASM syntax to generate this single instruction? Many thanks, Adam PS: The commented out intrinsic generates the optimal code for this examp...

Design patterns in Assembly language

Basically, are there any? I'm tempted to think they do exist. For example, a template method can be implemented as a series of "jumps", where the target of a jump is specified "externally". Singleton will be just a well-known location in memory/code, etc. I'm by no means an assembly expert, so these examples might turn out to be comp...

What am I doing wrong? (Simple Assembly Loop)

It won't let me post the picture. Btw, Someone from Reddit.programming sent me over here. So thanks! TITLE MASM Template ; Description ; ; Revision date: INCLUDE Irvine32.inc .data myArray BYTE 10, 20, 30, 40, 50, 60, 70, 80, 90, 100 .code main PROC call Clrscr mov esi, OFFSET myArray mov ecx, LENGTHOF myArray mov e...