Path: csiph.com!1.us.feeder.erje.net!feeder.erje.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: David Brown Newsgroups: comp.compilers Subject: Re: fledgling assembler programmer Date: Wed, 22 Mar 2023 14:39:59 +0100 Organization: A noiseless patient Spider Sender: johnl@iecc.com Approved: comp.compilers@iecc.com Message-ID: <23-03-005@comp.compilers> References: <23-03-001@comp.compilers> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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 X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com In-Reply-To: <23-03-001@comp.compilers> Xref: csiph.com comp.compilers:3407 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 . 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.)