flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > Small bug in dos version fasm

Author
Thread Post new topic Reply to topic
CandyMan



Joined: 04 Sep 2009
Posts: 322
Location: film "CandyMan" directed through Bernard Rose OR Candy Shop
CandyMan
SOURCE\DOS\FASM.ASM - start from line 254
Code:
    all_params:
        xor     al,al
        stosb
        cmp     [input_file],0          ;\ moved this
        je      bad_params              ;/ lines up
        pop     ds
        clc
        ret
    bad_params:                     ;jump to this line from line 137
        pop     ds                      ;insert this line
        stc
        ret

    

_________________
smaller is better
Post 26 Sep 2012, 20:59
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7802
Location: Kraków, Poland
Tomasz Grysztar
If you moved these lines up, you need to write [es:input_file] there, because DS is set to PSP at that point. Note that in the beginning of "get_params" procedure the data segment is stored on stack and DS is loaded with PSP segment number. During the routine ES prefix is used whenever fasm's data segment needs to be accessed (because DS=PSP).
Post 26 Sep 2012, 21:29
View user's profile Send private message Visit poster's website Reply with quote
CandyMan



Joined: 04 Sep 2009
Posts: 322
Location: film "CandyMan" directed through Bernard Rose OR Candy Shop
CandyMan
Run fasm with command line: "fasm a b c" and see what will happen.
Post 27 Sep 2012, 06:02
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7802
Location: Kraków, Poland
Tomasz Grysztar
You don't have to demonstrate that there was a bug, I know what you were trying to fix - and I already had uploaded the corrected package yesterday.
I was just pointing out that your fix was not correct.
Post 27 Sep 2012, 08:34
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.