flat assembler
Message board for the users of flat assembler.

Index > Main > end reserved word fasmg

Author
Thread Post new topic Reply to topic
donn



Joined: 05 Mar 2010
Posts: 195
donn
Hi, getting pretty far through updating one of my four projects to fasmg with CALM. Is end a reserved word? Not seeing it as such in the docs, but would make sense if it was.

Trying to use it as a jmp label:
Code:
1>..\src\main\asm\datap.asm [10] ..\src\main\asm\datap.inc [3] ..\src\main\asm\Includes.inc [2] ..\src\main\asm\Include/List.inc [1] ..\src\main\asm\Include/../List/List.inc [816]:
1>      jl end
1>jl [2] parse_jump_operand [25] parse_operand [38] (CALM)
1>EXEC : error : invalid use of symbol.
    


Have tried it as:

Code:
end:
    


and

Code:
.end:
    


The latter worked as a label, but not when jumping to it. Not a blocker! I'm converting these to completed: in the meantime and was just curious.
Post 24 Mar 2020, 17:35
View user's profile Send private message Reply with quote
donn



Joined: 05 Mar 2010
Posts: 195
donn
Please disregard. Had

Code:
.end:
    


instead of

Code:
end:
    


Can't reproduce now, was find/replacing incorrectly most likely. Will follow-up here if anything else surfaces.
Post 24 Mar 2020, 17:40
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7795
Location: Kraków, Poland
Tomasz Grysztar
If you have a problem defining a label that has the same name as existing instruction, you can do it this way:
Code:
?end:
        jmp     end    
If an identifier is preceded by "?", it forces it to be interpreted as an expression-class symbol (instead of instruction-class).
Post 24 Mar 2020, 18:15
View user's profile Send private message Visit poster's website Reply with quote
donn



Joined: 05 Mar 2010
Posts: 195
donn
No problem, I may have repro'd in the included file using

Code:
        end:
    


Code:
1>flat assembler  version g.iveex
1>..\src\main\asm\datap.asm [10] ..\src\main\asm\datap.inc [3] ..\src\main\asm\Includes.inc [2] ..\src\main\asm\Include/List.inc [1] ..\src\main\asm\Include/../List/List.inc [443]:
1>      end:
1>Processed: end:
1>EXEC : error : invalid argument.
    


A little hard to tell at this point since supressing one error is leading to the next. Still converting the entire project. Not a blocker, have the ?end: solution and may just rename these to completed:.


Description:
Download
Filename: ListSnippet.inc
Filesize: 3.23 KB
Downloaded: 86 Time(s)

Post 24 Mar 2020, 20:54
View user's profile Send private message Reply with quote
donn



Joined: 05 Mar 2010
Posts: 195
donn
Post 25 Mar 2020, 00:17
View user's profile Send private message 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.