LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 01-28-2020, 07:27 PM   #1
theKbStockpiler
Member
 
Registered: Sep 2009
Location: Central New York
Distribution: RPM Distros,Mostly Mandrake Forks;Drake Tools/Utilities all the way!GO MAGEIA!!!
Posts: 986

Rep: Reputation: 53
labels in ASM


Hi. I want to be able to do simple assembly programming. I have studied some asm and higher level languages in the past but I can't find a definition of a (label) with context.

It just looks to me like a identifier to throw on a line that gives a temporary reference point for the compiler. Why not just use 'line one of code' for the first statement and then use 'line 2 of code' for the second?

What's the naming convention for using labels in any case?

Thank you for your expertise!
 
Old 01-28-2020, 07:43 PM   #2
SoftSprocket
Member
 
Registered: Nov 2014
Posts: 399

Rep: Reputation: Disabled
Quote:
Originally Posted by theKbStockpiler View Post
Hi. I want to be able to do simple assembly programming. I have studied some asm and higher level languages in the past but I can't find a definition of a (label) with context.

It just looks to me like a identifier to throw on a line that gives a temporary reference point for the compiler. Why not just use 'line one of code' for the first statement and then use 'line 2 of code' for the second?
If you refered to line numbers in code you'd have to update all your markers every time you added or remove a preceding line. A label is a simple way to refer to a place in code that you wish to jump to, whether for a loop or a path selection. They exist in many high level languages as well.
 
2 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
Apache asm and asm-util locations for loading server 2.4.9 InterceptorF Linux - Server 4 06-26-2014 12:29 AM
[SOLVED] error: asm/ppc_asm.h: No such file or directory and error: asm/processor.h: No such f Thirupathip Linux - Newbie 3 01-25-2013 03:02 AM
inline asm, 64-bit asm, intercepting segfaults, etc. rainbowsally Programming 0 02-04-2012 05:10 PM
ASM x32 vs ASM x64 Tegramon Programming 3 02-27-2008 02:26 PM
1. how to set labels bottom margin? 2. how to set all labels to be right to left typi dfgfdgdf General 0 03-20-2007 09:43 AM

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

All times are GMT -5. The time now is 11:33 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