flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
ouadji
Tomasz, your opinion on this ? thank you in advance. |
|||
![]() |
|
vid
Maybe you should explain what your patch does?
|
|||
![]() |
|
ouadji
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
thanks. stickied.
|
|||
![]() |
|
ouadji
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
The backslash is a LAST character on line by its definition - and FASM 'knows' it perfectly well. Not a bug IMO.
|
|||
![]() |
|
Tomasz Grysztar
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
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-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.