flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > a question for Tomasz (solved)

Author
Thread Post new topic Reply to topic
ouadji



Joined: 24 Dec 2008
Posts: 1081
Location: Belgium
ouadji 23 Jun 2010, 15:57
hello Tomasz,

a small quesyion :
X86_64.INC :
Code:
NOT this: (original code)
--------
jump_out_of_range:
        cmp     [error_line],0
      jne     instruction_assembled
       mov     eax,[current_line]
  mov     [error_line],eax
    mov     [error],relative_jump_out_of_range
  jmp     instruction_assembled

;instruction_assembled: (ASSEMBLE.INC)
;    mov     al,[esi]
;   cmp     al,0Fh
;     je      line_assembled
;     or      al,al
;      jnz     extra_characters_on_line
;       .....

BUT: (my proposal)
----
jump_out_of_range:
   cmp     [error_line],0
      jne     instruction_assembled
       mov     eax,[current_line]
  mov     [error_line],eax
    jmp     relative_jump_out_of_range ; ------> end
    

Why not do like this ?
why not jump directly to "relative_jump_out_of_range" ?
Fasm works perfectly and this way seems more logical.
Why continue the analysis of the source after the first "out_of_range error" ?

_________________
I am not young enough to know everything (Oscar Wilde)- Image


Last edited by ouadji on 23 Jun 2010, 18:01; edited 1 time in total
Post 23 Jun 2010, 15:57
View user's profile Send private message Send e-mail Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8351
Location: Kraków, Poland
Tomasz Grysztar 23 Jun 2010, 16:10
You may find the answer in this thread: http://board.flatassembler.net/topic.php?t=11550
Post 23 Jun 2010, 16:10
View user's profile Send private message Visit poster's website Reply with quote
ouadji



Joined: 24 Dec 2008
Posts: 1081
Location: Belgium
ouadji 23 Jun 2010, 16:24
I understood why ... (indeed) ...
ok, thank you for your quick reply Tomasz

_________________
I am not young enough to know everything (Oscar Wilde)- Image
Post 23 Jun 2010, 16:24
View user's profile Send private message Send e-mail 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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.