Re: fledgling assembler programmer

David Brown <david.brown@hesbynett.no>
Wed, 22 Mar 2023 14:39:59 +0100

          From comp.compilers

Related articles
fledgling assembler programmer Alan.Beck@darkrealms.ca (2023-03-21)
Re: fledgling assembler programmer gah4@u.washington.edu (gah4) (2023-03-21)
Re: fledgling assembler programmer tkoenig@netcologne.de (Thomas Koenig) (2023-03-22)
Re: fledgling assembler programmer anton@mips.complang.tuwien.ac.at (2023-03-22)
Re: fledgling assembler programmer david.brown@hesbynett.no (David Brown) (2023-03-22)
Re: fledgling assembler programmer gneuner2@comcast.net (George Neuner) (2023-03-22)
Re: fledgling assembler programmer gah4@u.washington.edu (gah4) (2023-03-22)
Re: fledgling assembler programmer tkoenig@netcologne.de (Thomas Koenig) (2023-03-23)
Re: fledgling assembler programmer arnold@skeeve.com (2023-03-23)
Re: fledgling assembler programmer gah4@u.washington.edu (gah4) (2023-03-24)
Re: fledgling assembler programmer DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2023-03-25)
[1 later articles]
| List of all articles for this month |
From: David Brown <david.brown@hesbynett.no>
Newsgroups: comp.compilers
Date: Wed, 22 Mar 2023 14:39:59 +0100
Organization: A noiseless patient Spider
References: 23-03-001
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="28326"; mail-complaints-to="abuse@iecc.com"
Keywords: assembler
Posted-Date: 22 Mar 2023 15:06:57 EDT
In-Reply-To: 23-03-001

On 21/03/2023 22:40, Alan Beck wrote:
> //Hello all,//
>
> Hi,
>
> I have started to learn Assembler out of an old book.
>
> It is ancient (2003) but I don't think 8086 programming has changed
> much. But the tools have.
>
> I took assembly language in school but dropped out. Now I want another
> go at it.
>
> Would someone be my Mentor and answer a ton of questions that would
> dwindle out as time went on?
>
> If it's OK, we could do it here. Or netmail
>
> Books are from a bookstore.


I have both these books on my bookshelf - but it was a /long/ time ago
that I read them.


The big question here is /why/ you are doing this. The 8086 is ancient
history - totally irrelevant for a couple of decades at least. Modern
PC's use x86-64, which is a very different thing. You don't learn
modern Spanish by reading an old Latin grammar book, even though
Spanish is a Latin language.


There are, perhaps, four main reasons for being interested in learning
to write assembly:


1. You need some very niche parts of a program or library to run as
fast as feasible. Then you want to study the details of your target
processor (it won't be an 8086) and its instruction set - typically
focusing on SIMD and caching. Done well, this can lead to an order of
magnitude improvement for very specific tasks - done badly, your
results will be a lot worse than you'd get from a good compiler with
the right options. The "comp.arch" newsgroup is your first point of
call on Usenet for this.


2. You need some very low-level code for things that can't be
expressed in a compiled language, such as task switching in an OS.
Again, you need to focus on the right target. "comp.arch" could be a
good starting point here too.


3. You are working on a compiler. This requires a deep understanding of
the target processor, but you've come to the right newsgroup.


4. You are doing this for fun (the best reason for doing anything) and
learning. You can come a long way with getting familiar with
understanding (but not writing) assembly from looking at the output of
your favourite compilers for your favourite targets and favourite
programming languages on <https://godbolt.org>. Here I would pick an
assembly that is simple and pleasant - 8086 is neither.


I would recommend starting small, such as the AVR microcontroller
family. The instruction set is limited, but fairly consistent and easy
to understand. There is vast amounts of learning resources in the
Arduino community (though most Arduino development is in C or C++), and
you can buy an Arduino kit cheaply. Here you can write assembly code
that actually does something, and the processor ISA is small enough that
you can learn it /all/.




If none of that covers your motivation, then give some more details of
what you want to achieve, and you can probably get better help.
(comp.arch might be better than comp.compilers if you are not interested
in compilers.)


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.