format of a assembly language <statement>

< Previous | Next >

mark89

Senior Member
Serbian
Hi I' m not english, so I not understand the word "statement" in this sentence: format of a assembly language statement. If I don't put "statement", the sentence take on same meaning. So " format of a assembly language statement" and " format of a assembly language" are two sentence equals. Isn't it?
 
  • Cagey

    post mod (English Only / Latin)
    English - US
    Hello, mark89. :)

    What you have given us is a not a complete sentence. It doesn't have a verb. Also, we need more background. Who wrote this? What are they writing about? And so on.

    We need more information to be sure we are giving you an accurate answer, which is what we hope to do.
     

    mark89

    Senior Member
    Serbian
    Hi Cagey, the sentence "format of a assembly language statement" is the title of a paragraph of a book. The paragraph introduce to format of a instruction assebly. Maybe "statement" is the subject to the sentence and "assembly" and "language" are adjectives.
     

    Myridon

    Senior Member
    English - US
    "Assembly language" is a type of computer language as "the English language" is a type of human language. A statement is like a sentence.
    You do not have a sentence here. It's just a title. There is no verb.
    "(The) format of an assembly language statement" has the same structure as "(the) format of an English language sentence". You cannot leave "statement" out.
     

    Smauler

    Senior Member
    British English
    Also, if the book is about assembly, or computer languages in general, I'd leave out the word "language". Everyone knows it's a language, and we just generally call it "assembly".

    "The format of an assembly statement" is how I'd write it.

    I grew up calling it "assembler" (along with loads of other people, I was not just wrong), and this is also used, though is not used as much now. Bear in mind when some people say assembler, they may mean assembly. Assembly is preferred.

    Edit : Also, I may have misunderstood. If you just want to talk about the format of assembly in general, "The format of assembly" is all you need. The "a" is not needed, and wrong. I thought you were talking about the formats of statements specifically, in which case everything I wrote above still applies.
     
    Last edited:

    Biffo

    Senior Member
    English - England
    Hi I' m not english, so I not understand the word "statement" in this sentence: format of a assembly language statement. If I don't put "statement", the sentence take on same meaning. So " format of a assembly language statement" and " format of a assembly language" are two sentence equals. Isn't it?
    I agree with Myridon.

    There is a clear difference between the format of an assembly language and the format of an assembly language statement.

    Each type of statement has its own well-defined format. Example: MOV AL, 61h ;

    If you deviate from this format, the statement will not compile.

    I am not sure it makes sense to say that the language itself has a format. Does English have a format? Does Italian have a format? They have rules but that is all.
     

    Smauler

    Senior Member
    British English
    Format is another name for rules, in my opinion, when you're talking about languages. Format does not have anything to do with how things are presented in computer languages. That's style.
     

    Biffo

    Senior Member
    English - England
    Format is another name for rules, in my opinion, when you're talking about languages. Format does not have anything to do with how things are presented in computer languages. That's style.
    My point is that

    (1) an individual statement in a computer language has a format.

    (2) A assembly language program has a format.

    (3) A computer language does not have a format. It is not a template, it is a formal grammar with a clear set of rules.


    We can compare this with a formal business letter.

    (4) A sentence has a format. (e.g. Starts with a capital letter, has a subject, has a verb, finishes with a full stop. I'm simplifying obviously.)

    (5) A business letter has a format. (e.g. Greeting, Body text, Valediction, Signature. I'm simplifying again.)

    (6) Business English does not have a format. It has a vocabulary and rules for combining the words.
     
    Last edited:

    Edinburgher

    Senior Member
    German/English bilingual
    The format of an assembly language statement corresponds to the format of an English language sentence.
    "Format" is not directly equivalent to "rules", because rules can be quite general, while format is more specific, more technically low-level.
    The format of an English sentence is that it usually has a subject and a verb and an object, and that it begins with a capital letter and ends in a full stop (or period).
    The format of a typical assembler (*) statement is that it consists of an instruction mnemonic followed by some parameters; there might also be a label and a comment, etc.

    The language itself (be it assembly language or English language) will have rules, but we don't call them "formats".

    (*) You said that we just generally call [assembly language] "assembly", but that is not universally true; I know some people do call it that, but I don't. I call it "assembler". In theory this is ambiguous, because "assembler" also means the tool which translates assembly language programs into machine code. Similarly, "assembly" is also ambiguous because it can refer to the process of using the assembler to make that translation. We're just trading one ambiguity for another, and the choice is one of preference and style.

    (crossposted, obviously)
     

    Smauler

    Senior Member
    British English
    (3) A computer language does not have a format. It is not a template, it is a formal grammar with a clear set of rules.
    I think you're right. Different computer languages have different format layouts by custom, not as anything inherent in their design. However, many were attempted to be designed with format in mind.

    Higher level coding (ie anything above assembly) is essentially different formats for the (hopefully) same result. How you get there, and how you do is dependent on the compiler, which is dependent on the format.

    And it is dependent on the format. You can write perfect C and not get close to efficiency, then write for the compiler and device and get decent results.

    edit : Yes, perhaps that's not format.
     

    mark89

    Senior Member
    Serbian
    Hi, I think that the format, beyond to describe an operation, it indicate also how a statement must be write for it be correctly compile.
     

    Egmont

    Senior Member
    English - U.S.
    The format of an assembly language (that's what I usually call it) statement is usually something like this:

    1. Optionally, a label.
    2. A tab character.
    3. An operation code.
    4. A tab character.
    5. Zero or more operands, separated by commas. (Specific operation codes may have their own requirements for the number and form of their operands.)
    6. Optionally, a tab character followed by comments that the assembler ignores.
    7. A new-line character (or the end of the file).

    This format applies to all assembly language statements. It is, as previously posted, more precise than the "format" of an English sentence, if English sentences can be said to have a format. Whether the collection of statements that someone wrote will run without errors, whether (if it does) it will produce the desired result, and whether (if it also does that) it will do so efficiently, are topics for programming courses but have nothing to do with format. Formatting errors are caught before anyone tries to run the program.
     

    Banet Eagle

    Senior Member
    Arabic
    ...
    The language itself (be it assembly language or English language) will have rules, but we don't call them "formats".

    (*) You said that we just generally call [assembly language] "assembly", but that is not universally true; I know some people do call it that, but I don't. I call it "assembler". In theory this is ambiguous, because "assembler" also means the tool which translates assembly language programs into machine code. Similarly, "assembly" is also ambiguous because it can refer to the process of using the assembler to make that translation. We're just trading one ambiguity for another, and the choice is one of preference and style.
    I agree with that.

    My undergrad degree is in Informatics and we used to call the rules of a programming language as "Syntax". Errors in the syntax are detected by the compiler and prevents the program from running.
     

    Egmont

    Senior Member
    English - U.S.
    Syntax is not format. Syntax applies primarily to procedural (not assembly) languages. (An undergraduate degree program in informatics, as opposed to electrical engineering or computer science, is likely to cover only procedural languages.) It describes the logical relationships among elements of a language. Formatting is more about the physical relationships. For example, the semicolon ; is a statement separator in Pascal, a statement terminator in C. The format is the same, but the syntax is different.
     

    Edinburgher

    Senior Member
    German/English bilingual
    I'm not convinced that's the best way to describe it, Egmont.
    We could say that syntax is a property of the language, whereas format is a property of the statement.
    The syntax of a language determines how the programmer should format (or lay out) a statement.
     

    Egmont

    Senior Member
    English - U.S.
    I'm not convinced that's the best way to describe it, Egmont.
    We could say that syntax is a property of the language, whereas format is a property of the statement.
    The syntax of a language determines how the programmer should format (or lay out) a statement.
    I'm with you until the last line. It applies to procedural (higher-level) languages, but not to assembly languages. Assembly languages are the topic of this thread.

    At the assembler level, it is meaningful to discuss format independently of syntax. Indeed, the concept of syntax doesn't really apply at that level. Let's not muddy the discussion by introducing irrelevant concepts from a different category of computer languages.
     

    Edinburgher

    Senior Member
    German/English bilingual
    I'm with you until the last line. It applies to procedural (higher-level) languages, but not to assembly languages.
    It applies to both. At the level we've been discussing, there is no fundamental difference (*) between assembly languages and higher-level languages. In both there exist syntactic rules which govern what statements should look like, and this (what statements should look like) determines how they (compilers and assemblers) go about parsing the statements they are given. If the format of a statement is wrong (**), the parsing will fail because the syntax rules of the language have not been complied with. This is as true in assembly language as it is in high-level languages.

    (*) There is a significant difference in how complicated the rules are, of course. The syntax rules of higher-level languages are a bit less simple-minded than those of assembly languages.
    (**) For example, when you give the wrong number of operands to an instruction, or mis-type a comma as a dot, or (referring to your sample rules in #12) you might have omitted the tab character before the opcode, making the assembler think the opcode is a label.
     

    Biffo

    Senior Member
    English - England
    Hi I' m not english, so I not understand the word "statement" in this sentence: format of a assembly language statement. If I don't put "statement", the sentence take on same meaning. So " format of a assembly language statement" and " format of a assembly language" are two sentence equals. Isn't it?
    Returning to the original question for a moment.

    The answer is no. The two sentences are not equal. This is the case regardless of whether an assembly language can be considered to have a format or not.

    An assembly language and an assembly language statement are not equivalent -- they are not even the same kind of thing -- and so the two proposed sentences are not equivalent either.
     
    < Previous | Next >
    Top