flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
ouadji 20 Aug 2011, 20:01
Tomasz, your opinion on this ? thank you in advance. |
|||
![]() |
|
vid 20 Aug 2011, 20:02
Maybe you should explain what your patch does?
|
|||
![]() |
|
ouadji 20 Aug 2011, 20:29
Code: ;PREPROCE.INC ;------------ control_character: cmp al,1Ah je line_end cmp al,0Dh je cr_character cmp al,0Ah je lf_character cmp al,9 je convert_line_data or al,al ;<---------------- al == 0 ? jnz symbol_character jmp line_end ;<------------- if al==0 then "end of line" ... if zero means the end of line (like 0x0D and/or 0x0A) then zero must mean the end of line in all cases. |
|||
![]() |
|
vid 20 Aug 2011, 20:44
thanks. stickied.
|
|||
![]() |
|
ouadji 23 Aug 2011, 14:43
The fasm compiler assumes that "zéro" means the end of line. (like 0x0D and/or 0x0A) Code: ;PREPROCE.INC ;------------ control_character: cmp al,1Ah je line_end cmp al,0Dh je cr_character cmp al,0Ah je lf_character cmp al,9 je convert_line_data or al,al ;<---------------- al == 0 ? jnz symbol_character jmp line_end ;<------------- if al==0 then "end of line" ... The compiler does not take into accont the "zero" as end of line in all cases. Here is a simple example (attached file). Code: db \ ;<--- eol==0 1 the result is: "extra characters on line" why ? Because the compiler sometimes sees the "zero" as the end of the line, and sometimes as the end of the file. (The solution is in my first post)
|
|||||||||||
![]() |
|
AsmGuru62 23 Aug 2011, 16:35
The backslash is a LAST character on line by its definition - and FASM 'knows' it perfectly well. Not a bug IMO.
|
|||
![]() |
|
Tomasz Grysztar 23 Aug 2011, 18:21
It should in fact treat 0 byte as EOF, but it's been broken because I did not add appropriate check in the parent loop when once (long time ago) restructuring the code. So it started working as EOL only, and that's why there is this inconsistency.
|
|||
![]() |
|
ouadji 23 Aug 2011, 18:47
thank you Tomasz for your reply. Ok, understood. Maybe it's time to fix this small inconsistency. Why not ? |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.