Assembly language was nominated as a Engineering and technology good article, but it did not meet the good article criteria at the time (September 17, 2020). There are suggestions on the review page for improving the article. If you can improve it, please do; it may then be renominated. |
This is the
talk page for discussing improvements to the
Assembly language article. This is not a forum for general discussion of the article's subject. |
Article policies
|
Find sources: Google ( books · news · scholar · free images · WP refs) · FENS · JSTOR · TWL |
Archives: 1 |
This
level-4 vital article is rated B-class on Wikipedia's
content assessment scale. It is of interest to the following WikiProjects: | ||||||||||||||||||||||||||||||||||
|
Can you add the pronunciation of assembly? In particular, assembly as in light or as in literature? And where is the stress? Assembly or assembly? Thanks-- Stemby ( talk) 10:43, 17 June 2008 (UTC)
In "See also" section the point "List of assemblers" linked to Comparison of assemblers! And where the link to MACRO-11 should be added? -- Tim32 ( talk) 19:20, 22 June 2008 (UTC)
Since this section has to deal mostly with x86 assembly language, I suggest that it be moved there. ( rCX ( talk) 03:59, 4 July 2008 (UTC) )
The representation in here does it refer to the hexadecimal address that machines use, such as when Blue Screen of Death error, they consists of a particulara hardware address in hexadecimal form. (I have very little macros programming foundation.)
This representation is usually defined by the hardware manufacturer, and is based on abbreviations (called mnemonics) that help the programmer remember individual instructions, registers, etc
By the way some interpreter use to translate XML documents according to XML schema, are they consider assemblers?
-- Ramu50 ( talk) 03:24, 13 July 2008 (UTC)
This is mostly OT, but I can't stand to let a question on BSODs go unanswered. :) In most blue screen messages, one or more of the hex numbers you see are virtual addresses, and often one of them will be the virtual address of an instruction. If you could look in memory at that address you would find the numeric (usually displayed in hex) coding of the actual instruction (or "opcode"). The blue screen however never displays the instructions themselves, only their addresses. The documentation that comes with the Windows Debugging Tools will tell you all about how to interpret blue screen data. The debugger can of course display the hex coding for the instructions and can also "disassemble" them, turning them back into assembly language mnemonics. There is a decent quick tutorial on using the debugger here: [1]. If you want to know more than most of us need to know about how Intel x86 instructions are encoded, download the three volumes of "IA32 Architecture Software Developer's Manual" from the Intel site, particularly volumes 1 and 2. You don't need to know the instruction coding in depth unless you're writing a compiler, an assembler, a debugger, or the microcode for the CPU itself, but it helps if you understand the general principles and if you can recognize a few common patterns. I can also highly recommend Matt Pietrek's articles from MSJ, "Just Enough Assembly to Get By", for a look at how the x86 instruction set is actually used by everyday code. There's nothing there on how the instructions are coded into hex, though, only on the assembler mnemonics.
I never heard of an XML interpreter called an assembler - they're usually called interpreters, or some more specialized name depending on their function. Jeh ( talk) 08:02, 16 July 2008 (UTC)
-- Fasmlib keeps cropping up throughout wikipedia Assembler articles ---
Seems to me the author of Fasmlib is quietly seeking to advertise his product through wikipedia. Fasmlib isnt even a working product as far as I can tell, nor is it unique in what it attempts to deliver ( Randolph Hyde has done a similar, yet complete work in the past ). —Preceding unsigned comment added by 217.42.215.104 ( talk) 21:45, 16 November 2008 (UTC)
Hi MrOllie. I'm publishing (with permission) Doug Dingus' comprehensive guide to Assembly Language for the Absolute Begineer. Not trying to sell anything, but I think it would be a valuable external resource that goes into detail beyond what would be appropriate for an article. This is inline with the External Link guidlines. —Preceding unsigned comment added by Nmcclana ( talk • contribs) 02:07, 18 February 2009 (UTC)
Pagetable.com was removed from the external links/software section - pagetable.com is a unique resource for assembly language analysis and history/evolution of the language across various architectures and compilers; I believe it comes into category 3, Wikipedia:EL#What_should_be_linked. One of the admins should examine the content of pagetable.com and other links and not just delete en masse because they don't have either the expertise or time to identify useful resources 121.45.167.176 ( talk) 20:29, 19 March 2010 (UTC)
as per this edit that was reverted [2], I think it would add something to have a brief description of one pass vs two pass assemblers. I know what they are, but don't have any references at the moment (although I'm sure I could find some). However, I have not heard of "Jove" pass assembly? Does anyone know what this is? -- stmrlbs| talk 18:30, 3 June 2009 (UTC)
However, if anyone feels that they can improve it.. be bold!! -- stmrlbs| talk 02:37, 4 June 2009 (UTC)
References
{{
cite book}}
: |website=
ignored (
help)
The list of manuals, tutorials, etc. seems too long. I would argue that only links to sites/pages which are about assembly language in general should go here. Links for specific assembly languages for specific machines or chips belong on the article about that machine or chip. —Preceding unsigned comment added by Yworo ( talk • contribs) 23:06, 9 June 2009 (UTC)
I'd also propose that we link to the Open Directory page at http://www.dmoz.org/Computers/Programming/Languages/Assembly/ Wikipedia can never be a complete directory to pages about every assembly language and we should not try to be. A link to Open Directory will give the read a much better overview and categorization of assembly languages.
I think this article would be of more benefit to the public if there was a section for manuals, and a section for tutorials. A manual would be any assembly manual put out by the company that made that particular computer (IBM/Unix/etc.). Online manuals are really of great benefit to anyone interested or working in the field. Tutorials would be those tutorials written by experienced people/teachers/universities/etc. Right now.. it is all jumbled together. Not very user friendly. -- stmrlbs| talk 23:10, 9 June 2009 (UTC)
Yworo, I created a new section: Assemblers#List_of_assemblers_for_different_computer_architectures which just has an introductory sentence explaining that a list of assemblers and architectures is on an associated page. Now, I think we can go through the links, and add those links to different assemblers into the table on the other page (if they are not already there), and take them off this page. The table is a more user friendly presentation of the information, than a bunch of links. You are right in that all the jumbled links with no organization is not good. If you need any help figuring out how to put something in the table, let me know. I will be glad to help -- stmrlbs| talk 19:29, 11 June 2009 (UTC)
I made a long research to use the Modulo operator in Assembly language and the closest I found was the DIV operator however it's not available on the simple educational Assembler PEP8 [3] (French operators instruction Chapitre 7 in http://www.er.uqam.ca/nobel/k20250/Notes_cours.html).
Is there a simpler way of doing a modulo ? Perhaps doing bitwise operations ? -- DynV ( talk) 19:29, 12 June 2009 (UTC)
Only thing I can think of is performing the DIV operation to return an integral value and multiplying it with the divisor then subtracting it from the dividend. This is probably how it's done physically in architectures. ChazZeromus ( talk) 18:05, 13 August 2009 (UTC)
I thought I'd put a little section about the ModR/M operand specifier byte underneath the opcode section. Please edit if their are any erroneous typings in my words lol. ChazZeromus ( talk) 18:11, 13 August 2009 (UTC)
As far as i know, *all* assemblers have directives for entering Hex and other literal values. There is nothing special about what you are describing. Good little assemblers everywhere, let you enter the byte codes "in the same sequence" that you want them to appear in memory, the only issue being endieness. It would be a very unusual assembler indeed that would reverse the order of an arbitrary sequence of bytes for you. Maybe as a Unicode function, but not otherwise, I don't recall ever encountering such a directive. Assemblers only align the bytes on memory boundaries when and where you tell them to by using the appropriate directives they have no crystal ball to allow them to predict where the alignment should be placed. And unless you are dealing with FORTH and writing to BLOCKS which are obsolete, then assemblers do NOT "deposit object directly ... in specific tracks and sectors" assemblers use ordinary files same as any other program and they generate executable machine code not objects. Well, perhaps this is something unique to the VIC20? does the VIC not have a file system? I've never used a VIC, maybe it does use tracks and sectors, some early mainframes did use tracks and sectors because that was before the development of file systems.
OldCodger2 (
talk) 22:02, 15 September 2012 (UTC)
The main page for this article includes a reference to an assembler named "French Silk" and touts it as being the smallest assembler ever written. In fact, the Instant Editor Assembler (known more by its acronym, IEA) was the smallest assembler around. I am not sure who wrote it, but remember it was marketed through Randy Chase's Commodore Users' Group Newsletter. I am not a fan of the IEA, as I was one of many dissatisfied customers who bought a copy of it, and tried to use it. French Silk, on the other hand, had a much better reputation for speed of execution and assembling. Dexter Nextnumber ( talk) 08:22, 2 January 2010 (UTC)
Some assemblers do limited Peephole optimization, e.g., converting long branches to short branches. I believe that there should be a discussion of this in the article, preferably with some examples. Shmuel (Seymour J.) Metz Username:Chatul ( talk) 12:39, 10 August 2010 (UTC)
Some terms have different definitions in different assemblers. In particular, some assemblers use the term pseudo-instruction to refer to assembler directives. The article should avoid conveying an impression that the nomenclature used is universal. Shmuel (Seymour J.) Metz Username:Chatul ( talk) 13:22, 10 August 2010 (UTC)
A pseudo-opcode is a directive, and some assembler use only the term pseudo-op for the functions listed in the article as pertaining to directives. The text
* An '''assembler directive''' or ''pseudo-opcode'' is a command given to an assembler. These directives may do anything from telling the assembler to include other source files, to telling it to allocate memory for constant data. Some assemblers use special syntax for directives; others do not.
should be reinstated
Shmuel (Seymour J.) Metz Username:Chatul (
talk) 14:57, 22 August 2010 (UTC)
In addition to recognizing all the 709 machine operation codes and extended operation codes listed in the 709 Reference Manual, the FAP language also recognizes the following psueod-operations, described in detail in the succeeding chapters.
OK, I am a little late to this one, but it seems to me that different assemblers, or assemblers for different processors, use different names for some terms. A table indicating the meaning, and the different names would be useful. Still remembering from when I was first learning about assemblers, this was what confused me. The descriptions, in at least the IBM manuals, of assemblers mostly describes what the assembler does. You need to find somewhere else the descriptions of machine instructions, and how to use them. Gah4 ( talk) 05:25, 29 November 2016 (UTC)
As far as I can tell, IBM OS/360 assemblers call all these assembler instructions, and PDP-10/ MACRO-10 [1] call them all pseudo-ops.
And VAX/Macro [2] seems to call them assembler directives. Gah4 ( talk) 06:31, 29 November 2016 (UTC)
References
{{
cite book}}
: |website=
ignored (
help)
{{
cite book}}
: |website=
ignored (
help)
Are there any data to support the claim that most assemblers have symbol management, e.g., name spaces? There are certainly many assemblers that don't. Shmuel (Seymour J.) Metz Username:Chatul ( talk) 18:13, 23 August 2010 (UTC)
I did in fact initiate a discussion prior to adding a {{ Systemic bias}}; the proper course for someone who disagreed would have been to discuss the reasons instead of removing the template. Shmuel (Seymour J.) Metz Username:Chatul ( talk) 15:09, 7 September 2010 (UTC)
There is a comment suggesting that the following text is unclear
Pseudo-opcodes are often used within the instruction set to support alternative mnemonics for instructions that the CPU designer did not specifically include. For example, many older CPUs do not have a true nop (no operation) instruction. But often there is another instruction that can be used instead with the same effect as a nop. In 8086 CPUs the instruction xchg ax,ax is used for nop. With nop being a pseudo-opcode to encode the instruction xchg ax,ax. Some disassemblers recognize this and will decode the xchg ax,ax instruction as nop.
I agree that it is misleading, and suggest the following
extended mnemonics are often used to support specialized uses of instructions, often for purposes not obvious from the instruction name. For example, many CPU's do not have an explicit NOP instruction, but do have instructions that can be used for the purpose. In 8086 CPUs the instruction xchg ax,ax is used for nop, with nop being a pseudo-opcode to encode the instruction xchg ax,ax. Some disassemblers recognize this and will decode the xchg ax,ax instruction as nop. Similarly, IBM assemblers for System/360 and System/360 use the extended mnemonics NOP and NOPR for BC and BCR with zero masks.
Shmuel (Seymour J.) Metz Username:Chatul ( talk) 15:22, 8 September 2010 (UTC)
While it is certainly true that most compilers and operating systems in the 1950s and 1960s were written in assembler, the article overstates the degree of dominance. Notable examples of languages used for system implementation include
Shmuel (Seymour J.) Metz Username:Chatul ( talk) 13:12, 18 November 2010 (UTC)
I think that such lists should be avoided, there are too many languages for them to be documented in this fashion. For instance, you somehow missed naming what is arguably the most influental language of all, a language that has probably been used to create more operating systems than any other. That language is 'C' which often has the nickname of Portable Assembly or High Level Assembly. So how many other languages got missed from that list? How about something exotic like FORTH which was an operating system complete unto itself? You have defined a nearly impossible task. If you limit it to generalities, then yes, I agree most operating system development in the later days was done in higer level languages. The earlier it was, the more likely it was to be done in assembly, it was an evolutionary process -- go back far enough and it was done in hand coded binary.
OldCodger2 (
talk) 07:52, 29 January 2013 (UTC)
There is a general convention to use italics to represent quoted material that is not surrounded by quotaion marks or apostrophes. User:Nigelj recently added quotation marks around material that already was framed by double apostrophes, the Wiki markup for italics. E.g.,
" floating point partial arctangent"
Shouldn't it be one or the other but not both? Shmuel (Seymour J.) Metz Username:Chatul ( talk) 14:48, 19 November 2010 (UTC)
The section on macros has a lot of good information, but it seems to get very off-topic. It starts with a good discussion of the use of macros, and then diverges into specific uses of macros in legacy systems, using the macro assembler as a code generator for COBOL, history of the C preprocessor, and then discussions of the underlying structure of Prolog, LISP, and Forth. I'd like to trim this section down dramatically, and move the more advanced content to another article. Any comments? Dead Horsey ( talk) 06:55, 21 December 2010 (UTC)
I corrected the dates for some milestones in the evolution of assembler languages, and in the process I wondered whether it would be appropriate to add references, e.g., 705 Autocoder, 709 FAP, for the approximate dates. Would that be helpful, or would it be TMI? Shmuel (Seymour J.) Metz Username:Chatul ( talk) 21:12, 18 January 2011 (UTC)
I added a citation needed template to the text referring to CPU's being idle. My first take was that while it was not true for mainframes that it was plausible for desktops, but then it occurred to me that the delays in loading the all too common bloated web pages might be due to CPU consumption for rendering. If anybody has hard data on CPU consumption in various applications on various classes of machines, citations would be appreciated. Shmuel (Seymour J.) Metz Username:Chatul ( talk) 13:22, 19 January 2011 (UTC)
Hi all,
I stumbled across this page via Random Article, it brought back happy memories of writing TSRs and trying to understand PC BIOS routines (ahem). I feel that the first main section (Why use assembly language?) dives a little deep into the nitty-gritty for an opener. But the first para of the Historical perspective section is just what the article needs at the beginning (from a layman's point a view), and I was wondering about incorporating it at the top of the page. MinorProphet ( talk) 23:03, 28 April 2011 (UTC)
The "Why Assembly Language" section focussed on the question why to use assembly language rather than to code mahine instruction dirctly. I think it gives a helpful explanation of the functionality provided by an assembler. But no sensible person will ever code machine instructions directly (e.g. with a binary editor), so this alternative is merely academic. or educational, if you like.
In contrast, the question why to write assembly language rather than a high(er) level language is a serious practical question, and I started reading the section with that question in mind. Because this aspect was not covered, I added some text. Because I am not a professional programmer, I don't know to what extent assembly language is still used today. Perhaps others can add some comments to that extent. Anyway, I am old enough to remember the days when even administrative programs were occasionally written in assembly language. Which is not as bad as it may seem if appropriate macro's and subroutines are used. I guess that the introduction oof C in the 1970's has greatly reduced the need to revert to assembly language. Older languages like COBOL, FORTRAN, ALGOL or even Pascal are less suited to write operating system functions, not to speak about the terrible "esperanto" developed by IBM in the 1960's called PL/I. Rbakels ( talk) 10:35, 9 December 2011 (UTC)
Would it be worth making specific mention of bytecode assemblers (e,g, Jasmin)? Or are these subsumed under the notion of a virtual machine architecture? Peter Flass ( talk) 13:33, 16 January 2012 (UTC)
Well, if you want to go down that path, I think you would have to start talking about Java, Java Script, PHP, etc, etc, all of which are Byte Code Assemblers for Virtual Machines. And none of those would really be appropriate for this page which focuses on Machine Language as excuted by actual Hardware. Certainly we get into grey areas with things like QEMU or MIX, but they still are dealing with Virtual Hardware. I feel that Byte Code would really be a separate topic. As a further consideration, nobody is expected to write programs in the Byte Code itself, it is an internal language that is not normally exposed.
OldCodger2 (
talk) 08:25, 29 January 2013 (UTC)
Rumors are that Sun at least was working on hardware to execute JVM code, and might have even fabbed a chip. I don't like the name byte code, as all that means is that the opcodes and operand specifiers are in units of bytes, which is true for many hardware architectures. Sun calls (called) it JVM, which is fine with me. But maybe I was mixing assembly code and machine code. For most architectures, there is an assembly language designed along with the hardware. As long as there is only one assembler, or all assemblers accept the same input source, there is no confusion. Normally, one can discuss machine code and assembly code without any confusion. Since Jasmin is, as well as I know, not written by Sun, there can be confusion. But Sun (and now Oracle) supply the javap disassembler, so at least some of the assembler syntax had to be defined. (I don't know how close javap output is to what is needed for Jasmin input.) Even though JVM is mostly emulated, without any dedicated hardware, I don't find the fundamental ideas of machine code (JVM bits) and assembly code (Jasmin input source) fundamentally different from other machine code and assembly code. And yes, I was not trying to confuse Java source and assembler source. Gah4 ( talk) 18:57, 25 October 2016 (UTC)
I am currently working on a significant overhaul of the File Allocation Table article for accuracy and completeness, and I have run into a question I was unable to answer myself so far. Perhaps someone of you can help out and provide an answer.
Primer: All FAT formatted volumes since DOS 2.0 contain a BIOS Parameter Block (BPB) in the boot sector describing the volume, wheras DOS 1.x volumes did not. In their course to determine the actual medium format, among other methods MS-DOS, PC DOS and DR-DOS check various byte patterns at offset 000h in a boot sector in order to find out, if a given sector might contain some form of BPB or not. Volumes containing a BPB typically start with a jump instruction at offset 000h to skip over the BPB. Patterns tested for by DOS include a short jump sequence "JMPS ??, NOP" (EBh ??h 90h, as seen since DOS 3.0) or a near jump (E9h ??h ??h, as seen on DOS 2.x formatted disks). On harddisks, DR-DOS (but not MS-DOS/PC DOS) additionally checks for a swapped sequence 90h EBh ??h. (To be precise, these tests alone are not enough to be sure a BPB is present since some DOS 1.1 disks contain EBh ??h 90h as well, but still have no BPB; but I won't go into further details here, as it doesn't matter in regard to my question below.)
On floppies, all these operating systems (MS-DOS, PC DOS and DR-DOS) also check for a byte pattern 69h ??h ??h at offset 000h in the boot sector. This is documented for MS-DOS/PC DOS in at least one book, and it can be found in the OpenDOS source code as well, but without further explanation. Stepping through MS-DOS in a debugger it can be verified that the test actually exists in MS-DOS as well, however, in none of the books I have checked so far, 69h is a valid x86 opcode. So, I wonder what it is. Perhaps a jump instruction for a non-x86 processor? Mind, that the FAT file system was also used on Ataris ( Motorola 680x0) as well as on some very late CP/M variants ( 8080) and all MSX-DOS machines ( Z80), but a starting opcode of 69h does not seem to make sense on these platforms as well. The IBM PC RT was built around the IBM ROMP processor, a RISC processor -- certainly not x86-compatible, but unfortunately I cannot find any opcode maps for this specific processor. What about the extra opcodes supported by the NEC V20/ V30? Or some undocumented opcode? Was there any other platform important enough to have Microsoft or IBM add this special test into the volume mount code of MS-DOS/PC DOS? Windows NT? Any ideas? -- Matthiaspaul ( talk) 01:41, 21 January 2012 (UTC)
I did some more general cleanup on this article, but it is still disorganized and full of redundancies. In particular the sections "current usage" and "typical applications" should be combined, but there are lots of other instances of duplication. Peter Flass ( talk) 13:39, 9 March 2012 (UTC)
Please stop adding these external links:
In the first place, if you look you will notice that the "external links" here are pointers to information, not pointers to specific assemblers - the page List of assemblers is intended for that. In the second place, BBC Basic is not an assembler, even if it contains one. By that criterion, almost all C compilers would be assemblers because they allow imbedded assembly code. Peter Flass ( talk) 23:34, 7 June 2012 (UTC)
As a new editor I cannot yet edit this article. Is there a way to get it unlocked? I only want to make some minor edits to make it read more smoothly. — Preceding unsigned comment added by Geau ( talk • contribs) 12:09, 26 August 2012 (UTC)
Thank you. I can see why it was protected, from looking at the history. I suppose I can wait until I am validated. -- Geau ( talk) 15:41, 26 August 2012 (UTC)
Removed: "Many assemblers have built-in (or predefined) macros for system calls and other special code sequences, such as the generation and storage of data realized through advanced bitwise and boolean operations used in gaming, software security, data management, and cryptography."
The above is just total nonsense. First off, hardly any assembler has anything like this. Second off, if it's a macro library, then that has nothing at all to do with the assembler itself. Third, I know of nothing that is specific to "gaming" that is implemented in any cpu architecture unless it is a custom designed cpu. Intel has announced/documented built-in instructions for AES, but guess what, they have yet to ship any actual x86 cpus which implement these instructions -- see Intel's manual for details. By advanced bitwise operations, I guess you mean the usual shifts and rotates? nothing special about that. me? I've programmed so many different computers using so many different assemblers that I've lost count. OldCodger2 ( talk) 22:13, 15 September 2012 (UTC)
EvilKeyboardCat ( talk · contribs) left the following comment on my talk page. I'm moving it here, as it would be better if other editors of this page joined in.
My edit summary was truncated by Twinkle, but I went on to say something like "hardware architecture can easily be a constraint on the use of high-level languages." Taking the two parts of the edit in turn, the edit changed a sentence to begin "Data sections are instructions used to define data elements..." My point is simply that data sections are sections of assembly programs. They contain instructions, and these instructions may well be pseudo-ops, but sections are not instructions. They are sections of the programm, or sections of memory - however you look at it - that contain instructions, or data. I cannot see how more simply to state that. Adding this minor confusion of terminology is not an improvement. The second part of the edit I reverted changed a sentence to specifically say that "constraints or peculiarities in the target operating system's architecture" may prevent the effective use of higher-level languages (The edit also spoiled the number agreement in the sentence by changing prevent to prevents, even though constraints or peculiarities were still plural). My point was that although the operating system may reflect and model the constraints or peculiarities of the underlying hardware, there is no benefit in specifying that it is not the hardware but the OS that has the constraints or peculiarities. Indeed, very often it is the OS that is being written in Assembler, so that the point as changed becomes rather tautologous. As to my admonishment to "please fix rather than revert", that is what I did: the phraseology was fine beforehand, the edit did not improve it, so I fixed it by putting it back exactly as it was, since there was nothing that I can see that was wrong with those passages in the first place. -- Nigelj ( talk) 16:52, 2 November 2012 (UTC)
Okay, I agree with you on the point that data pseudo-ops are sections not instruction but would it be better for the start of the text on data sections to read "Data section are" not "These are"? Perhaps it could be reworded? Also I think my link to the variables page was justified. EvilKeyboardCat ( talk) 00:09, 3 November 2012 (UTC)
Data Sections is still wonky... I think the term is being misapplied. Normally the SECTIONS of a program are used to define the memory space in which it will reside. The typical divisions are between code and data spaces with some operating systems providing Read Only Protection for the code space. Other section properties are for Read Only Data and memory address alignment. Sections can be used to group related parts of data together. What is currently described by this article does not fit any of the above but instead appears to be talking about DIRECTIVES that can be used to define DATA TYPES. A TYPE is not a SECTION, the concepts are completly different. Also DIRECTIVES are sometimes called PSUDO-OPS but they are never (as far as I know) called INSTRUCTIONS. Please clarify your intent... Tautologies aside, how much assembly programming have you people actually done? OldCodger2 ( talk) 00:23, 13 December 2012 (UTC)
Notes
I still disagree with the wording of sections. Perhaps it's because my experience has mostly all been with microprocessors and yours is mostly mainframes??? If you look at the
NASM manual and how it describes sections for x86... which is also very similar to how sections are used for z80 and other processors I've programmed. Here is what the manual has to say. And I cannot reconcile what the manual says with what this article trys to say....
OldCodger2 (
talk) 10:45, 29 January 2013 (UTC)
6.3 SECTION or SEGMENT: Changing and Defining Sections
The SECTION directive (SEGMENT is an exactly equivalent synonym) changes which section of the output file the code you write will be assembled into.
In some object file formats, the number and names of sections are fixed; in others, the user may make up as many as they wish. Hence SECTION may
sometimes give an error message, or may define a new section, if you try to switch to a section that does not (yet) exist.
The Unix object formats, and the bin object format (but see section 7.1.3, all support the standardized section names .text, .data and .bss
for the code, data and uninitialized-data sections.
marked as resolved by Diamondl ( talk) 03:25, 18 January 2018 (UTC)
I really don't like the section called "Example listing of assembly language source code" It provides no useful information and is in no way informative. Maybe a section of code from a real micro(processor/controller) would be useful but a snippet of code from a virtual device is useless. — Preceding unsigned comment added by Mtpaley ( talk • contribs) 22:57, 20 December 2012 (UTC)
I agree, the example fails to convey anything meaningful, it appears to just be a bunch of random additions without any apparent purpose. Would it be okay with people if I were to replace it with this code instead? (taken from an actual program)
OldCodger2 (
talk) 09:41, 29 January 2013 (UTC)
Example: x86 32 bit NASM, Note: this is a subroutine not a complete program.
178 ;ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
179 ;
180 ; counts a zero terminated ASCII string to determine it's size
181 ; in: eax = zstr.addr
182 ; out: ecx = zstr.count
183
184 zstr_count: ; entry point
185
186 00000030 B9FFFFFFFF mov ecx, -1 ; init the loop counter, pre-decrement to compensate for increment
187
188 .loop:
189 00000035 41 inc ecx ; add 1 to the loop counter
190
191 00000036 803C0800 cmp BYTE [eax + ecx], 0 ; compare the value at the base memory address + the loop offset to zero
192 0000003A 75F9 jne .loop ; if the memory value is Not Equal to Zero then jump to the label called '.loop'
193
194 .done:
195 ; we don't do a final increment because, even though the count is base 1,
196 ; we do not include the zero terminator in the count
197 0000003C C3 ret ; return to the calling program
198
199
200
okay, thanks for the feedback, glad you agree, I have gone ahead and updated the article. Hopefully this won't lead to any disagreements. I will leave the creation of a separate page with lots of assembly examples for a different day. OldCodger2 ( talk) 18:58, 5 February 2013 (UTC)
The last update changed the bare word assembler to a link. However, assembler is just a disambiguation page rather than an explanation of assembler programs. Is such a link appropriate? Shmuel (Seymour J.) Metz Username:Chatul ( talk) 22:22, 7 February 2013 (UTC)
"Modern assemblers, especially for RISC architectures, such as SPARC or Power Architecture, as well as x86 and x86-64, optimize instruction scheduling to exploit the CPU pipeline efficiently." - What? There is no citation but this suggests there exists an assembler which can do this. The closest thing I can think of would be MIPS branch delay slots, where assemblers exist (such as GNU gas) that can fill the slot with an instruction. 24.85.180.193 ( talk) 04:27, 11 January 2014 (UTC)
One fact to to keep in mind is that code rearrangements that improve performance on one processor may degrade it on another. A compiler (including an assembler) that has an option to do optimization for a specific processor may give result better than an assembler program hand optimized for one processor but run on another. Of course, configuration management will be more complicated if you have to distribute more versions of the object code. Shmuel (Seymour J.) Metz Username:Chatul ( talk) 18:40, 22 January 2014 (UTC)
Hi, I've suggested to rename seven
User asm categories to User ASM. The lower case names would conflict with the Ethnologue/IANA/ISO
asm language code as used in the {{#babel:…|asm-?|…}}
magic. The existing {{
User Assembly Language}}
templates -0…-5 and -N won't be affected. –
Be..anyone (
talk) 05:48, 15 February 2014 (UTC)
I consider myself an assembler expert, and I've never come accross an erata sheet, much less one that is treated by a linker. The suggestion ensues that one pass assemblers were the norm in primitive system, while in fact two pass assemblers were, and passing a long source on paper tape was twice done on e.g. Intel's first development system for the 8080. Later came the Isis system featuring double 8 inch floppies, and undoubtedly the assembler was two pass, but who to prove it. 80.100.243.19 ( talk) 04:21, 19 February 2014 (UTC)
The authors are muddying the waters by considering early on in the discussion of the number of passes the possibility that the assembler decides whether a jump could be long or short. It is quite common that the assembler forces or allows the programmer to specify the length. Under that assumption the one versus two pass can be discussed clearly. It must also be pointed out that in that case more than two passes are never applicable.
User:Ankitapasricha (no talk page) added a sample code section, but failed to mention the language. Any sample code in an article covering multiple languages should indicate the specific language, and, in this case, also the hardware platform. If anybody knows the processor, OS and assembler for the sample code, please update Assembly language#Sample Code to reflect that.
Shmuel (Seymour J.) Metz Username:Chatul ( talk) 17:06, 2 October 2014 (UTC)
I count myself as an assembler expert, and even have written a few. I never have come accross an errata assembler as described here, let alone as a class in its own standing apart from multi pass assemblers. Is this a crippled way to describe assemblers that give relocatable output? But in that case the term one pass is misleading, as relocatable output must be processed by a linker before it can be executed.
I'm so non plussed that I hesitate to try clear things up. — Preceding unsigned comment added by 80.100.243.19 ( talk) 14:09, 2 December 2014 (UTC)
One of my recent edits was reverted:
While the original version may have been more concise I felt that it was incomplete. I'd appreciate it if someone could provide another opinion. Peter Flass ( talk) 22:45, 12 February 2016 (UTC)
Reverse engineering of software/firmware can be used for many reasons, from the most worthy to the most unworthy:
I wonder if the sentence that was added today in the article, belongs here or better under reverse engineering. Dhrm77 ( talk) 13:26, 22 June 2016 (UTC)
Hello fellow Wikipedians,
I have just modified 4 external links on Assembly language. Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:
When you have finished reviewing my changes, please set the checked parameter below to true or failed to let others know (documentation at {{
Sourcecheck}}
).
This message was posted before February 2018.
After February 2018, "External links modified" talk page sections are no longer generated or monitored by InternetArchiveBot. No special action is required regarding these talk page notices, other than
regular verification using the archive tool instructions below. Editors
have permission to delete these "External links modified" talk page sections if they want to de-clutter talk pages, but see the
RfC before doing mass systematic removals. This message is updated dynamically through the template {{
source check}}
(last update: 18 January 2022).
Cheers.— InternetArchiveBot ( Report bug) 02:26, 20 October 2016 (UTC)
An assembler for assembling machine language uses Mnemonics to represent the binary codes of machine language. So it is not technically a separate language but an easier to remember alphabet for typing that machine language. Very high level macro-assemblers create what may look like an addition to the language giving rise to the idea that a new and separate language has been created but this article is about Machine Language Assemblers and should avoid such confusion IMHO Scottprovost ( talk) 02:59, 14 November 2016 (UTC) Scottprovost ( talk) 02:55, 14 November 2016 (UTC)
Since the assembly represents actual executable content and does not require decoding or compiling to run. Assembler code is not "Source" code, it is simply code. More accurately, it is object code. This machine code may be loaded into memory and called with no need for compiling as long as it is in binary format. The term source code is improper but acceptable in a non academic discussion. Whether it is appropriate in a Wikipedia Article I will leave up to others. Scottprovost ( talk) 03:11, 14 November 2016 (UTC) Scottprovost ( talk) 03:18, 14 November 2016 (UTC)
Assemblers are, in general, not one-to-one. They frequently have multiple mnemonics for the same opcode, and may perform optimizations, e.g., selecting near branches versus far branches. Then there are statements like EQU that do not generate code at all. Shmuel (Seymour J.) Metz Username:Chatul ( talk) 18:22, 26 June 2017 (UTC)
Hello fellow Wikipedians,
I have just modified 3 external links on Assembly language. Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:
When you have finished reviewing my changes, you may follow the instructions on the template below to fix any issues with the URLs.
This message was posted before February 2018.
After February 2018, "External links modified" talk page sections are no longer generated or monitored by InternetArchiveBot. No special action is required regarding these talk page notices, other than
regular verification using the archive tool instructions below. Editors
have permission to delete these "External links modified" talk page sections if they want to de-clutter talk pages, but see the
RfC before doing mass systematic removals. This message is updated dynamically through the template {{
source check}}
(last update: 18 January 2022).
Cheers.— InternetArchiveBot ( Report bug) 20:43, 10 July 2017 (UTC)
I am not sure if you had intended to link to another article but currently the citation: Booth, A.D.; Britten, K.H.V. (September 1947). "Coding for the ARC" (PDF). Birkbeck College, London. Retrieved 23 July 2017.
Points to the following document:
Booth, A.D.; Britten, K.H.V. (August 1947). "General Considerations In The Design Of An All Purpose Electronic Digital Computer" (PDF). [Source/Date TBD]
I did search for another PDF to what I think you intended, but could not readily find a PDF. I did include the following link as it might be helpful in the search for the actual content: http://hopl.info/showlanguage.prx?exp=4929
Thoughts? — Preceding unsigned comment added by Illusive.D0ct0r ( talk • contribs) 13:25, 7 December 2017 (UTC)
are there programmable devices, that have assemblers, that aren't computers? It depends. There are things that aren't computers in the way most people think about them, but then again, you might define anything programmable as a computer. How about programmable hand (or desk) calculators, that are most often not considered computers, but might do many things that one would commonly do on a computer. Assemblers are commonly used for microcoding, that is , for the internal control code of a computer. There are assemblers written specifically for finite state machines that are part of other systems, but not general enough to be computers. One of the less obvious ones, is that IBM OS/360, and likely other IBM systems, use the assembler to generate JCL for doing system generation. The assembler macro facility is general enough to do things other than generate machine code. Gah4 ( talk) 04:44, 14 May 2018 (UTC)
Assembly language has the statement "Despite the power of macro processing, it fell into disuse in many high level languages (major exceptions being C, C++ and PL/I) while remaining a perennial for assemblers." The preprocessor facilities of C and C++ are not particularly powerful, and can't even do simple computations.
I added the footnote "Of those listed, only the PL/I macro facility is Turing Complete" and user:Wtshymanski reverted it with no explanation. I'm throwing this open to discussion before I reinstate my correction. Shmuel (Seymour J.) Metz Username:Chatul ( talk) 17:08, 24 May 2018 (UTC)
I want to add a short description of the origins of assembler. (a) the first digital computer an assembler was written for, what it (assembler) was like (b) it's author (c) why it is named assembler/assembly language? by whom and when? (d) did it have another name originally?
Unfortunately, The sources I found are somehow contradictory. A number of different views can be found at https://www.quora.com/Why-is-the-assembly-language-called-so Particularly, it has the following statements: 1. The inventor actually called what we now call an assembler (which converts the mnemonics of Assembly into machine code) a “converter.” 2. the programmer would convert each symbolic instruction to its binary equivalent, which became known as “assembling” the program. It wasn’t long before someone wrote a program to do the job, and naturally named it the “assembler.” In a backward way, the symbolic instructions became known as “assembler” or “assembly” code. The most reliable source I found is IEEE computer society article David Wheeler 1985 Computer Pioneer Award "For assembly language programming". https://www.computer.org/web/awards/pioneer-david-wheeler Wheeler's "initial orders" allowed Edsac instructions to be provided in a simple language rather than by writing binary numbers, and made it possible for non-specialists to begin to write programs. This was the first "assembly language" and was the direct precursor of every modern programming language, all of which derive from the desire to let programmers write instructions in a legible form that can then be translated into computer-readable binary. -- P.maistrenko ( talk) 14:26, 4 October 2018 (UTC)
The infobox claims that "assembly language" first appeared in 1949, and the article also has a number of categories relating to that year. However, I can't find any text or citations in the article justifying that date, and in fact the section on "Historical perspective" claims that "The first assembly language was developed in 1947 by Kathleen Booth for the ARC2". Seems like an error.
The second paragraph of the paper written by the Booths begins:
Kathleen Booth's 1947 contribution to the field began with a 1946 trip by her future husband, Andrew Booth, to the USA, spending time at Princeton, gaining insight into the field from Prof. von Neumann. The following year they both came, for a longer (6 month) visit.
Their 1947 paper envisioned parallel arithmetic units and/or a large memory. Each parallel unit would possibly do 100 calculations per second, and a large memory would be 1,000 to 10,000 "numbers" of "approximately 40 binary digits." After talking theoretics, they labeled this "quite impracticable."
Over a decade later the word sizes of 36 bits (e.g. IBM 7094) were the high end, and while 32K did exist by that time, earlier machines were typically in the 4K range.
In short, since programming in those days meant flipping switches, Kathleen Booth's work was not the writing of an assembler, with or without a symbol table. It was really about not having to flip switches over and over, but rather recording binary values on paper tape.
One someone or several someones, together or at similar times but isolated from one another, developed assembly language. The "is credited" wording seems short and to the point. The Von Neumann reference isn't really necessary - it would require splitting all of this into sections to cover
It should be understood that even Project Whirlwind didn't meet all of the goals envisioned by the Booths. To recap, even "is credited" may be an overstatement, but to say that she actually wrote an assembler, on a machine that didn't deal in character data, is untrue. Pi314m ( talk) 07:34, 10 February 2019 (UTC)
The last three paragraphs of Assembly language#Assembly directives have nothing to do with Assembly directives
Symbolic assemblers let programmers associate arbitrary names ( labels or symbols) with memory locations and various constants. Usually, every constant and variable is given a name so instructions can reference those locations by name, thus promoting self-documenting code. In executable code, the name of each subroutine is associated with its entry point, so any calls to a subroutine can use its name. Inside subroutines, GOTO destinations are given labels. Some assemblers support local symbols which are lexically distinct from normal symbols (e.g., the use of "10$" as a GOTO destination).
Some assemblers, such as NASM, provide flexible symbol management, letting programmers manage different namespaces, automatically calculate offsets within data structures, and assign labels that refer to literal values or the result of simple computations performed by the assembler. Labels can also be used to initialize constants and variables with relocatable addresses.
Assembly languages, like most other computer languages, allow comments to be added to program source code that will be ignored during assembly. Judicious commenting is essential in assembly language programs, as the meaning and purpose of a sequence of binary machine instructions can be difficult to determine. The "raw" (uncommented) assembly language generated by compilers or disassemblers is quite difficult to read when changes must be made.
I'd probably move the text to new subsections of Assembly language#Key concepts or Assembly language#Language design.
Also, some compilers generate assembly language with comments or pseuodo-assembly listing with comments, e.g., many of IBM's PL/I compilers. Shmuel (Seymour J.) Metz Username:Chatul ( talk) 18:10, 14 April 2019 (UTC)
The following Wikimedia Commons file used on this page has been nominated for deletion:
Participate in the deletion discussion at the nomination page. — Community Tech bot ( talk) 23:38, 26 July 2019 (UTC)
There is recent discussion in edit summaries on one-pass assembly. Many (most? all?) assemblers allow forward references, such that they might not be able to completely assemble something on the first pass. It is, then, usual for a first pass that determines the address of each item (instruction or data), and then on the second pass, knowing all addresses, generate actual output. However, the object format used for OS/360, and possibly for others, has an address on each output card (that is, 80 byte record), such that output does not have to be in sequential address order. That makes it easier to write a one-pass assembler. On the other hand, you can write things where the length is determined by a symbolic name. I am not sure what they do about that. Note, though, that the out of order object code just moves the problem to the linker. The OS/360 linkage editor is famous for being slower than compilers. (An original design goal, and the reason for the name linkage editor, is to reduce the need for complete recompilation.) A multi-pass assembler that reads the input card deck more than once is pretty inconvenient. Later, they just use temporary disk files. Early assemblers had to run in small memory, though so did the linkers. Gah4 ( talk) 21:05, 20 April 2020 (UTC)
Some editorial comment indicated that it was unclear that the listing and code-generation would occur during the second pass. That's expected, since forward-references to symbols meant that the required values wouldn't be available until the whole source was read/parsed. And yes, reading a card deck or paper tape more than once was a little inconvenient TEDickey ( talk) 23:16, 20 April 2020 (UTC)
C was more popular than assembly for these 68000 based home computer systems. Rcgldr ( talk) 14:34, 11 September 2020 (UTC)
There is a lot of IBM 360 family legacy code that is a mix of Cobol and assembly. The historical reason is that the database access methods, such as ISAM (Indexed Sequential Access Method) (it might have been BDAM?) were implemented as assembly based macros, and as long as some assembly was needed, some optimized code was also implemented in assembly. For current usage, few companies would be willing to take the risk or time it would take to port huge libraries of working assembly code to higher level languages. Rcgldr ( talk) 14:38, 11 September 2020 (UTC)
Maybe BDAM. I used ISAM in PL/I and COBOL beginning in 1970 and never needed assembler for any of it. I don’t think HLLs supported all DAM options. I finally realized you could process all members of a BPAM dataset in PL/I (and presumably COBOL) with only an assembler routine to put the member names in the JFCB. Peter Flass ( talk) 21:20, 11 September 2020 (UTC)
@ Chatul: @ Peter Flass: Assembly macros are still in use. IBM's migration to the current version of Cobol includes the changes needed for the assembly code, but doesn't mention porting that assmembly code into Cobol, so apparently some aspects of the access methods still require assembly macros: DFSMS macro instructions for data sets pdf Rcgldr ( talk) 07:54, 12 September 2020 (UTC)
The article says: every assembly language is designed for exactly one specific computer architecture. While this should mostly be true, it doesn't seem quite so obvious. For one, when an architecture is extended, consider S/360, S/370, XA/370, ESA/370, ESA/390, z/, the new assembler is usually backwards compatible. (As long as you don't use new instructions.) Also, pretty often the first try for new instructions is done with macros in the old assembler. That won't work for new addressing modes, though. But also it depends on what you mean by assembly language. If it means other than the specific machine instructions, then some assemblers for 8 bit microprocessors could be used for more than one. A look-up table for the machine instructions was used, where the assembler instructions (see discussion above) were the same. Then there is GNU gas, which is multi-architecture, though usually not using the syntax of the one designed for each architecture, and often different opcode mnemonics. Gah4 ( talk) 04:19, 12 September 2020 (UTC)
References
GA toolbox |
---|
Reviewing |
Reviewer: Wasted Time R ( talk · contribs) 13:20, 17 September 2020 (UTC)
This looks to have been a drive-by nomination made by an erratic editor who has since been indef-blocked for incompetence. The article has large swaths of unsourced material, not just explanatory material but historical and analytical as well. In some cases there are whole sections without any citations. So this has to be a fail.
But the article is not bad at all. Content-wise, my main suggestion for improvement is that the use of assembly language for IBM mainframes needs to be given more attention. It is mentioned here and there, but back in the heyday of the IBM 360/370, when it was the dominant computing platform in the industry, assembly language was everywhere, not just for high-performance system software components but for run-of-the-mill business applications as well. Learning 360/370 Assembly was part of the standard education that commercial programmers had to get and there were a lot of textbooks and commercial courses available for it. For instance, in the textbook Kevin McQuillen, System/360–370 Assembler Language (OS) (Mike Murach & Associates, 1975), the example programs that the text develops concerns a batch inventory control and reorder application, and later parts of a batch payroll application are constructed. This whole aspect of historical assembly language use is counter-intuitive to today's reader and part of the value that this article can bring is to describe it. Wasted Time R ( talk) 13:20, 17 September 2020 (UTC)
I would suggest adding more information on the use of assembly language on platforms from other vendors, not just on other IBM platforms. I know for a fact that CDC and RCA used assemblers as implementation languages on their operating systems, and I'm confident that many others did as well. Similarly, there was a lot of customer use of assembly languages on non-IBM platforms. -- Shmuel (Seymour J.) Metz Username:Chatul ( talk) 14:21, 10 September 2021 (UTC)
@ Wtshymanski: In many assemblers, pseudo-ops used inside of macro definitions can also be used in open code, and the article does not discuss this. As a start, I added the text below, which user:Wtshymanski reverted:
In addition, some of the assembler statements useful in macro definitions are also valid in open code, e.g., the HLASM statements
- AGO
- Transfer to specified assembler statement
- AIF
- Evaluate logical and transfer if true
- GBLx
- Define compile-time variables in a global context
- LCLx
- Define compile-time variables in a local context
- SETx
- Evaluate expressions and assign their values to compile time variables
There is a lot of code that uses these facilities outside of macro definitions, and I believe that the existing text on assembly language macros is misleading without a discussion of the use of them in open code. -- Shmuel (Seymour J.) Metz Username:Chatul ( talk) 14:40, 10 September 2021 (UTC)
This article cites Tiobe reporting around 2.5% usage of assembly language. WebAsembly is not listed at all amongst 100 languages. Given the expectation that the latter is used more than the former, Tiobe may have mixed up these two. The Wikipedia article on the latter confusingly refers to the former. — Preceding unsigned comment added by Jgeer ( talk • contribs) 23:27, 7 November 2021 (UTC)
GliderMaven
GliderMaven merged two sentences to read Because assembly depends on the machine code instructions, each assembly language is specific to a particular
computer architecture and sometimes to an
operating system.
However, the reason that FORTRAN Assembly Program (FAP) on the FORTRAN Monitor System differs from Macro Assembly Program on
IBSYS/IBJOB and Assembler D on
DOS/360 differs from Assembler F on
OS/360 has nothing to do with dependency on the machine code, since the machine code is identical. --
Shmuel (Seymour J.) Metz Username:Chatul (
talk) 14:03, 11 November 2021 (UTC)
It's reasonable to say that if there are two different sets of machine instructions, two different assemblers will be required, but in this case it's four assemblers for two architectures. I wasn't citing four distinct assemblers for a single architecture, but rather two distinct assemblers for each of the architectures.
Yes, DOS/360 and OS/360 have different macro libraries, but they are not part of the assemblers. Assembler D is DOS only, assemblers E and F are is CP-67, OS/360 and TSS/360 and Assembler XF is in at least DOS/VSE, OS/VS1, OS/VS2 and VM/370. I believe that Assemblers E and F share code. All of which confirms that the because is incorrect. -- Shmuel (Seymour J.) Metz Username:Chatul ( talk) 14:08, 15 November 2021 (UTC)
@ Wtshymanski: In several assemblers, pseudoops meant for defining macros can also be used in open code.
I added the text "In addition, some of the assembler statements useful in macro definitions are also valid in open code, e.g., the
HLASM statements
In addition, some of the assembler statements useful in macro definitions are also valid in open code"? -- Shmuel (Seymour J.) Metz Username:Chatul ( talk) 01:42, 23 November 2021 (UTC)
There is a general rule in English (from various grammar books) that the usage like "The English language" requires the definite article.
As I understand from this article, there is a family of "assembly languages" (which would require one of them to be "an assembly language", and so it is written in Simple English Wikipedia) and one "assembler language" ("the assembler language", cf. IBM). Some sources also capitalize this word.
Unfortunately I'm not a native speaker, so I'm not sure what is correct (and I suspect that the contributors to this article are not exclusively native speakers). Probably all variants are, but maybe there should be a single variant across this article or Wikipedia? Maybe even add a section on its spelling and article (maybe to Wiktionary)?
Yaroslav Nikitenko ( talk) 16:02, 13 February 2022 (UTC)
Notes
I don't know if there is a good place to include this as a reference, but there is a short video series that is very good at explaining how assembly language works called Assembly Primer For Hackers. Hopefully there is a place to use this as a reference. Maybe in external links? -- Ubh [ talk... contribs... 05:51, 18 November 2023 (UTC)
Assembly language was nominated as a Engineering and technology good article, but it did not meet the good article criteria at the time (September 17, 2020). There are suggestions on the review page for improving the article. If you can improve it, please do; it may then be renominated. |
This is the
talk page for discussing improvements to the
Assembly language article. This is not a forum for general discussion of the article's subject. |
Article policies
|
Find sources: Google ( books · news · scholar · free images · WP refs) · FENS · JSTOR · TWL |
Archives: 1 |
This
level-4 vital article is rated B-class on Wikipedia's
content assessment scale. It is of interest to the following WikiProjects: | ||||||||||||||||||||||||||||||||||
|
Can you add the pronunciation of assembly? In particular, assembly as in light or as in literature? And where is the stress? Assembly or assembly? Thanks-- Stemby ( talk) 10:43, 17 June 2008 (UTC)
In "See also" section the point "List of assemblers" linked to Comparison of assemblers! And where the link to MACRO-11 should be added? -- Tim32 ( talk) 19:20, 22 June 2008 (UTC)
Since this section has to deal mostly with x86 assembly language, I suggest that it be moved there. ( rCX ( talk) 03:59, 4 July 2008 (UTC) )
The representation in here does it refer to the hexadecimal address that machines use, such as when Blue Screen of Death error, they consists of a particulara hardware address in hexadecimal form. (I have very little macros programming foundation.)
This representation is usually defined by the hardware manufacturer, and is based on abbreviations (called mnemonics) that help the programmer remember individual instructions, registers, etc
By the way some interpreter use to translate XML documents according to XML schema, are they consider assemblers?
-- Ramu50 ( talk) 03:24, 13 July 2008 (UTC)
This is mostly OT, but I can't stand to let a question on BSODs go unanswered. :) In most blue screen messages, one or more of the hex numbers you see are virtual addresses, and often one of them will be the virtual address of an instruction. If you could look in memory at that address you would find the numeric (usually displayed in hex) coding of the actual instruction (or "opcode"). The blue screen however never displays the instructions themselves, only their addresses. The documentation that comes with the Windows Debugging Tools will tell you all about how to interpret blue screen data. The debugger can of course display the hex coding for the instructions and can also "disassemble" them, turning them back into assembly language mnemonics. There is a decent quick tutorial on using the debugger here: [1]. If you want to know more than most of us need to know about how Intel x86 instructions are encoded, download the three volumes of "IA32 Architecture Software Developer's Manual" from the Intel site, particularly volumes 1 and 2. You don't need to know the instruction coding in depth unless you're writing a compiler, an assembler, a debugger, or the microcode for the CPU itself, but it helps if you understand the general principles and if you can recognize a few common patterns. I can also highly recommend Matt Pietrek's articles from MSJ, "Just Enough Assembly to Get By", for a look at how the x86 instruction set is actually used by everyday code. There's nothing there on how the instructions are coded into hex, though, only on the assembler mnemonics.
I never heard of an XML interpreter called an assembler - they're usually called interpreters, or some more specialized name depending on their function. Jeh ( talk) 08:02, 16 July 2008 (UTC)
-- Fasmlib keeps cropping up throughout wikipedia Assembler articles ---
Seems to me the author of Fasmlib is quietly seeking to advertise his product through wikipedia. Fasmlib isnt even a working product as far as I can tell, nor is it unique in what it attempts to deliver ( Randolph Hyde has done a similar, yet complete work in the past ). —Preceding unsigned comment added by 217.42.215.104 ( talk) 21:45, 16 November 2008 (UTC)
Hi MrOllie. I'm publishing (with permission) Doug Dingus' comprehensive guide to Assembly Language for the Absolute Begineer. Not trying to sell anything, but I think it would be a valuable external resource that goes into detail beyond what would be appropriate for an article. This is inline with the External Link guidlines. —Preceding unsigned comment added by Nmcclana ( talk • contribs) 02:07, 18 February 2009 (UTC)
Pagetable.com was removed from the external links/software section - pagetable.com is a unique resource for assembly language analysis and history/evolution of the language across various architectures and compilers; I believe it comes into category 3, Wikipedia:EL#What_should_be_linked. One of the admins should examine the content of pagetable.com and other links and not just delete en masse because they don't have either the expertise or time to identify useful resources 121.45.167.176 ( talk) 20:29, 19 March 2010 (UTC)
as per this edit that was reverted [2], I think it would add something to have a brief description of one pass vs two pass assemblers. I know what they are, but don't have any references at the moment (although I'm sure I could find some). However, I have not heard of "Jove" pass assembly? Does anyone know what this is? -- stmrlbs| talk 18:30, 3 June 2009 (UTC)
However, if anyone feels that they can improve it.. be bold!! -- stmrlbs| talk 02:37, 4 June 2009 (UTC)
References
{{
cite book}}
: |website=
ignored (
help)
The list of manuals, tutorials, etc. seems too long. I would argue that only links to sites/pages which are about assembly language in general should go here. Links for specific assembly languages for specific machines or chips belong on the article about that machine or chip. —Preceding unsigned comment added by Yworo ( talk • contribs) 23:06, 9 June 2009 (UTC)
I'd also propose that we link to the Open Directory page at http://www.dmoz.org/Computers/Programming/Languages/Assembly/ Wikipedia can never be a complete directory to pages about every assembly language and we should not try to be. A link to Open Directory will give the read a much better overview and categorization of assembly languages.
I think this article would be of more benefit to the public if there was a section for manuals, and a section for tutorials. A manual would be any assembly manual put out by the company that made that particular computer (IBM/Unix/etc.). Online manuals are really of great benefit to anyone interested or working in the field. Tutorials would be those tutorials written by experienced people/teachers/universities/etc. Right now.. it is all jumbled together. Not very user friendly. -- stmrlbs| talk 23:10, 9 June 2009 (UTC)
Yworo, I created a new section: Assemblers#List_of_assemblers_for_different_computer_architectures which just has an introductory sentence explaining that a list of assemblers and architectures is on an associated page. Now, I think we can go through the links, and add those links to different assemblers into the table on the other page (if they are not already there), and take them off this page. The table is a more user friendly presentation of the information, than a bunch of links. You are right in that all the jumbled links with no organization is not good. If you need any help figuring out how to put something in the table, let me know. I will be glad to help -- stmrlbs| talk 19:29, 11 June 2009 (UTC)
I made a long research to use the Modulo operator in Assembly language and the closest I found was the DIV operator however it's not available on the simple educational Assembler PEP8 [3] (French operators instruction Chapitre 7 in http://www.er.uqam.ca/nobel/k20250/Notes_cours.html).
Is there a simpler way of doing a modulo ? Perhaps doing bitwise operations ? -- DynV ( talk) 19:29, 12 June 2009 (UTC)
Only thing I can think of is performing the DIV operation to return an integral value and multiplying it with the divisor then subtracting it from the dividend. This is probably how it's done physically in architectures. ChazZeromus ( talk) 18:05, 13 August 2009 (UTC)
I thought I'd put a little section about the ModR/M operand specifier byte underneath the opcode section. Please edit if their are any erroneous typings in my words lol. ChazZeromus ( talk) 18:11, 13 August 2009 (UTC)
As far as i know, *all* assemblers have directives for entering Hex and other literal values. There is nothing special about what you are describing. Good little assemblers everywhere, let you enter the byte codes "in the same sequence" that you want them to appear in memory, the only issue being endieness. It would be a very unusual assembler indeed that would reverse the order of an arbitrary sequence of bytes for you. Maybe as a Unicode function, but not otherwise, I don't recall ever encountering such a directive. Assemblers only align the bytes on memory boundaries when and where you tell them to by using the appropriate directives they have no crystal ball to allow them to predict where the alignment should be placed. And unless you are dealing with FORTH and writing to BLOCKS which are obsolete, then assemblers do NOT "deposit object directly ... in specific tracks and sectors" assemblers use ordinary files same as any other program and they generate executable machine code not objects. Well, perhaps this is something unique to the VIC20? does the VIC not have a file system? I've never used a VIC, maybe it does use tracks and sectors, some early mainframes did use tracks and sectors because that was before the development of file systems.
OldCodger2 (
talk) 22:02, 15 September 2012 (UTC)
The main page for this article includes a reference to an assembler named "French Silk" and touts it as being the smallest assembler ever written. In fact, the Instant Editor Assembler (known more by its acronym, IEA) was the smallest assembler around. I am not sure who wrote it, but remember it was marketed through Randy Chase's Commodore Users' Group Newsletter. I am not a fan of the IEA, as I was one of many dissatisfied customers who bought a copy of it, and tried to use it. French Silk, on the other hand, had a much better reputation for speed of execution and assembling. Dexter Nextnumber ( talk) 08:22, 2 January 2010 (UTC)
Some assemblers do limited Peephole optimization, e.g., converting long branches to short branches. I believe that there should be a discussion of this in the article, preferably with some examples. Shmuel (Seymour J.) Metz Username:Chatul ( talk) 12:39, 10 August 2010 (UTC)
Some terms have different definitions in different assemblers. In particular, some assemblers use the term pseudo-instruction to refer to assembler directives. The article should avoid conveying an impression that the nomenclature used is universal. Shmuel (Seymour J.) Metz Username:Chatul ( talk) 13:22, 10 August 2010 (UTC)
A pseudo-opcode is a directive, and some assembler use only the term pseudo-op for the functions listed in the article as pertaining to directives. The text
* An '''assembler directive''' or ''pseudo-opcode'' is a command given to an assembler. These directives may do anything from telling the assembler to include other source files, to telling it to allocate memory for constant data. Some assemblers use special syntax for directives; others do not.
should be reinstated
Shmuel (Seymour J.) Metz Username:Chatul (
talk) 14:57, 22 August 2010 (UTC)
In addition to recognizing all the 709 machine operation codes and extended operation codes listed in the 709 Reference Manual, the FAP language also recognizes the following psueod-operations, described in detail in the succeeding chapters.
OK, I am a little late to this one, but it seems to me that different assemblers, or assemblers for different processors, use different names for some terms. A table indicating the meaning, and the different names would be useful. Still remembering from when I was first learning about assemblers, this was what confused me. The descriptions, in at least the IBM manuals, of assemblers mostly describes what the assembler does. You need to find somewhere else the descriptions of machine instructions, and how to use them. Gah4 ( talk) 05:25, 29 November 2016 (UTC)
As far as I can tell, IBM OS/360 assemblers call all these assembler instructions, and PDP-10/ MACRO-10 [1] call them all pseudo-ops.
And VAX/Macro [2] seems to call them assembler directives. Gah4 ( talk) 06:31, 29 November 2016 (UTC)
References
{{
cite book}}
: |website=
ignored (
help)
{{
cite book}}
: |website=
ignored (
help)
Are there any data to support the claim that most assemblers have symbol management, e.g., name spaces? There are certainly many assemblers that don't. Shmuel (Seymour J.) Metz Username:Chatul ( talk) 18:13, 23 August 2010 (UTC)
I did in fact initiate a discussion prior to adding a {{ Systemic bias}}; the proper course for someone who disagreed would have been to discuss the reasons instead of removing the template. Shmuel (Seymour J.) Metz Username:Chatul ( talk) 15:09, 7 September 2010 (UTC)
There is a comment suggesting that the following text is unclear
Pseudo-opcodes are often used within the instruction set to support alternative mnemonics for instructions that the CPU designer did not specifically include. For example, many older CPUs do not have a true nop (no operation) instruction. But often there is another instruction that can be used instead with the same effect as a nop. In 8086 CPUs the instruction xchg ax,ax is used for nop. With nop being a pseudo-opcode to encode the instruction xchg ax,ax. Some disassemblers recognize this and will decode the xchg ax,ax instruction as nop.
I agree that it is misleading, and suggest the following
extended mnemonics are often used to support specialized uses of instructions, often for purposes not obvious from the instruction name. For example, many CPU's do not have an explicit NOP instruction, but do have instructions that can be used for the purpose. In 8086 CPUs the instruction xchg ax,ax is used for nop, with nop being a pseudo-opcode to encode the instruction xchg ax,ax. Some disassemblers recognize this and will decode the xchg ax,ax instruction as nop. Similarly, IBM assemblers for System/360 and System/360 use the extended mnemonics NOP and NOPR for BC and BCR with zero masks.
Shmuel (Seymour J.) Metz Username:Chatul ( talk) 15:22, 8 September 2010 (UTC)
While it is certainly true that most compilers and operating systems in the 1950s and 1960s were written in assembler, the article overstates the degree of dominance. Notable examples of languages used for system implementation include
Shmuel (Seymour J.) Metz Username:Chatul ( talk) 13:12, 18 November 2010 (UTC)
I think that such lists should be avoided, there are too many languages for them to be documented in this fashion. For instance, you somehow missed naming what is arguably the most influental language of all, a language that has probably been used to create more operating systems than any other. That language is 'C' which often has the nickname of Portable Assembly or High Level Assembly. So how many other languages got missed from that list? How about something exotic like FORTH which was an operating system complete unto itself? You have defined a nearly impossible task. If you limit it to generalities, then yes, I agree most operating system development in the later days was done in higer level languages. The earlier it was, the more likely it was to be done in assembly, it was an evolutionary process -- go back far enough and it was done in hand coded binary.
OldCodger2 (
talk) 07:52, 29 January 2013 (UTC)
There is a general convention to use italics to represent quoted material that is not surrounded by quotaion marks or apostrophes. User:Nigelj recently added quotation marks around material that already was framed by double apostrophes, the Wiki markup for italics. E.g.,
" floating point partial arctangent"
Shouldn't it be one or the other but not both? Shmuel (Seymour J.) Metz Username:Chatul ( talk) 14:48, 19 November 2010 (UTC)
The section on macros has a lot of good information, but it seems to get very off-topic. It starts with a good discussion of the use of macros, and then diverges into specific uses of macros in legacy systems, using the macro assembler as a code generator for COBOL, history of the C preprocessor, and then discussions of the underlying structure of Prolog, LISP, and Forth. I'd like to trim this section down dramatically, and move the more advanced content to another article. Any comments? Dead Horsey ( talk) 06:55, 21 December 2010 (UTC)
I corrected the dates for some milestones in the evolution of assembler languages, and in the process I wondered whether it would be appropriate to add references, e.g., 705 Autocoder, 709 FAP, for the approximate dates. Would that be helpful, or would it be TMI? Shmuel (Seymour J.) Metz Username:Chatul ( talk) 21:12, 18 January 2011 (UTC)
I added a citation needed template to the text referring to CPU's being idle. My first take was that while it was not true for mainframes that it was plausible for desktops, but then it occurred to me that the delays in loading the all too common bloated web pages might be due to CPU consumption for rendering. If anybody has hard data on CPU consumption in various applications on various classes of machines, citations would be appreciated. Shmuel (Seymour J.) Metz Username:Chatul ( talk) 13:22, 19 January 2011 (UTC)
Hi all,
I stumbled across this page via Random Article, it brought back happy memories of writing TSRs and trying to understand PC BIOS routines (ahem). I feel that the first main section (Why use assembly language?) dives a little deep into the nitty-gritty for an opener. But the first para of the Historical perspective section is just what the article needs at the beginning (from a layman's point a view), and I was wondering about incorporating it at the top of the page. MinorProphet ( talk) 23:03, 28 April 2011 (UTC)
The "Why Assembly Language" section focussed on the question why to use assembly language rather than to code mahine instruction dirctly. I think it gives a helpful explanation of the functionality provided by an assembler. But no sensible person will ever code machine instructions directly (e.g. with a binary editor), so this alternative is merely academic. or educational, if you like.
In contrast, the question why to write assembly language rather than a high(er) level language is a serious practical question, and I started reading the section with that question in mind. Because this aspect was not covered, I added some text. Because I am not a professional programmer, I don't know to what extent assembly language is still used today. Perhaps others can add some comments to that extent. Anyway, I am old enough to remember the days when even administrative programs were occasionally written in assembly language. Which is not as bad as it may seem if appropriate macro's and subroutines are used. I guess that the introduction oof C in the 1970's has greatly reduced the need to revert to assembly language. Older languages like COBOL, FORTRAN, ALGOL or even Pascal are less suited to write operating system functions, not to speak about the terrible "esperanto" developed by IBM in the 1960's called PL/I. Rbakels ( talk) 10:35, 9 December 2011 (UTC)
Would it be worth making specific mention of bytecode assemblers (e,g, Jasmin)? Or are these subsumed under the notion of a virtual machine architecture? Peter Flass ( talk) 13:33, 16 January 2012 (UTC)
Well, if you want to go down that path, I think you would have to start talking about Java, Java Script, PHP, etc, etc, all of which are Byte Code Assemblers for Virtual Machines. And none of those would really be appropriate for this page which focuses on Machine Language as excuted by actual Hardware. Certainly we get into grey areas with things like QEMU or MIX, but they still are dealing with Virtual Hardware. I feel that Byte Code would really be a separate topic. As a further consideration, nobody is expected to write programs in the Byte Code itself, it is an internal language that is not normally exposed.
OldCodger2 (
talk) 08:25, 29 January 2013 (UTC)
Rumors are that Sun at least was working on hardware to execute JVM code, and might have even fabbed a chip. I don't like the name byte code, as all that means is that the opcodes and operand specifiers are in units of bytes, which is true for many hardware architectures. Sun calls (called) it JVM, which is fine with me. But maybe I was mixing assembly code and machine code. For most architectures, there is an assembly language designed along with the hardware. As long as there is only one assembler, or all assemblers accept the same input source, there is no confusion. Normally, one can discuss machine code and assembly code without any confusion. Since Jasmin is, as well as I know, not written by Sun, there can be confusion. But Sun (and now Oracle) supply the javap disassembler, so at least some of the assembler syntax had to be defined. (I don't know how close javap output is to what is needed for Jasmin input.) Even though JVM is mostly emulated, without any dedicated hardware, I don't find the fundamental ideas of machine code (JVM bits) and assembly code (Jasmin input source) fundamentally different from other machine code and assembly code. And yes, I was not trying to confuse Java source and assembler source. Gah4 ( talk) 18:57, 25 October 2016 (UTC)
I am currently working on a significant overhaul of the File Allocation Table article for accuracy and completeness, and I have run into a question I was unable to answer myself so far. Perhaps someone of you can help out and provide an answer.
Primer: All FAT formatted volumes since DOS 2.0 contain a BIOS Parameter Block (BPB) in the boot sector describing the volume, wheras DOS 1.x volumes did not. In their course to determine the actual medium format, among other methods MS-DOS, PC DOS and DR-DOS check various byte patterns at offset 000h in a boot sector in order to find out, if a given sector might contain some form of BPB or not. Volumes containing a BPB typically start with a jump instruction at offset 000h to skip over the BPB. Patterns tested for by DOS include a short jump sequence "JMPS ??, NOP" (EBh ??h 90h, as seen since DOS 3.0) or a near jump (E9h ??h ??h, as seen on DOS 2.x formatted disks). On harddisks, DR-DOS (but not MS-DOS/PC DOS) additionally checks for a swapped sequence 90h EBh ??h. (To be precise, these tests alone are not enough to be sure a BPB is present since some DOS 1.1 disks contain EBh ??h 90h as well, but still have no BPB; but I won't go into further details here, as it doesn't matter in regard to my question below.)
On floppies, all these operating systems (MS-DOS, PC DOS and DR-DOS) also check for a byte pattern 69h ??h ??h at offset 000h in the boot sector. This is documented for MS-DOS/PC DOS in at least one book, and it can be found in the OpenDOS source code as well, but without further explanation. Stepping through MS-DOS in a debugger it can be verified that the test actually exists in MS-DOS as well, however, in none of the books I have checked so far, 69h is a valid x86 opcode. So, I wonder what it is. Perhaps a jump instruction for a non-x86 processor? Mind, that the FAT file system was also used on Ataris ( Motorola 680x0) as well as on some very late CP/M variants ( 8080) and all MSX-DOS machines ( Z80), but a starting opcode of 69h does not seem to make sense on these platforms as well. The IBM PC RT was built around the IBM ROMP processor, a RISC processor -- certainly not x86-compatible, but unfortunately I cannot find any opcode maps for this specific processor. What about the extra opcodes supported by the NEC V20/ V30? Or some undocumented opcode? Was there any other platform important enough to have Microsoft or IBM add this special test into the volume mount code of MS-DOS/PC DOS? Windows NT? Any ideas? -- Matthiaspaul ( talk) 01:41, 21 January 2012 (UTC)
I did some more general cleanup on this article, but it is still disorganized and full of redundancies. In particular the sections "current usage" and "typical applications" should be combined, but there are lots of other instances of duplication. Peter Flass ( talk) 13:39, 9 March 2012 (UTC)
Please stop adding these external links:
In the first place, if you look you will notice that the "external links" here are pointers to information, not pointers to specific assemblers - the page List of assemblers is intended for that. In the second place, BBC Basic is not an assembler, even if it contains one. By that criterion, almost all C compilers would be assemblers because they allow imbedded assembly code. Peter Flass ( talk) 23:34, 7 June 2012 (UTC)
As a new editor I cannot yet edit this article. Is there a way to get it unlocked? I only want to make some minor edits to make it read more smoothly. — Preceding unsigned comment added by Geau ( talk • contribs) 12:09, 26 August 2012 (UTC)
Thank you. I can see why it was protected, from looking at the history. I suppose I can wait until I am validated. -- Geau ( talk) 15:41, 26 August 2012 (UTC)
Removed: "Many assemblers have built-in (or predefined) macros for system calls and other special code sequences, such as the generation and storage of data realized through advanced bitwise and boolean operations used in gaming, software security, data management, and cryptography."
The above is just total nonsense. First off, hardly any assembler has anything like this. Second off, if it's a macro library, then that has nothing at all to do with the assembler itself. Third, I know of nothing that is specific to "gaming" that is implemented in any cpu architecture unless it is a custom designed cpu. Intel has announced/documented built-in instructions for AES, but guess what, they have yet to ship any actual x86 cpus which implement these instructions -- see Intel's manual for details. By advanced bitwise operations, I guess you mean the usual shifts and rotates? nothing special about that. me? I've programmed so many different computers using so many different assemblers that I've lost count. OldCodger2 ( talk) 22:13, 15 September 2012 (UTC)
EvilKeyboardCat ( talk · contribs) left the following comment on my talk page. I'm moving it here, as it would be better if other editors of this page joined in.
My edit summary was truncated by Twinkle, but I went on to say something like "hardware architecture can easily be a constraint on the use of high-level languages." Taking the two parts of the edit in turn, the edit changed a sentence to begin "Data sections are instructions used to define data elements..." My point is simply that data sections are sections of assembly programs. They contain instructions, and these instructions may well be pseudo-ops, but sections are not instructions. They are sections of the programm, or sections of memory - however you look at it - that contain instructions, or data. I cannot see how more simply to state that. Adding this minor confusion of terminology is not an improvement. The second part of the edit I reverted changed a sentence to specifically say that "constraints or peculiarities in the target operating system's architecture" may prevent the effective use of higher-level languages (The edit also spoiled the number agreement in the sentence by changing prevent to prevents, even though constraints or peculiarities were still plural). My point was that although the operating system may reflect and model the constraints or peculiarities of the underlying hardware, there is no benefit in specifying that it is not the hardware but the OS that has the constraints or peculiarities. Indeed, very often it is the OS that is being written in Assembler, so that the point as changed becomes rather tautologous. As to my admonishment to "please fix rather than revert", that is what I did: the phraseology was fine beforehand, the edit did not improve it, so I fixed it by putting it back exactly as it was, since there was nothing that I can see that was wrong with those passages in the first place. -- Nigelj ( talk) 16:52, 2 November 2012 (UTC)
Okay, I agree with you on the point that data pseudo-ops are sections not instruction but would it be better for the start of the text on data sections to read "Data section are" not "These are"? Perhaps it could be reworded? Also I think my link to the variables page was justified. EvilKeyboardCat ( talk) 00:09, 3 November 2012 (UTC)
Data Sections is still wonky... I think the term is being misapplied. Normally the SECTIONS of a program are used to define the memory space in which it will reside. The typical divisions are between code and data spaces with some operating systems providing Read Only Protection for the code space. Other section properties are for Read Only Data and memory address alignment. Sections can be used to group related parts of data together. What is currently described by this article does not fit any of the above but instead appears to be talking about DIRECTIVES that can be used to define DATA TYPES. A TYPE is not a SECTION, the concepts are completly different. Also DIRECTIVES are sometimes called PSUDO-OPS but they are never (as far as I know) called INSTRUCTIONS. Please clarify your intent... Tautologies aside, how much assembly programming have you people actually done? OldCodger2 ( talk) 00:23, 13 December 2012 (UTC)
Notes
I still disagree with the wording of sections. Perhaps it's because my experience has mostly all been with microprocessors and yours is mostly mainframes??? If you look at the
NASM manual and how it describes sections for x86... which is also very similar to how sections are used for z80 and other processors I've programmed. Here is what the manual has to say. And I cannot reconcile what the manual says with what this article trys to say....
OldCodger2 (
talk) 10:45, 29 January 2013 (UTC)
6.3 SECTION or SEGMENT: Changing and Defining Sections
The SECTION directive (SEGMENT is an exactly equivalent synonym) changes which section of the output file the code you write will be assembled into.
In some object file formats, the number and names of sections are fixed; in others, the user may make up as many as they wish. Hence SECTION may
sometimes give an error message, or may define a new section, if you try to switch to a section that does not (yet) exist.
The Unix object formats, and the bin object format (but see section 7.1.3, all support the standardized section names .text, .data and .bss
for the code, data and uninitialized-data sections.
marked as resolved by Diamondl ( talk) 03:25, 18 January 2018 (UTC)
I really don't like the section called "Example listing of assembly language source code" It provides no useful information and is in no way informative. Maybe a section of code from a real micro(processor/controller) would be useful but a snippet of code from a virtual device is useless. — Preceding unsigned comment added by Mtpaley ( talk • contribs) 22:57, 20 December 2012 (UTC)
I agree, the example fails to convey anything meaningful, it appears to just be a bunch of random additions without any apparent purpose. Would it be okay with people if I were to replace it with this code instead? (taken from an actual program)
OldCodger2 (
talk) 09:41, 29 January 2013 (UTC)
Example: x86 32 bit NASM, Note: this is a subroutine not a complete program.
178 ;ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
179 ;
180 ; counts a zero terminated ASCII string to determine it's size
181 ; in: eax = zstr.addr
182 ; out: ecx = zstr.count
183
184 zstr_count: ; entry point
185
186 00000030 B9FFFFFFFF mov ecx, -1 ; init the loop counter, pre-decrement to compensate for increment
187
188 .loop:
189 00000035 41 inc ecx ; add 1 to the loop counter
190
191 00000036 803C0800 cmp BYTE [eax + ecx], 0 ; compare the value at the base memory address + the loop offset to zero
192 0000003A 75F9 jne .loop ; if the memory value is Not Equal to Zero then jump to the label called '.loop'
193
194 .done:
195 ; we don't do a final increment because, even though the count is base 1,
196 ; we do not include the zero terminator in the count
197 0000003C C3 ret ; return to the calling program
198
199
200
okay, thanks for the feedback, glad you agree, I have gone ahead and updated the article. Hopefully this won't lead to any disagreements. I will leave the creation of a separate page with lots of assembly examples for a different day. OldCodger2 ( talk) 18:58, 5 February 2013 (UTC)
The last update changed the bare word assembler to a link. However, assembler is just a disambiguation page rather than an explanation of assembler programs. Is such a link appropriate? Shmuel (Seymour J.) Metz Username:Chatul ( talk) 22:22, 7 February 2013 (UTC)
"Modern assemblers, especially for RISC architectures, such as SPARC or Power Architecture, as well as x86 and x86-64, optimize instruction scheduling to exploit the CPU pipeline efficiently." - What? There is no citation but this suggests there exists an assembler which can do this. The closest thing I can think of would be MIPS branch delay slots, where assemblers exist (such as GNU gas) that can fill the slot with an instruction. 24.85.180.193 ( talk) 04:27, 11 January 2014 (UTC)
One fact to to keep in mind is that code rearrangements that improve performance on one processor may degrade it on another. A compiler (including an assembler) that has an option to do optimization for a specific processor may give result better than an assembler program hand optimized for one processor but run on another. Of course, configuration management will be more complicated if you have to distribute more versions of the object code. Shmuel (Seymour J.) Metz Username:Chatul ( talk) 18:40, 22 January 2014 (UTC)
Hi, I've suggested to rename seven
User asm categories to User ASM. The lower case names would conflict with the Ethnologue/IANA/ISO
asm language code as used in the {{#babel:…|asm-?|…}}
magic. The existing {{
User Assembly Language}}
templates -0…-5 and -N won't be affected. –
Be..anyone (
talk) 05:48, 15 February 2014 (UTC)
I consider myself an assembler expert, and I've never come accross an erata sheet, much less one that is treated by a linker. The suggestion ensues that one pass assemblers were the norm in primitive system, while in fact two pass assemblers were, and passing a long source on paper tape was twice done on e.g. Intel's first development system for the 8080. Later came the Isis system featuring double 8 inch floppies, and undoubtedly the assembler was two pass, but who to prove it. 80.100.243.19 ( talk) 04:21, 19 February 2014 (UTC)
The authors are muddying the waters by considering early on in the discussion of the number of passes the possibility that the assembler decides whether a jump could be long or short. It is quite common that the assembler forces or allows the programmer to specify the length. Under that assumption the one versus two pass can be discussed clearly. It must also be pointed out that in that case more than two passes are never applicable.
User:Ankitapasricha (no talk page) added a sample code section, but failed to mention the language. Any sample code in an article covering multiple languages should indicate the specific language, and, in this case, also the hardware platform. If anybody knows the processor, OS and assembler for the sample code, please update Assembly language#Sample Code to reflect that.
Shmuel (Seymour J.) Metz Username:Chatul ( talk) 17:06, 2 October 2014 (UTC)
I count myself as an assembler expert, and even have written a few. I never have come accross an errata assembler as described here, let alone as a class in its own standing apart from multi pass assemblers. Is this a crippled way to describe assemblers that give relocatable output? But in that case the term one pass is misleading, as relocatable output must be processed by a linker before it can be executed.
I'm so non plussed that I hesitate to try clear things up. — Preceding unsigned comment added by 80.100.243.19 ( talk) 14:09, 2 December 2014 (UTC)
One of my recent edits was reverted:
While the original version may have been more concise I felt that it was incomplete. I'd appreciate it if someone could provide another opinion. Peter Flass ( talk) 22:45, 12 February 2016 (UTC)
Reverse engineering of software/firmware can be used for many reasons, from the most worthy to the most unworthy:
I wonder if the sentence that was added today in the article, belongs here or better under reverse engineering. Dhrm77 ( talk) 13:26, 22 June 2016 (UTC)
Hello fellow Wikipedians,
I have just modified 4 external links on Assembly language. Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:
When you have finished reviewing my changes, please set the checked parameter below to true or failed to let others know (documentation at {{
Sourcecheck}}
).
This message was posted before February 2018.
After February 2018, "External links modified" talk page sections are no longer generated or monitored by InternetArchiveBot. No special action is required regarding these talk page notices, other than
regular verification using the archive tool instructions below. Editors
have permission to delete these "External links modified" talk page sections if they want to de-clutter talk pages, but see the
RfC before doing mass systematic removals. This message is updated dynamically through the template {{
source check}}
(last update: 18 January 2022).
Cheers.— InternetArchiveBot ( Report bug) 02:26, 20 October 2016 (UTC)
An assembler for assembling machine language uses Mnemonics to represent the binary codes of machine language. So it is not technically a separate language but an easier to remember alphabet for typing that machine language. Very high level macro-assemblers create what may look like an addition to the language giving rise to the idea that a new and separate language has been created but this article is about Machine Language Assemblers and should avoid such confusion IMHO Scottprovost ( talk) 02:59, 14 November 2016 (UTC) Scottprovost ( talk) 02:55, 14 November 2016 (UTC)
Since the assembly represents actual executable content and does not require decoding or compiling to run. Assembler code is not "Source" code, it is simply code. More accurately, it is object code. This machine code may be loaded into memory and called with no need for compiling as long as it is in binary format. The term source code is improper but acceptable in a non academic discussion. Whether it is appropriate in a Wikipedia Article I will leave up to others. Scottprovost ( talk) 03:11, 14 November 2016 (UTC) Scottprovost ( talk) 03:18, 14 November 2016 (UTC)
Assemblers are, in general, not one-to-one. They frequently have multiple mnemonics for the same opcode, and may perform optimizations, e.g., selecting near branches versus far branches. Then there are statements like EQU that do not generate code at all. Shmuel (Seymour J.) Metz Username:Chatul ( talk) 18:22, 26 June 2017 (UTC)
Hello fellow Wikipedians,
I have just modified 3 external links on Assembly language. Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:
When you have finished reviewing my changes, you may follow the instructions on the template below to fix any issues with the URLs.
This message was posted before February 2018.
After February 2018, "External links modified" talk page sections are no longer generated or monitored by InternetArchiveBot. No special action is required regarding these talk page notices, other than
regular verification using the archive tool instructions below. Editors
have permission to delete these "External links modified" talk page sections if they want to de-clutter talk pages, but see the
RfC before doing mass systematic removals. This message is updated dynamically through the template {{
source check}}
(last update: 18 January 2022).
Cheers.— InternetArchiveBot ( Report bug) 20:43, 10 July 2017 (UTC)
I am not sure if you had intended to link to another article but currently the citation: Booth, A.D.; Britten, K.H.V. (September 1947). "Coding for the ARC" (PDF). Birkbeck College, London. Retrieved 23 July 2017.
Points to the following document:
Booth, A.D.; Britten, K.H.V. (August 1947). "General Considerations In The Design Of An All Purpose Electronic Digital Computer" (PDF). [Source/Date TBD]
I did search for another PDF to what I think you intended, but could not readily find a PDF. I did include the following link as it might be helpful in the search for the actual content: http://hopl.info/showlanguage.prx?exp=4929
Thoughts? — Preceding unsigned comment added by Illusive.D0ct0r ( talk • contribs) 13:25, 7 December 2017 (UTC)
are there programmable devices, that have assemblers, that aren't computers? It depends. There are things that aren't computers in the way most people think about them, but then again, you might define anything programmable as a computer. How about programmable hand (or desk) calculators, that are most often not considered computers, but might do many things that one would commonly do on a computer. Assemblers are commonly used for microcoding, that is , for the internal control code of a computer. There are assemblers written specifically for finite state machines that are part of other systems, but not general enough to be computers. One of the less obvious ones, is that IBM OS/360, and likely other IBM systems, use the assembler to generate JCL for doing system generation. The assembler macro facility is general enough to do things other than generate machine code. Gah4 ( talk) 04:44, 14 May 2018 (UTC)
Assembly language has the statement "Despite the power of macro processing, it fell into disuse in many high level languages (major exceptions being C, C++ and PL/I) while remaining a perennial for assemblers." The preprocessor facilities of C and C++ are not particularly powerful, and can't even do simple computations.
I added the footnote "Of those listed, only the PL/I macro facility is Turing Complete" and user:Wtshymanski reverted it with no explanation. I'm throwing this open to discussion before I reinstate my correction. Shmuel (Seymour J.) Metz Username:Chatul ( talk) 17:08, 24 May 2018 (UTC)
I want to add a short description of the origins of assembler. (a) the first digital computer an assembler was written for, what it (assembler) was like (b) it's author (c) why it is named assembler/assembly language? by whom and when? (d) did it have another name originally?
Unfortunately, The sources I found are somehow contradictory. A number of different views can be found at https://www.quora.com/Why-is-the-assembly-language-called-so Particularly, it has the following statements: 1. The inventor actually called what we now call an assembler (which converts the mnemonics of Assembly into machine code) a “converter.” 2. the programmer would convert each symbolic instruction to its binary equivalent, which became known as “assembling” the program. It wasn’t long before someone wrote a program to do the job, and naturally named it the “assembler.” In a backward way, the symbolic instructions became known as “assembler” or “assembly” code. The most reliable source I found is IEEE computer society article David Wheeler 1985 Computer Pioneer Award "For assembly language programming". https://www.computer.org/web/awards/pioneer-david-wheeler Wheeler's "initial orders" allowed Edsac instructions to be provided in a simple language rather than by writing binary numbers, and made it possible for non-specialists to begin to write programs. This was the first "assembly language" and was the direct precursor of every modern programming language, all of which derive from the desire to let programmers write instructions in a legible form that can then be translated into computer-readable binary. -- P.maistrenko ( talk) 14:26, 4 October 2018 (UTC)
The infobox claims that "assembly language" first appeared in 1949, and the article also has a number of categories relating to that year. However, I can't find any text or citations in the article justifying that date, and in fact the section on "Historical perspective" claims that "The first assembly language was developed in 1947 by Kathleen Booth for the ARC2". Seems like an error.
The second paragraph of the paper written by the Booths begins:
Kathleen Booth's 1947 contribution to the field began with a 1946 trip by her future husband, Andrew Booth, to the USA, spending time at Princeton, gaining insight into the field from Prof. von Neumann. The following year they both came, for a longer (6 month) visit.
Their 1947 paper envisioned parallel arithmetic units and/or a large memory. Each parallel unit would possibly do 100 calculations per second, and a large memory would be 1,000 to 10,000 "numbers" of "approximately 40 binary digits." After talking theoretics, they labeled this "quite impracticable."
Over a decade later the word sizes of 36 bits (e.g. IBM 7094) were the high end, and while 32K did exist by that time, earlier machines were typically in the 4K range.
In short, since programming in those days meant flipping switches, Kathleen Booth's work was not the writing of an assembler, with or without a symbol table. It was really about not having to flip switches over and over, but rather recording binary values on paper tape.
One someone or several someones, together or at similar times but isolated from one another, developed assembly language. The "is credited" wording seems short and to the point. The Von Neumann reference isn't really necessary - it would require splitting all of this into sections to cover
It should be understood that even Project Whirlwind didn't meet all of the goals envisioned by the Booths. To recap, even "is credited" may be an overstatement, but to say that she actually wrote an assembler, on a machine that didn't deal in character data, is untrue. Pi314m ( talk) 07:34, 10 February 2019 (UTC)
The last three paragraphs of Assembly language#Assembly directives have nothing to do with Assembly directives
Symbolic assemblers let programmers associate arbitrary names ( labels or symbols) with memory locations and various constants. Usually, every constant and variable is given a name so instructions can reference those locations by name, thus promoting self-documenting code. In executable code, the name of each subroutine is associated with its entry point, so any calls to a subroutine can use its name. Inside subroutines, GOTO destinations are given labels. Some assemblers support local symbols which are lexically distinct from normal symbols (e.g., the use of "10$" as a GOTO destination).
Some assemblers, such as NASM, provide flexible symbol management, letting programmers manage different namespaces, automatically calculate offsets within data structures, and assign labels that refer to literal values or the result of simple computations performed by the assembler. Labels can also be used to initialize constants and variables with relocatable addresses.
Assembly languages, like most other computer languages, allow comments to be added to program source code that will be ignored during assembly. Judicious commenting is essential in assembly language programs, as the meaning and purpose of a sequence of binary machine instructions can be difficult to determine. The "raw" (uncommented) assembly language generated by compilers or disassemblers is quite difficult to read when changes must be made.
I'd probably move the text to new subsections of Assembly language#Key concepts or Assembly language#Language design.
Also, some compilers generate assembly language with comments or pseuodo-assembly listing with comments, e.g., many of IBM's PL/I compilers. Shmuel (Seymour J.) Metz Username:Chatul ( talk) 18:10, 14 April 2019 (UTC)
The following Wikimedia Commons file used on this page has been nominated for deletion:
Participate in the deletion discussion at the nomination page. — Community Tech bot ( talk) 23:38, 26 July 2019 (UTC)
There is recent discussion in edit summaries on one-pass assembly. Many (most? all?) assemblers allow forward references, such that they might not be able to completely assemble something on the first pass. It is, then, usual for a first pass that determines the address of each item (instruction or data), and then on the second pass, knowing all addresses, generate actual output. However, the object format used for OS/360, and possibly for others, has an address on each output card (that is, 80 byte record), such that output does not have to be in sequential address order. That makes it easier to write a one-pass assembler. On the other hand, you can write things where the length is determined by a symbolic name. I am not sure what they do about that. Note, though, that the out of order object code just moves the problem to the linker. The OS/360 linkage editor is famous for being slower than compilers. (An original design goal, and the reason for the name linkage editor, is to reduce the need for complete recompilation.) A multi-pass assembler that reads the input card deck more than once is pretty inconvenient. Later, they just use temporary disk files. Early assemblers had to run in small memory, though so did the linkers. Gah4 ( talk) 21:05, 20 April 2020 (UTC)
Some editorial comment indicated that it was unclear that the listing and code-generation would occur during the second pass. That's expected, since forward-references to symbols meant that the required values wouldn't be available until the whole source was read/parsed. And yes, reading a card deck or paper tape more than once was a little inconvenient TEDickey ( talk) 23:16, 20 April 2020 (UTC)
C was more popular than assembly for these 68000 based home computer systems. Rcgldr ( talk) 14:34, 11 September 2020 (UTC)
There is a lot of IBM 360 family legacy code that is a mix of Cobol and assembly. The historical reason is that the database access methods, such as ISAM (Indexed Sequential Access Method) (it might have been BDAM?) were implemented as assembly based macros, and as long as some assembly was needed, some optimized code was also implemented in assembly. For current usage, few companies would be willing to take the risk or time it would take to port huge libraries of working assembly code to higher level languages. Rcgldr ( talk) 14:38, 11 September 2020 (UTC)
Maybe BDAM. I used ISAM in PL/I and COBOL beginning in 1970 and never needed assembler for any of it. I don’t think HLLs supported all DAM options. I finally realized you could process all members of a BPAM dataset in PL/I (and presumably COBOL) with only an assembler routine to put the member names in the JFCB. Peter Flass ( talk) 21:20, 11 September 2020 (UTC)
@ Chatul: @ Peter Flass: Assembly macros are still in use. IBM's migration to the current version of Cobol includes the changes needed for the assembly code, but doesn't mention porting that assmembly code into Cobol, so apparently some aspects of the access methods still require assembly macros: DFSMS macro instructions for data sets pdf Rcgldr ( talk) 07:54, 12 September 2020 (UTC)
The article says: every assembly language is designed for exactly one specific computer architecture. While this should mostly be true, it doesn't seem quite so obvious. For one, when an architecture is extended, consider S/360, S/370, XA/370, ESA/370, ESA/390, z/, the new assembler is usually backwards compatible. (As long as you don't use new instructions.) Also, pretty often the first try for new instructions is done with macros in the old assembler. That won't work for new addressing modes, though. But also it depends on what you mean by assembly language. If it means other than the specific machine instructions, then some assemblers for 8 bit microprocessors could be used for more than one. A look-up table for the machine instructions was used, where the assembler instructions (see discussion above) were the same. Then there is GNU gas, which is multi-architecture, though usually not using the syntax of the one designed for each architecture, and often different opcode mnemonics. Gah4 ( talk) 04:19, 12 September 2020 (UTC)
References
GA toolbox |
---|
Reviewing |
Reviewer: Wasted Time R ( talk · contribs) 13:20, 17 September 2020 (UTC)
This looks to have been a drive-by nomination made by an erratic editor who has since been indef-blocked for incompetence. The article has large swaths of unsourced material, not just explanatory material but historical and analytical as well. In some cases there are whole sections without any citations. So this has to be a fail.
But the article is not bad at all. Content-wise, my main suggestion for improvement is that the use of assembly language for IBM mainframes needs to be given more attention. It is mentioned here and there, but back in the heyday of the IBM 360/370, when it was the dominant computing platform in the industry, assembly language was everywhere, not just for high-performance system software components but for run-of-the-mill business applications as well. Learning 360/370 Assembly was part of the standard education that commercial programmers had to get and there were a lot of textbooks and commercial courses available for it. For instance, in the textbook Kevin McQuillen, System/360–370 Assembler Language (OS) (Mike Murach & Associates, 1975), the example programs that the text develops concerns a batch inventory control and reorder application, and later parts of a batch payroll application are constructed. This whole aspect of historical assembly language use is counter-intuitive to today's reader and part of the value that this article can bring is to describe it. Wasted Time R ( talk) 13:20, 17 September 2020 (UTC)
I would suggest adding more information on the use of assembly language on platforms from other vendors, not just on other IBM platforms. I know for a fact that CDC and RCA used assemblers as implementation languages on their operating systems, and I'm confident that many others did as well. Similarly, there was a lot of customer use of assembly languages on non-IBM platforms. -- Shmuel (Seymour J.) Metz Username:Chatul ( talk) 14:21, 10 September 2021 (UTC)
@ Wtshymanski: In many assemblers, pseudo-ops used inside of macro definitions can also be used in open code, and the article does not discuss this. As a start, I added the text below, which user:Wtshymanski reverted:
In addition, some of the assembler statements useful in macro definitions are also valid in open code, e.g., the HLASM statements
- AGO
- Transfer to specified assembler statement
- AIF
- Evaluate logical and transfer if true
- GBLx
- Define compile-time variables in a global context
- LCLx
- Define compile-time variables in a local context
- SETx
- Evaluate expressions and assign their values to compile time variables
There is a lot of code that uses these facilities outside of macro definitions, and I believe that the existing text on assembly language macros is misleading without a discussion of the use of them in open code. -- Shmuel (Seymour J.) Metz Username:Chatul ( talk) 14:40, 10 September 2021 (UTC)
This article cites Tiobe reporting around 2.5% usage of assembly language. WebAsembly is not listed at all amongst 100 languages. Given the expectation that the latter is used more than the former, Tiobe may have mixed up these two. The Wikipedia article on the latter confusingly refers to the former. — Preceding unsigned comment added by Jgeer ( talk • contribs) 23:27, 7 November 2021 (UTC)
GliderMaven
GliderMaven merged two sentences to read Because assembly depends on the machine code instructions, each assembly language is specific to a particular
computer architecture and sometimes to an
operating system.
However, the reason that FORTRAN Assembly Program (FAP) on the FORTRAN Monitor System differs from Macro Assembly Program on
IBSYS/IBJOB and Assembler D on
DOS/360 differs from Assembler F on
OS/360 has nothing to do with dependency on the machine code, since the machine code is identical. --
Shmuel (Seymour J.) Metz Username:Chatul (
talk) 14:03, 11 November 2021 (UTC)
It's reasonable to say that if there are two different sets of machine instructions, two different assemblers will be required, but in this case it's four assemblers for two architectures. I wasn't citing four distinct assemblers for a single architecture, but rather two distinct assemblers for each of the architectures.
Yes, DOS/360 and OS/360 have different macro libraries, but they are not part of the assemblers. Assembler D is DOS only, assemblers E and F are is CP-67, OS/360 and TSS/360 and Assembler XF is in at least DOS/VSE, OS/VS1, OS/VS2 and VM/370. I believe that Assemblers E and F share code. All of which confirms that the because is incorrect. -- Shmuel (Seymour J.) Metz Username:Chatul ( talk) 14:08, 15 November 2021 (UTC)
@ Wtshymanski: In several assemblers, pseudoops meant for defining macros can also be used in open code.
I added the text "In addition, some of the assembler statements useful in macro definitions are also valid in open code, e.g., the
HLASM statements
In addition, some of the assembler statements useful in macro definitions are also valid in open code"? -- Shmuel (Seymour J.) Metz Username:Chatul ( talk) 01:42, 23 November 2021 (UTC)
There is a general rule in English (from various grammar books) that the usage like "The English language" requires the definite article.
As I understand from this article, there is a family of "assembly languages" (which would require one of them to be "an assembly language", and so it is written in Simple English Wikipedia) and one "assembler language" ("the assembler language", cf. IBM). Some sources also capitalize this word.
Unfortunately I'm not a native speaker, so I'm not sure what is correct (and I suspect that the contributors to this article are not exclusively native speakers). Probably all variants are, but maybe there should be a single variant across this article or Wikipedia? Maybe even add a section on its spelling and article (maybe to Wiktionary)?
Yaroslav Nikitenko ( talk) 16:02, 13 February 2022 (UTC)
Notes
I don't know if there is a good place to include this as a reference, but there is a short video series that is very good at explaining how assembly language works called Assembly Primer For Hackers. Hopefully there is a place to use this as a reference. Maybe in external links? -- Ubh [ talk... contribs... 05:51, 18 November 2023 (UTC)