ia32

testing if a register equals itself in ia32

(ia32) for example, test $eax, $eax why would you ever want to do that? it does $eax & $eax, right? shouldn't this always set the flag register to say that they are equal..? addendum: so test will set the ZF (as mentioned below) if the register is zero. so is test (as used above) mainly just used to tell if a register is empty? and Z...

How do I go about Power and Square root functions in Assembly(IA32)?

How do I go about Power and Square root functions in Assembly Language (with/out) Stack on Linux. Edit 1 : I'm programming for Intel x_86. ...

Assembly - Array (Linux)

In assembly how do i Print the values of an Array? Now in this program I also have to print its values < Index entered in by the user. .intel_syntax noprefix .include "console.i" .data index: .long 0 array: .long 1,2,3,4,5,6,7,8,9,10,11,12 # Array initialized value: .long 0 .text ask1: .asciz "Enter an...

Subtracting Decimal Values (Assembly)

How do I subtract a decimal value in assembly. IA32 (linux) 1: mov edx, 1/2 sub ecx, ebx sub ecx, edx mov bal2, ecx I tried this but it some how skips the subtraction with the decimal. And if I enter .5 it gives me an error. error:junk `.5' after expression ...

Where can I find programs for practicing C and assembler(IA32)?

Guys I'm a novice. I have learnt C and Assembly(IA32) on Linux and I will also be learning a few more languages this year. I want to make my fundamentals strong and for that I need some tips from you guys as in, where will I find programs for practice? so that I solve them and get more and more experience. Any good web links that would...

Simple division function in IA32 assembly

I am working on an assignment for my class. My C++ code calls the _Divide function to take in 2 values to divide and return into 'Result'. To start I move -1 into eax. Once I'm done with the process, my eax keeps returning '-1' as the value. What could I be doing wrong? Here's my assem code: public _Divide .386 .model flat .code _Divide...