assembly

intel machine code to assembly code question.

hello,experts,i wonder the intel x86 machineCode/assemblyCode conversion is singleSide or bothSide? means: assemblyCode ---> machineCode and machineCode ---> assemblyCode are both available. since the x86 machineCode is vary in size (1-15 byte),and opcode vary in (1-3 byte),how to determine one opcode is 1byte or 2byte or 3byte ? and...

How can I get the source lines inline with the assembly output using GCC?

I'd like to get the C source lines inline with the assembly output to see what code is being generated. I have tried GCC options like -S -Wa,-ahlms (and even -Wa,--gstabs 'cause I read it somewhere). Oh! BTW, I am on a Mac so I don't have objdump. (Sorry this is short, I have to get off the train!) Output of gcc pc-clisp.c -S -g -fve...

How do you push a string with inline assembly

I know you can simply do char msg[] = "lol"; _asm { push msg } But is there a way to do it in the assembly part? _asm { push "lol" } This comes up with a compiler error I'm a beginner, be nice :P ...

Why Delphi compiler does not inline assembly functions?

Sometimes I write very short assembly functions like function SeniorBit(Value: LongWord): Integer; asm OR EAX,EAX JZ @@Done BSR EAX,EAX INC EAX @@Done: end; that seems to be the best candidates for inlining: function SeniorBit(Value: LongWord): Integer; inline; but Delphi compiler does not ...

What does '__asm__(".previous");' mean?

Hello everyone. While trying to compile my project, that uses some third party headers, with mingw 4.4, I encountered the following error: Assembler messages: Error: junk at end of line, first unrecognized character is '"' Error: unknown pseudo-op: '.previous' I found this code at the end of one of the included headers: __asm_...

8086 assembly right mouse click interrupts

Hi guys I am working on a project in 8086 assembly on windows machine and I need to know which mouse button has been clicked. What are the interrupts for this? or how do I go about finding this out? Thanks ...

functions in assembler

hi, i have philosophised about the purpose of stack a little bit and after some coding i figured out what is it's strength. The only thing that lies in my stomache is how does it work with functions? I tried to make some easy function for adding two numbers using universal registers but I suppose that's not how does it work in C for exa...

Electronic resources for learning Z/OS assembler?

This is a follow up to this question. I'm totally blind so printed books aren't an option. All the recommended books appear to have been published before electronic publishing got started. I've been able to learn the very basics but would like something between here's what a register is, and the IBM reference material. Searching the norm...

C++ word to bytes

Hi, I tried to read CPUID using assembler in C++. I know there is function for it in , but I want the asm way. So, after CPUID is executed, it should fill eax,ebx,ecx registers with ASCII coded string. But my problem is, since I can in asm adress only full, or half eax register, how to break that 32 bits into 4 bytes. I used this: #inc...

MIPS division of signed integers

I'm wondering if anyone might know how to perform a division between two signed integers in MIPS, WITHOUT using the built in division operations. In the problem specs, I'm told the divisor register, ALU, and quotient register are all 32 bits wide, and the remainder register is 64 bits. ...

Using gdb to single-step assembly code outside specified executable causes error "cannot find bounds of current function"

I'm outside gdb's target executable and I don't even have a stack that corresponds to that target. I want to single-step anyway, so that I can verify what's going on in my assembly code, because I'm not an expert at x86 assembly. Unfortunately, gdb refuses to do this simple assembly-level debugging. It allows me to set and stop on app...

Recommendation on win32 assembly reader

I'm a beginner to reading assembly language and I'm looking for a good assembly reader for win32, which one do you recommend? ...

Windows assembly heap and stack?

OS: Windows 7 32bit So in like c++ one has a heap and a stack. But i've been starting on some assembly learning lately and haven't seen anything of the sort, only a stack but it just looks like pure memory. So is heap and stack implementation specific for c++ and other languages? Or do you still get allocated a heap and stack in assemb...

Print double-word number to string

i have double word number in si:bx. How can i write it to array as string? ...

How can I know what this does?

I got this piece of Assembly code extracted from some piece of software, but unfortunately I don't know anything of assembler and the bits I touched of Assembler was back in the Commodore Amiga with the 68000. Can anybody guide me on how I could understand this code without me needing to learn assembler from scratch, or just tell me wha...

Beginner learning assembly preserving esp after function calls

I'm a beginner learning some assembly, when preserving the ESP register before a function call does it matter if you do it by adding or subtracting? hard to explain, consider the following mov esi, esp sub esp, 12 // on 32bit OS this would mean that there are 3 arguments to the function // push, function call etc cmp esi, esp // should ...

Error : java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(I)V

Hiii.... I am developing small spring application. I have to store the details of the student information in the database. I have develop one simpleformcontroller.I have used netbeans + hibernate mapping + spring. when I deploy the project,the following errors is occured. please help me.. Thanks in advance..... My spring-c...

Using assembler x86 to write to .net

I'm a total beginner when it comes to computer languages, and was asked for a code to write .NET with assembler x86, and i'm stuck here at the moment. Any basic code lines would work, still couldn't find any on the web. ...

reading a BYTE as a DWORD in Masm

Hi, once again I'm doing MASM programming. I'm trying to write a procedure using the Irvine32 library where the user enters a string which is put into an array of BYTEs with ReadString. Then it loops over that arrray and determines if each character is a number. However, when I try cmp [buffer + ecx], 30h MASM complains about comparin...

Learning about the low level

I'm interested in learning more about the PC from a lower (machine) level. I graduated from a school which taught us concepts using the Java language which abstracted out that level almost completely. As a result I only learned a bit from the one required assembly language course. In order to cram in ASM and quite a few details about ar...