Path: csiph.com!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: gah4 Newsgroups: comp.compilers Subject: Re: fledgling assembler programmer Date: Tue, 21 Mar 2023 17:23:25 -0700 (PDT) Organization: Compilers Central Sender: johnl@iecc.com Approved: comp.compilers@iecc.com Message-ID: <23-03-002@comp.compilers> References: <23-03-001@comp.compilers> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="8619"; mail-complaints-to="abuse@iecc.com" Keywords: assembler, history Posted-Date: 21 Mar 2023 23:57:53 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:3404 On Tuesday, March 21, 2023 at 2:40:22 PM UTC-7, Alan Beck wrote: > I have started to learn Assembler out of an old book. (Hopefully enough related to compilers.) Not so long after I started learning OS/360 Fortran and PL/I, I found the compiler option for printing out the generated code in sort-of assembly language. (Not actually assembleable, though.) About that time, I also had source listings on microfilm of the OS/360 Fortran library, and some other Fortran callable assembly programs. And also, the IBM S/370 Principles of Operation. With those, and no actual book meant to teach assembly programming, I figured it out, and started writing my own programs, though mostly callable from Fortran or PL/I. Compilers today don't write out the generated code in the same way, and there aren't so many libraries around to read. And, personally, 8086 is my least favorite to write assembly code in. Learning C, and thinking about pointers and addresses, is a good start toward assembly programming. In any case, I don't think I have any idea how others learn programming for any language, and especially not for assembly programming. I used to read IBM reference manuals, cover to cover. That was mostly high school years. After that, I figured out how to use them as reference manuals. Most of my 80x86 assembly programming in the last 20 years is (re)writing this one program: rdtsc: rdtsc ret When called from C, and returning a 64 bit integer, it return the Time Stamp Counter. (Works for 32 bit code, returning in EDX:EAX. 64 bit is different.) C programming works so well, that there are only a few things you can't do in C, and so need assembly programs.