LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-07-2017, 05:25 PM   #1
danymu
LQ Newbie
 
Registered: Jun 2017
Posts: 1

Rep: Reputation: Disabled
Beginner questions about assembly language


1- Assembly Language Step-by-Step: Programming with Linux2 Oct 2009 by Jeff Duntemann or https://www.tutorialspoint.com/assembly_programming/
for beginner?
4- I need an advice about how to study assembly.
1- In what year of learning assembly language may i found jobs?
2- Which assembly jobs can i found after two years of learning assembly?
 
Old 06-07-2017, 05:50 PM   #2
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
I'd cook with a high level programming lang and add the assembly as a topping.
 
Old 06-07-2017, 06:17 PM   #3
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,623

Rep: Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695
Finding jobs that you can do BETTER if you know assembler is easy. Finding one with assembler as a requirement is rare. Finding one with that as the MAJOR requirement is VERY rare.

If you want to be a developer or software engineer, continue with assembler as it makes you THINK into the machine. An invaluable skill! But also learn at least TWO higher level languages. By the time you finish BOTH may be obsolete, but you will find that picking up a new language once you have mastered two is easier. With every language you add, learning the next is easier than learning the last.
 
1 members found this post helpful.
Old 06-07-2017, 07:54 PM   #4
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940
Quote:
Originally Posted by danymu View Post
1- Assembly Language Step-by-Step: Programming with Linux2 Oct 2009 by Jeff Duntemann or https://www.tutorialspoint.com/assembly_programming/
for beginner?
4- I need an advice about how to study assembly.
1- In what year of learning assembly language may i found jobs?
2- Which assembly jobs can i found after two years of learning assembly?
Years ago, I worked on an IBM operating system (VM/SP, VM/XA, VM/HPO) that was – at the time – coded entirely in assembly language. But, even then, IBM was moving to the use of a high-level language (of their own devising) instead.

Today, quite frankly, CPU architectures are not designed to work with programs that are "hand-coded." Instead, they are built to efficiently process the output of optimizing compilers, and CPU manufacturers such as Intel and AMD work very closely with compiler writers ... and, offer compilers of their own ... in order to transform typical programming-language constructs into efficient code, and to detect and "do the right thing for" any particular CPU model.

To see how assembly code is typically used these days, you need look no farther than the /arch subtree of the Linux kernel, where all "architecture-specific" programming will be found. You'll basically find two sorts of things there:
  1. "Trampoline" code, which is used immediately after Linux is launched on a particular hardware system, in order to set up that hardware sufficiently to let it then "bounce into" the Linux environment.
  2. Short subroutines, which implement specific low-level operations in the actual manner required by "this architecture."
These days, you basically don't find significant work being done "in assembly." Although "C" compilers have traditionally had the asm { ... } directive, Microsoft's latest compilers have actually taken it out(!).
 
2 members found this post helpful.
Old 06-08-2017, 05:51 AM   #5
Laserbeak
Member
 
Registered: Jan 2017
Location: Manhattan, NYC NY
Distribution: Mac OS X, iOS, Solaris
Posts: 508

Rep: Reputation: 143Reputation: 143
sundial is right. Except for a few subroutines where speed is of the essence and you make extensive use of specialized processor commands (like SSE or equivalent commands in a video compressor or something similar), you're much better off just using C. It's much more legible, maintainable, etc. Assembly, almost by definition, inevitably leads to almost incomprehensible spaghetti code and modern compilers know more about instruction scheduling, pipelining, and optimization than you do. Assembly was important back in the old days like early Macs. where everything was prototyped in Pascal and then hand compiled to Motorola 68000 assembly to squeeze everything out of old processors. This really isn't necessary any more.
 
Old 06-08-2017, 06:03 AM   #6
Laserbeak
Member
 
Registered: Jan 2017
Location: Manhattan, NYC NY
Distribution: Mac OS X, iOS, Solaris
Posts: 508

Rep: Reputation: 143Reputation: 143
Not that you shouldn't learn it, I took an assembly language class in college and it helped me a lot in understanding programming, but I don't really ever actually use assembly.
 
Old 06-08-2017, 08:19 AM   #7
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940
Also ... here is a link to Intel's online source of the eight(!) manuals which describe the external characteristics of their current microprocessors!

The IBM/360 "Principles of Operation" ("POP") manual consisted of one document designed to be printed using a line-printer.

Manuals describing other microprocessors – 6502, 68000, Z-80 – were similarly thin, and the architectures they described were relatively uncomplicated.

Architectures today are too complex for humans to write efficient code for them using manual methods. But, compilers can do so easily. In the aforementioned manuals, Intel describes how best to write the source-code for maximum optimizability. They provide compilers themselves, and they also work very closely with compiler-writers such as Microsoft and the gcc team.

I recommend that you spend some time in the /arch folders of the Linux source tree, not just for x86 but also for other architectures. You should know enough about x86 assembly to be able to read and understand the subroutines that you find in the proper subdirectories. But you need not expect to write one, yourself.

"Low-level operations" are also best done by using "well-known libraries" to do the actual work. These libraries have been carefully crafted and compiled to do the work, and it is known that they do so correctly.

Last edited by sundialsvcs; 06-08-2017 at 08:21 AM.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] A problem. When using assembly language to call the C language function mirage1993 Programming 3 10-03-2014 08:15 AM
Assembly Language ashish anand Programming 9 10-18-2011 10:53 PM
assembly language ramorous24 Programming 4 08-21-2011 11:31 PM
Is Assembly Language considered a Structured Language? theKbStockpiler Programming 4 01-30-2011 09:09 AM
Beginner question for C/Assembly p4nk4j Programming 5 05-18-2007 08:43 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration