Author Topic: Beginning with NASM  (Read 21313 times)

Offline annebeatriceMIS

  • Jr. Member
  • *
  • Posts: 4
Beginning with NASM
« on: September 27, 2016, 12:52:43 AM »
Hello everyone!

I am very new to NASM or Assembly Programming... I saw, despite it being a low level programing language, it is still on the top lists of most commonly used programming language... I decided to take on this journey to discover the wonders of assembly programming... Likewise, NASM seems to be the most popular and trusted on this category... So... I'm starting this thread to help others like me (scratch knowledge) in NASM...

Likewise, for experts to help and guide me on my programming through this thread... :)

For anyone who will be contributing, I thank you from the bottom of my heart in advance!!! <3 <3 <3

Offline annebeatriceMIS

  • Jr. Member
  • *
  • Posts: 4
Re: Beginning with NASM
« Reply #1 on: September 27, 2016, 01:36:35 AM »
Correct me if I'm mistaken of my understanding of what is assembly language program...

Assembly Programming is a low level programming language that most may ask "why do I need to learn this when we have high level languages already?" I mean, as with the case of our programming classes in our undergrad, we start out with C then OOP with C++, Java, then a framework with .NET programming.. and all of a sudden, after you are well-versed with these languages, you will be introduced with assembly programming... why do we need to learn this?

DIRECT ANSWER: Direct manipulation with computer hardware...

While programming with Java, C++, etc, we do not worry of anything at all with the hardware... To be specific, the CPU...

Assembly Language Programming is a language designed for computer architectures of our systems. With this, we can control how instructions and data are allocated on the CPU cache and registers, how they interfaced with other hardware components, BIOS and the operating system, how they are moved from one point to another, and how they are accessed and processed.

So basically, upon learning assembly programming, you will understand a little more about the behavior of your hardware.

If you want to become experts in computer organization and architecture, learning assembly language programming is the best way.

Offline debs3759

  • Global Moderator
  • Full Member
  • *****
  • Posts: 224
  • Country: gb
    • GPUZoo
Re: Beginning with NASM
« Reply #2 on: September 27, 2016, 01:38:07 AM »
Do you know what you want to be able to do first, and what operating system you want to write code for? The "Programming with NASM" and "Example Code" sub forums both contain helpful threads for DOS, Windows and Linux programmers, as well as sample code to run in any OS. It'll be easier to help you if we know what your aims are.
My graphics card database: www.gpuzoo.com

Offline annebeatriceMIS

  • Jr. Member
  • *
  • Posts: 4
Re: Beginning with NASM
« Reply #3 on: September 27, 2016, 02:00:55 AM »
Do you know what you want to be able to do first, and what operating system you want to write code for? The "Programming with NASM" and "Example Code" sub forums both contain helpful threads for DOS, Windows and Linux programmers, as well as sample code to run in any OS. It'll be easier to help you if we know what your aims are.

Hello sir debs3759!!!  :) :) :) First, thank you for your immediate notice on my thread... As a start, I would like to learn and share afterwards why assembly programming is important... I am not actually getting a full grasp of its uses yet... Maybe after some few coding I would understand... Right now, I am using a Windows-based operating system and Intel x64 architecture... so most probably, my programming will be towards this PC I am using... Would that be fine for some experiments?

Also, I don't know yet what my end goal will be coz I want to understand fully first what the language is... I might know the "big program" I would develop then... :)

Offline avcaballero

  • Full Member
  • **
  • Posts: 133
  • Country: es
    • Abre los Ojos al Ensamblador
Re: Beginning with NASM
« Reply #4 on: September 27, 2016, 02:20:33 PM »
> Assembly Programming is a low level programming language that most may ask "why do I need to learn this when we have high level languages already?"

My answers:
1) Because I can do it
2) Because then I will understand better many subjects in high level programming
3) Because I will be able to do things in a reduce size
 ;D

Offline annebeatriceMIS

  • Jr. Member
  • *
  • Posts: 4
Re: Beginning with NASM
« Reply #5 on: September 30, 2016, 08:56:56 AM »
> Assembly Programming is a low level programming language that most may ask "why do I need to learn this when we have high level languages already?"

My answers:
1) Because I can do it
2) Because then I will understand better many subjects in high level programming
3) Because I will be able to do things in a reduce size
 ;D

WOW! You gave the most inspiring answer sir!

Offline debs3759

  • Global Moderator
  • Full Member
  • *****
  • Posts: 224
  • Country: gb
    • GPUZoo
Re: Beginning with NASM
« Reply #6 on: September 30, 2016, 06:01:14 PM »
There are things you just cannot code without some knowledge of hardware programming in assembly language (well, you could probably by object files to do the work, but that isn't always feasible). For example, I'm currently updating my CPUID code (well, researching CPUs from the last 12 years and adding data to my datasheet ready to write the code - research is always the first step). There are no standard functions for much of it in high level languages.

Also, I can write smaller, faster apps in assembly language than most compilers could produce. This will be very useful if I ever get to code for embedded applications with limited memory or slower processors. I find that assembly language skills help me focus on the algorithms I use, and for me that always made high level language code easier to work with.

At the end of the day, for me, assembly language is fun :)
My graphics card database: www.gpuzoo.com

Offline ranaamir91

  • New Member
  • Posts: 1
Re: Beginning with NASM
« Reply #7 on: November 14, 2016, 02:59:38 AM »
Hi, i have windows based OS and intel 64bit , so i got downloaded the nasm from http://www.nasm.us/pub/nasm/releasebuilds/2.12.02/
then here
http://www.nasm.us/pub/nasm/releasebuilds/2.12.02/win64/
installed the nasm, it is running but afd is not working, how do you can help me to get out of this problem.please guide me , here are the screen shots of the problem


Offline soulvomit

  • Jr. Member
  • *
  • Posts: 31
Re: Beginning with NASM
« Reply #8 on: November 14, 2016, 12:01:46 PM »
Hi, i have windows based OS and intel 64bit , so i got downloaded the nasm from http://www.nasm.us/pub/nasm/releasebuilds/2.12.02/
then here
http://www.nasm.us/pub/nasm/releasebuilds/2.12.02/win64/
installed the nasm, it is running but afd is not working, how do you can help me to get out of this problem.please guide me , here are the screen shots of the problem


Don't know what afd is, but you need to be in the directory where afd.exe is installed or provide the full path to where it is installed or add it as an enviromental variable.

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: Beginning with NASM
« Reply #9 on: November 14, 2016, 03:40:28 PM »
"afd"... can't be that German anti-immigrant party. "Advanced fullscreen debugger"? Last I knew, it was a 16-bit debugger. If so, won't run on 64-bit. Could that be your problem? I don't think it's a "Nasm problem", but give us more information...

Best,
Frank


Offline dreamCoder

  • Full Member
  • **
  • Posts: 107
Re: Beginning with NASM
« Reply #10 on: December 23, 2016, 07:04:48 PM »
I see that "MIS" name from the OP. Seems like MIS people are starting to get interested in low-level programming. Tired of diagrams and notations? :D

ASM will ever grow in popularity considering that many HLL compilers out there seemed to be unable to cope with new instruction sets offered by the CPUs, hence you get lots and lots of goofy-looking intrinsics. So unlike older 32-bit generations, new generations HLL programmers are highly likely to be knowledgeable in ASM as well. So in the near future we can see hybrid programmers dealing both with 'user requirements' and low-level system requirements. It's inevitable. Added with android, raspberry PI and something similar, the abstractions layers between high-level and low level stuff is getting thinner.

In these kind of demanding situations, NASM is your best bet :D