flat assembler
Message board for the users of flat assembler.
Index
> IDE Development > [BUG] FASM DOS IDE - CTL-BREAK, ZERO & UP-DIR issues |
Author |
|
DOS386 21 Feb 2011, 07:37
. . .
. . . 1.69.31, new bugs discovered (does not necessarily mean that the bugs have been also recently introduced, though): 1. CTL-BREAK inserts a space into the text. When saved however, there is no space, but ZERO on that place. (STATUS: PATCH PENDING) Solution: insert nothing, or a proper space, or something else ("!") 2. When loading a file containing ZERO values, it aborts just at the earliest ZERO. (STATUS: OPEN) Solution: convert ZERO values into something else ("!") 3. UP-DIR hangs in some special cases. Regrettably I could not find a "100% fail" steps to reproduce. Especially adding older versions into the DIR (to test where it broke) makes the problem vanish (STATUS: PROBABLY FIXED 2016-Jul) Wishlist: - Report total text size in Byte's in the bottom bar - Progress indicator for load and save (with 4 KiB block size it's quite slow) - Add a "no undo" mode (allowing to edit bigger texts) (done) http://board.flatassembler.net/topic.php?t=17366 (absurdly long lines and CTL-BREAK, both fixed) http://board.flatassembler.net/topic.php?t=11061 (garbage text, fixed) http://board.flatassembler.net/topic.php?t=10302 (beer, drunk & fixed) http://board.flatassembler.net/topic.php?t=10078 (S&R, fixed, not BUG) http://board.flatassembler.net/topic.php?t=9925 (memhog, S&R, fixed, almost) http://board.flatassembler.net/topic.php?t=9910 (files, done) http://board.flatassembler.net/topic.php?t=9679 (calc, done) http://board.flatassembler.net/topic.php?t=9494 (1'000'000'000, my fork) http://board.flatassembler.net/topic.php?t=7459 (???, partially done) http://board.flatassembler.net/topic.php?t=6626 (2007-Jan, 2 bugs + misc) Last edited by DOS386 on 12 Jul 2016, 17:21; edited 3 times in total |
|||
21 Feb 2011, 07:37 |
|
DOS386 16 Jun 2012, 08:38
Tomasz Grysztar wrote: This one is intentional - fasm always treated zero byte the same as EOF, and so fasm's editors do the same. Some systems use CTL-Z for the very same purpose But please look at the others, that are probably not intentional. |
|||
16 Jun 2012, 08:38 |
|
AsmGuru62 16 Jun 2012, 12:52
Why would anyone need zero byte in text file?
|
|||
16 Jun 2012, 12:52 |
|
DOS386 10 Apr 2013, 12:03
AsmGuru62 wrote: Why would anyone need zero byte in text file? It's NOT about need ... it's about text files that may contain ZERO's for whatever obscure reason ... and they are getting truncated silently, so I still think that this behavior (of FASM, INFOPAD, and maybe more) is bad, and an editor should convert the incoming ZERO's (and other faulty values) into something (space, "{ZERO}", "\0" or whatever) less bad. I got a PM from AsmGuru62 and I see no point making the thing secret: > To: DOS386 > Posted: 04 Apr 2013, 12:28 > Subject: Does FreeDOS have a good FASM IDE? > Hi, > I am aware that FASM package (for MS-DOS) includes a DOS IDE, > but is there anything more advanced? Probably NO. But what features do you miss ? _________________ Bug Nr.: 12345 Title: Hello World program compiles to 100 KB !!! Status: Closed: NOT a Bug |
|||
10 Apr 2013, 12:03 |
|
AsmGuru62 10 Apr 2013, 21:54
I never actually code for DOS anymore.
I was thinking maybe others need something. |
|||
10 Apr 2013, 21:54 |
|
DOS386 12 Jul 2016, 05:01
Code: ; FASMD.ASM 129'101 2016-02-05 21:53 ; BD16'46BE'4E25'9B42'3620'8730'BB22'B45F ; flat assembler IDE for DOS/DPMI ; Copyright (c) 1999-2016, Tomasz Grysztar. ; All rights reserved. browser_directory_ok: cmp byte [buffer+1],':' jne browser_drive_ok ; FWD mov dl,[buffer] sub dl,'A' cmp dl,'Z'-'A' jbe browser_change_drive ; FWD sub dl,'a'-'A' browser_change_drive: mov ah,0Eh int 21h browser_drive_ok: push 0 ; PUSH here <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< cmp dword [buffer],'..' jne name_to_select_ok ; FWD mov edi,buffer+3000h mov al,'\' find_last_directory_name: mov esi,edi repne scasb cmp byte [edi],0 jne find_last_directory_name ; HANG here <<<<<<<<<<<<<<<<<<<<<<<< lea ecx,[edi-1] sub ecx,esi mov edi,buffer+400h mov [esp],ecx mov ebx,upper_case_table get_name_to_select: lodsb xlatb stosb loop get_name_to_select ; BCK SMALL LOOP name_to_select_ok: mov edi,buffer+3000h call get_current_directory jc browser_drive_invalid ; JUMP OUT here <<<<<<<<<<<<<<<<<<<<<<<< cmp byte [edi-2],'\' je browser_new_path_ok ; FWD mov word [edi-1],'\' browser_new_path_ok: call make_list_of_files call draw_browser_path mov ebx,filename_buffer xor eax,eax mov [ebx+8],eax mov [ebx+12],eax mov [ebx+16],al mov ebx,boxes mov esi,[file_list] mov [ebx+12],esi mov ecx,[file_list_buffer_top] sub ecx,esi shr ecx,2 mov [ebx+6],cx xor eax,eax mov [ebx+8],eax mov eax,esi pop edx ; POPE here <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< find_name_to_select: cmp eax,[file_list_buffer_top] je file_list_selection_ok ; FWD mov esi,[eax] add esi,2 mov edi,buffer+400h mov ecx,edx repe cmpsb je select_directory ; FWD add eax,4 jmp find_name_to_select ;------------------------- select_directory: sub eax,[file_list] shr eax,2 mov [ebx+8],ax file_list_selection_ok: test byte [filename_buffer+1],1 jnz activate_file_input ; BCK jmp activate_file_browser ; BCK ;--------------------------- browser_drive_invalid: mov dl,[buffer+3000h] sub dl,'A' cmp dl,'Z'-'A' jbe browser_restore_drive ; FWD sub dl,'a'-'A' browser_restore_drive: mov ah,0Eh int 21h pop eax jmp file_list_selection_ok ; BCK ;---------------------------- I've now isolated the UP-DIR-BUG and discovered one more potential BUG. UP-DIR, whether triggered by clicking the ".." or by the [DEL] key, hangs sometimes (not always, unfortunately). It hangs inside the "find_last_directory_name" loop. I suspect some sort of uninitialized variable or buffer. Also, there is a PUSH ... POP section of code, and a JUMP OUT maybe leaving the ZERO on the stack. Hope it can be fixed now. _________________ Bug Nr.: 12345 Title: Hello World program compiles to 100 KB !!! Status: Closed: NOT a Bug |
|||
12 Jul 2016, 05:01 |
|
Tomasz Grysztar 12 Jul 2016, 07:02
DOS386 wrote: It hangs inside the "find_last_directory_name" loop. I suspect some sort of uninitialized variable or buffer. |
|||
12 Jul 2016, 07:02 |
|
DOS386 12 Jul 2016, 08:21
Tomasz Grysztar wrote: ECX is uninitialized there. Please try with the correction I uploaded (it's added "or ecx,-1" after "mov al,'\'" instruction). Great ... UP-DIR-BUG fixed after just 2 hours (I'll test) What about the possible stack-BUG? |
|||
12 Jul 2016, 08:21 |
|
Tomasz Grysztar 12 Jul 2016, 09:02
DOS386 wrote: What about the possible stack-BUG? |
|||
12 Jul 2016, 09:02 |
|
DOS386 12 Jul 2016, 09:31
> "pop eax" does the cleanup
I see -> CLOSED:INVALID |
|||
12 Jul 2016, 09:31 |
|
DOS386 12 Jul 2016, 17:00
Code: ; Patch for the CTL-BREAK-BUG wait_for_input: call update_clock mov ah, $11 int $16 jz wait_for_input ; No key mov ah, $10 int $16 ; AL ASCII code | AH scan code test ax, ax ; CMPNTQ AX, ZERO jz wait_for_input ; NOT valid, most likely [CTL]-[BREAK] ret ;---- Also the CTL-BREAK-BUG is very easy to fix. |
|||
12 Jul 2016, 17:00 |
|
Tomasz Grysztar 12 Jul 2016, 18:52
OK, these two lines do not hurt. Added.
|
|||
12 Jul 2016, 18:52 |
|
DOS386 13 Jul 2016, 14:52
Great ... another 2 hours later another 10 years old BUG is killed.
Last known BUG for now (NOT recently retested): FASM IDE aborts loading if the incoming file contains a ZERO, file is loaded incompletely and after re-save truncated. IMHO ZERO (and maybe $1A EOF and other possible faulty values) should be handled some better way: - turn them into spaces or - completely reject the file |
|||
13 Jul 2016, 14:52 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.