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
Click For Summary

Discussion Overview

The discussion revolves around finding software packages mentioned in the book "Art of Intel x86 Assembly" and their compatibility with various assemblers, particularly Flat Assembler. Participants share resources, experiences, and insights related to learning Assembly language, including integration with high-level languages.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Homework-related

Main Points Raised

  • One participant seeks alternative sources for software packages referenced in the book, noting that the original FTP site is no longer functional.
  • Another participant expresses gratitude for the book link and discusses the utility of Assembly language within high-level languages like C or Fortran, suggesting that Assembly can enhance performance in specific scenarios.
  • Questions arise regarding the compatibility of the book's syntax with Flat Assembler, with some participants suggesting that while machine instructions should be consistent, there may be differences in pseudo instructions.
  • A participant mentions using Microsoft Visual Studio for writing Assembly code, highlighting the benefits of inline assembly for simplifying function implementation.
  • Participants share additional links to resources that may contain the required software packages, with one suggesting that the provided link might match the PDF content.
  • Concerns are raised about ensuring that the assembler and linker are compatible, as mismatches could lead to errors during the linking process.

Areas of Agreement / Disagreement

Participants express varying opinions on the compatibility of different assemblers with the book's content, and there is no consensus on the best source for the software packages. The discussion remains unresolved regarding the exact compatibility and availability of the resources.

Contextual Notes

There are limitations regarding the availability of certain software packages, and participants note potential differences in syntax and functionality between various assemblers. The discussion does not resolve these issues.

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.