Where can I find the packages mentioned in Art of Intel x86 Assembly?

  • Thread starter Thread starter MathematicalPhysicist
  • Start date Start date
  • Tags Tags
    Assembly Teaching
AI Thread Summary
The discussion centers on self-teaching Assembly language using the book "Art of Intel x86 Assembly" and the Flat Assembler software. Users express gratitude for the book link and inquire about additional resources, particularly packages mentioned in the text that are no longer accessible via the provided FTP site. The conversation highlights the integration of Assembly code within high-level languages like C or Fortran, emphasizing that while pure Assembly may be challenging for complete programs, it can significantly enhance performance in critical sections of code. Participants suggest starting with simple loops or functions, utilizing inline Assembly in environments like Microsoft Visual Studio, and ensuring compatibility between the book's syntax and the Flat Assembler. They also recommend checking alternative links for necessary software and resources.
MathematicalPhysicist
Science Advisor
Gold Member
Messages
4,662
Reaction score
372
I want to teach myself Assembly language, so I downloaded the next text:
http://www.ic.unicamp.br/~pannain/mc404/aulas/pdfs/Art Of Intel x86 Assembly.pdf
and the next software:
http://flatassembler.net/

Do I need to download anything else?
in the first link it says the packages that are used in the text can be downloaded from the website:
ftp.cs.ucr.edu

but the latter ftp site doesn't seem to work anymore.
Does someone know where may I found the packages that were in this site?

Thanks in advance.
 
Technology news on Phys.org
MathematicalPhysicist said:
I want to teach myself Assembly language, so I downloaded the next text:
http://www.ic.unicamp.br/~pannain/mc404/aulas/pdfs/Art Of Intel x86 Assembly.pdf
First of all: Thank you for the link. I've missed it.

I don't think that you can make some usable program, only using assembler code ( all this Windows-XX ). But you can include assembler-code in some inner loop in a high-level-language like C or Fortran, speeding up the calculations very much. You can do anything with assembler ( also bugs ).

In some languages you can just write:

high-level
high-level
asm
pop eax
pop ebx
sub eax,ebx
jnz somewhere
etc.
endasm
high-level

Also you can link assembler-coded functions/procedures/libraries into the high-level language, where a binary-to-object converter is needed.

What I'm saying is: Consult the high-level language to be used as for the output-format from the assembler to be accepted. Many high-level languages are included in an "IDE" that contains what is needed.

Hope you will enjoy it.
 
Does the book above compatible (with the syntax) with flat assembler?

I have quite a long list of stuff to learn this summer... :-D
 
MathematicalPhysicist said:
Does the book above compatible (with the syntax) with flat assembler?
As for the "machine instructions" the syntax must be the same.

There may be some difference as for pseudo instructions, but if you have some "mismatch" ( the assembler will tell you ), just look the correct syntax up as for the flat assembler in its manual. That's the least problem.

Just start with a small loop, or even a simple high-level statement. Substitute it by assembler, make it work, and expand the substitutions from here.
 
If you have Microsoft Visual Studio, you can write assembly code either inline or as standalone files. If you're concerned about the cost, the Express version is free.

The example below has two functions that take two args and return the sum of the passed args. The second function (mySumOfInts) is coded in inline assembly. Writing just the body of the function eliminates a lot of extra work that normally has to be done when you write pure assembly, such as keeping track of the stack frame and copying the parameters from the stack.

Note: I'm using VS 2013, in which scanf is obsolete, so I'm using the MS-specific scanf_s function.

C:
#include<stdio.h>

int SumOfInts(int, int);
int mySumOfInts(int, int);

int main(void)
{
   int sum;
   int a, b;
   printf("Enter a: ");
   scanf_s("%d", &a);
   printf("Enter b: ");
   scanf_s("%d", &b);
   sum = SumOfInts(a, b);
   printf("The sum is %d\n", sum);
   sum = mySumOfInts(a, b);
   printf("The sum is %d", sum);
   return 0;
}

int SumOfInts(int first, int second)
{
   return first + second;
}

// Assembly version of the above function
// This function copies the first argument to the EAX register and then adds the second argument.
// When the function returns, the result is in EAX, which is where the caller expects it to be.
int mySumOfInts(int primero, int segundo)
{
   _asm {
   mov eax, dword ptr[primero]
   add eax, dword ptr[segundo]
}
 
Last edited:
@256bits , does the software in the last link in the website you gave correspond to the version being used in the book I gave a link here?
 
If you use an assembler make sure the linker recognizes your files. You will get an error if you use a linker to link an object file with a different format.
 
Back
Top