MASM as standard, fixmem example (Announce)
> So one may come to the conclusion that the number of passes is perhaps not
> really a sign of quality.
I think it should be pretty obvious that number of passes has _almost nothing_ to do with quality (however one would define "quality"). When assembling/compiling, the file(s) are read from top to bottom and sometimes something at the top of the file will refer to something later in the file, or even in a different file, and the assembler/compiler will not know what to do with it. The most obvious thing it may not know is the size (Byte, Word, DWord, QWord, Array, Structure, etc.) but there could be other things it may need to "guess" on the first pass. If it guesses wrong, things can get ugly (or at least non-optimal). The usual way around these things is to make "unnecessary" declarations (usually about size) for anything that is a forward reference, which makes the code more cumbersome to write since it includes a bunch of unneeded/duplicate syntax. In addition to sizes of data items, there are also issues related to sizes of JMPs (both conditional and non-conditional) and whether they are short or near (far jumps usually must be declared explicitly no matter what, at least in ASM).
However, the one good thing about making specific declarations is that it can provide a form of error checking -- if all the declarations for the same item don't match there may (or may not) be something wrong in the code. But, you can also sometimes use declarations to "override" the actual setting of something (like using a Word declaration to just refer to the lower half of a DWord item), so having them not match isn't necessarily an "error".
Anyway, the point is this all really has nothing to do with "quality" -- it has to do with how the assembler/compiler expects the code to be written and what "hoops" it wants the programmer to jump through to meet the expectations of the person/team that wrote the assembler/compiler.
I really don't see how a single-pass assembler/compiler could work as well as a multi-pass, at least when it comes to producing the most efficient (smallest size) output without requiring the code writer to jump through a bunch of "unnecessary" hoops.
Complete thread:
- MSDOS 4.0 - kerravon, 26.04.2024, 04:43 (Announce)
- MSDOS 4.0 - Guti, 26.04.2024, 14:06
- MSDOS 4.0 - Oso2k, 26.04.2024, 15:38
- MSDOS 4.0 - roytam, 26.04.2024, 17:05
- MSDOS 4.0 - Japheth, 26.04.2024, 17:34
- MSDOS 4.0 - RayeR, 27.04.2024, 03:05
- MSDOS 4.0 - Ringding, 01.05.2024, 13:34
- MSDOS 4.0 - rr, 01.05.2024, 14:37
- MSDOS 4.0 - kerravon, 29.04.2025, 06:34
- MSDOS 4.0 - kerravon, 29.04.2025, 08:14
- MSDOS 4.0 - kerravon, 29.04.2025, 08:47
- MSDOS 4.0 - ecm, 29.04.2025, 09:50
- MSDOS 4.0 - kerravon, 29.04.2025, 10:40
- MSDOS 4.0 - ecm, 29.04.2025, 11:07
- MSDOS 4.0 - kerravon, 29.04.2025, 11:50
- MSDOS 4.0 -- MASM as standard - Rugxulo, 29.04.2025, 20:40
- MSDOS 4.0 -- MASM as standard - kerravon, 29.04.2025, 21:43
- MSDOS 4.0 -- MASM as standard - Rugxulo, 30.04.2025, 10:55
- MSDOS 4.0 -- MASM as standard - kerravon, 30.04.2025, 16:17
- MSDOS 4.0 -- MASM as standard - Rugxulo, 30.04.2025, 10:55
- MASM as standard, fixmem example - ecm, 01.05.2025, 12:24
- MASM as standard, fixmem example - Japheth, 02.05.2025, 16:10
- MASM as standard, fixmem example - bretjohn, 02.05.2025, 17:09
- MASM as standard, fixmem example - Rugxulo, 07.05.2025, 03:23
- MASM as standard, fixmem example - Rugxulo, 07.05.2025, 03:05
- MASM as standard, fixmem example - bretjohn, 02.05.2025, 17:09
- MASM as standard, fixmem example - Japheth, 02.05.2025, 16:10
- MSDOS 4.0 -- MASM as standard - kerravon, 29.04.2025, 21:43
- MSDOS 4.0 -- MASM as standard - Rugxulo, 29.04.2025, 20:40
- MSDOS 4.0 - kerravon, 29.04.2025, 11:50
- MSDOS 4.0 - ecm, 29.04.2025, 11:07
- MSDOS 4.0 - kerravon, 29.04.2025, 10:40
- MSDOS 4.0 - ecm, 29.04.2025, 09:50
- MSDOS 4.0 - kerravon, 29.04.2025, 08:47
- MSDOS 4.0 - kerravon, 29.04.2025, 08:14
- MSDOS 4.0 - kerravon, 29.04.2025, 06:34
- MSDOS 4.0 - rr, 01.05.2024, 14:37
- MSDOS 4.0 - Japheth, 26.04.2024, 17:34
- MSDOS 4.0 - rr, 26.04.2024, 22:00
- MSDOS 4.0 - usotsuki, 30.04.2024, 17:41
- MSDOS 4.0 - boeckmann, 30.04.2024, 21:03