flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Tomasz Grysztar 30 May 2010, 16:49
baldr wrote: FASM continues assembly pass after it detects error in load b from 1. Probably this is a feature. What is its purpose, I don't understand (perhaps it's a part of something bigger/unfinished) It's on of the so-called "recoverable errors". Since there is a possibility that error was caused by the intermediate (not yet resolved) values, assembler tries to ignore errors where it can, and tries to do another pass. Only if the error still occurs even when there's nothing more to resolve, it is accepted that this truly is an error. This helps fasm to resolve the code (that is: to find a correct "solution" - code that reflects the source in a valid way). The classical example of "recoverable error" is the "RB -1", which I sometimes recommended to use as a recoverable equivalent of ERR directive (which is not recoverable, just like "illegal instruction" error). For example: Code: if $>0FFFFh display "ERROR: code segment overflow" rb -1 end if Using ERR there would not be a good choice, because during the intermediate stages, before fasm finds the final, optimized (hopefully) solution, the code may be larger and with ERR inside such IF you wouldn't get the assemby process completed. However with "recoverable" error caused by "rb -1" you can be sure that only the overflow of final resolved code size will really cause an error. Also, if you aligned your output size this way: Code: rb 0FFFFh-$ The intermediate passes don't have to be "correct" (in fact - they never are, because if a pass finishes with a correct solution, it is the final pass). So really, assembler can do a real mess there, as long as it helps it to find the initial values that will help to find the right solution in the end. Last edited by Tomasz Grysztar on 30 May 2010, 19:11; edited 1 time in total |
|||
![]() |
|
baldr 30 May 2010, 18:06
Tomasz Grysztar,
Thank you very much. I've noticed different handling of some errors, now it's clear. |
|||
![]() |
|
revolution 30 May 2010, 18:24
baldr: In fasmarm I call this a deferrable error. That is, the error is deferred until later. Often when we get to "later" the error has disappeared. If the error persists then you get a message telling you that assembly failed.
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.