flat assembler
Message board for the users of flat assembler.
Index
> Compiler Internals > fasmg on Windows 7 bug: display fails on long output |
Author |
|
Tomasz Grysztar 21 Sep 2016, 06:33
I tested on Windows and Linux and with either "bug = 0" and "bug = 1", and I see the "hello" message every time. Perhaps there is some additional condition to reproduce the bug? What version of fasmg have you tested?
|
|||
21 Sep 2016, 06:33 |
|
Grom PE 21 Sep 2016, 07:48
To reproduce this bug, I used
fasmg 0.96.1449399753 fasmg 0.98.1474441044 on Windows 7, 64-bit fasmg 0.98.1474441044 on Windows XP 32-bit, Windows 2000: fine with 13303 repeats, triggers with 13304 repeats |
|||
21 Sep 2016, 07:48 |
|
Tomasz Grysztar 21 Sep 2016, 07:57
On Windows 10 I went up to 1000000 and still saw nothing suspicious. Perhaps this is a problem of the console? If you redirect the output to the file (like "fasm test.asm nul > test.out") is the display in file cut off too?
|
|||
21 Sep 2016, 07:57 |
|
Grom PE 21 Sep 2016, 08:10
You're right, redirected output is fine.
Still, quite surprising behavior while fasm worked as expected... Edit: clarified the topic, also see a similar bug report in Python. |
|||
21 Sep 2016, 08:10 |
|
Grom PE 21 Sep 2016, 11:42
I fixed it by changing source/windows/system.inc, the end of the display_string function:
Code: write_string_to_stdout: cmp ecx, 51200 jg write_long_string_to_stdout invoke WriteFile,[stdout],esi,ecx,bytes_count,0 retn write_long_string_to_stdout: push esi push ebx mov edi, ecx mov ebx, 51200 next_write_to_stdout: invoke WriteFile,[stdout],esi,ebx,bytes_count,0 add esi, ebx sub edi, ebx cmp edi, ebx jg next_write_to_stdout invoke WriteFile,[stdout],esi,edi,bytes_count,0 pop ebx pop esi retn Tested on Windows 2000 and 7, works fine. Attached diff file for convenience.
|
|||||||||||
21 Sep 2016, 11:42 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.