flat assembler
Message board for the users of flat assembler.

Index > IDE Development > Wink 6.92.03 (vertical selection + compiling)

Goto page Previous  1, 2, 3 ... 13, 14, 15 ... 19, 20, 21  Next
Author
Thread Post new topic Reply to topic
bitshifter



Joined: 04 Dec 2007
Posts: 764
Location: Massachusetts, USA
bitshifter
Hi, use GetCurrentDirectory then lstrcat /filename onto it...
BTW, Looking very nice Razz
Post 04 Nov 2010, 02:11
View user's profile Send private message Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 2940
Location: vpcmipstrm
bitRAKE
Try,

invoke GetModuleFileName, NULL, szFilePath, _MAX_PATH

...this will work no matter the current directory.
Post 04 Nov 2010, 02:43
View user's profile Send private message Visit poster's website Reply with quote
ouadji



Joined: 24 Dec 2008
Posts: 1081
Location: Belgium
ouadji

thank you bitshifter and bitRAKE for your replies.

bitRAKE,

GetModuleFileName ?

to get the path of "Wink"
and then modify it to create the path of "key_W.wink"
(in the same directory)

like this ? (this below works fine)

but why not GetFullPathName ? <---- Question

and what do you think about "GetCurrentDirectory" ?


Code:
;this works
          invoke  GetModuleFileName,NULL,kw_path,MAX_PATH
             ;or     eax,eax
             ;jz     .crash

          lea     edi,[kw_path + eax] ;FileTitle db 'key_W.wink',0
.loopsz:      dec     eax                 ;sizeof.FileTitle = $-FileTitle
         jz      .crash              ;kw_path db MAX_PATH dup ?
              dec     edi
         cmp     byte[edi-1],'\'
          jnz     .loopsz

         lea     esi,[eax + sizeof.FileTitle - 1]
            cmp     esi,MAX_PATH
                ja      .crash

          mov     esi,FileTitle
               mov     ecx,sizeof.FileTitle
           rep  movsb

     ; invoke  CreateFile,kw_path,\
     ; GENERIC_READ,0,0,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,0
     

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


Last edited by ouadji on 04 Nov 2010, 18:37; edited 2 times in total
Post 04 Nov 2010, 09:22
View user's profile Send private message Send e-mail Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7752
Location: Kraków, Poland
Tomasz Grysztar
ouadji: look at how fasmw finds the path to fasmw.ini file and include directory. It is one of the first things it does during startup.
Post 04 Nov 2010, 13:08
View user's profile Send private message Visit poster's website Reply with quote
ouadji



Joined: 24 Dec 2008
Posts: 1081
Location: Belgium
ouadji
Code:
invoke GetFullPathName,FileTitle,MAX_PATH,kw_path,NULL
;or    eax,eax
;jz  .RKF_crash

;invoke CreateFile,\
;kw_path,GENERIC_READ,0,0,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,0

FileTitle db 'key_W.wink',0
kw_path   rb  MAX_PATH
    

thank you boss for the tip Wink

but in "FASM.ASM" :
-------------------

why : ini_path rb 1000h

and not : ini_path rb MAX_PATH Question

EDIT: Confused
-----
Sorry Tomasz, but your solution does not work
if I want to open a ASM file from a directory other than Wink.
For cons, the bitRAKE solution works fine.
Quote:
from bitRAKE : ...this will work no matter the current directory.
yes, indeed.

_________________
I am not young enough to know everything (Oscar Wilde)- Image
Post 04 Nov 2010, 14:36
View user's profile Send private message Send e-mail Reply with quote
Z3N



Joined: 01 Oct 2009
Posts: 17
Z3N
How can I add new symbols or change existing?
Because it looks cool, when 16 and 32 bit registers shown in different colors.

And of course IDE need autocomplete.

And where I can get sources? Rolling Eyes

_________________
"There will be no more delay!" (Revelation 10)
Post 15 Nov 2010, 08:43
View user's profile Send private message Reply with quote
ouadji



Joined: 24 Dec 2008
Posts: 1081
Location: Belgium
ouadji

different colors for "ebx" and "bx" ... ?
a automatic switch colors with keywords "use16/use32/use64" ?
why not ! ... later.
For now I'm working on several other important features.
The full management of "struct" highlighting.
(of course only for the "original fasm 'struct' macro")
it's over, that's works fine.

Now, the highlighting of "{ ..\{..\\{..\\} ..\}..}" syntax, for macros.
Wink will check this syntax., and will allow to show errors quickly.

Not for the macro language itself.
Too difficult to do this in real time, the computing time is too long.
Only for "{.\{.\}.}" syntax. (for now)

Quote:
And of course IDE need autocomplete.
sorry, i don't understand this.
Quote:
How can I add new symbols or change existing?
you can't for now.
Which extra symbols would you want ?
Quote:
And where I can get sources ?
right in front of me (and inside my brain too) Wink
I will give the sources with the next version.

In approximately one month,
Wink 7.0 alpha will be ready for the first tests.

(sorry for my english)

_________________
I am not young enough to know everything (Oscar Wilde)- Image
Post 15 Nov 2010, 10:01
View user's profile Send private message Send e-mail Reply with quote
Z3N



Joined: 01 Oct 2009
Posts: 17
Z3N
ouadji wrote:

(sorry for my english)


Very Happy It's my english bad....

I mean code complete. Ctrl+Space in RadAsm....

ouadji wrote:
Too difficult to do this in real time, the computing time is too long


Question This means that the algorithm is incorrect Crying or Very sad

ouadji wrote:

Which extra symbols would you want ?


It's a bit of my usefull macro. And I want highlight api words.

ouadji wrote:
and inside my brain too

Please, stay home! I'm going to pick your brain Twisted Evil ...

_________________
"There will be no more delay!" (Revelation 10)


Last edited by Z3N on 15 Nov 2010, 10:55; edited 1 time in total
Post 15 Nov 2010, 10:45
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7752
Location: Kraków, Poland
Tomasz Grysztar
ouadji wrote:
Now, the highlighting of "{ ..\{..\\{..\\} ..\}..}" syntax, for macros.
Wink will check this syntax., and will allow to show errors quickly.
This may be very helpful feature to avoid mistakes in macros written in the "nice" fashion (like the ones in standard package) and with no unclosed macro definitions. But still there can be ones where this approach will fail. The following samples are all completely correct.
Code:
macro gather {
 macro gathered { gathered
}

endg fix }

macro gathered {}

gather
 _hello db 'Hello!',0
endg

 _test db 'Test',0

gather
 _world db 'World!',0
endg

gathered    
Code:
macro bizarre closer { macro inner_life { closer }

bizarre nop }

inner_life    
Code:
macro Parent [name]
{
  common macro Child [\name] { \common
  forward name dd ?
  common \forward \name dd ? \}
}

Parent x,y
Child z,t    
Of course you can just ignore such cases - they are not so frequent, really.
Post 15 Nov 2010, 10:54
View user's profile Send private message Visit poster's website Reply with quote
ouadji



Joined: 24 Dec 2008
Posts: 1081
Location: Belgium
ouadji

Quote:
This means that the algorithm is incorrect

my algorithms, incorrect ? Laughing nothing to do with that !

PS: thank you Tomasz. Evil or Very Mad
your are a mother for me ! Wink Razz

One thing at a time ... first, the basic engine,
then the possible special cases.

_________________
I am not young enough to know everything (Oscar Wilde)- Image
Post 15 Nov 2010, 12:09
View user's profile Send private message Send e-mail Reply with quote
Z3N



Joined: 01 Oct 2009
Posts: 17
Z3N
ouadji wrote:

One thing at a time ... first, the basic engine,
then the possible special cases.


Crying or Very sad Crying or Very sad Crying or Very sad

_________________
"There will be no more delay!" (Revelation 10)
Post 15 Nov 2010, 13:09
View user's profile Send private message Reply with quote
ouadji



Joined: 24 Dec 2008
Posts: 1081
Location: Belgium
ouadji

Quote:
But still there can be ones where this approach will fail
let us be positive and constructive! Razz

The Fasm macro language is very powerful,
one can almost do everything with it ... (even things unreadable)

Some special cases (very special cases)
don't lessen the help provided in other 90% of cases ... 99% ?


_________________
I am not young enough to know everything (Oscar Wilde)- Image
Post 15 Nov 2010, 16:30
View user's profile Send private message Send e-mail Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7752
Location: Kraków, Poland
Tomasz Grysztar
ouadji wrote:
Some special cases (very special cases)
don't lessen the help provided in other 90% of cases ... 99% ?
Yes, that's what I wanted to say. These are rare exception in case of the majority of well-written macros keeping track of the nested braces can indeed be helpful.
Post 15 Nov 2010, 17:25
View user's profile Send private message Visit poster's website Reply with quote
ouadji



Joined: 24 Dec 2008
Posts: 1081
Location: Belgium
ouadji

Wink 6.70.

it's not over, Wink there are still many things to do and improve.
but before continuing, I need you to test this Wink 6.70
mistreat it, shake it in all directions !
particularly the highlighting of the macro "struct",
the syntax checking "{.. \ {.. \ \ {...." used in "macro",
the management of "label name", data label like "xx dd ?",
also play with "merge". Check also all this with long lines !
Don't forget the multiline comments,
You can put multiline comments almost anywhere .
If you have any questions, feel free to ask!
above all, give me your feedback and comments.
Thank you all.

ps:
"labels/endl" is not yet solved.
"struc" is not yet solved neither.


EDIT1:
I noticed three problems.
Two oversights on my part and a bug.
All this is already fixed in version 6.71
Code:
A)
--
struct AA
a1 dd ?
ends

jmp .toto.x
.toto AA
.x:   ;highlighted with 6.70 ... it can't ! error. (I forgot that!)

;--------------------------------------------
B)
--
struct AA
xyz  \  ; (word + "\" + ";")  ... (a silly bug, sorry)

;--------------------------------------------
C)
--
struct BB
b1 dd ?
ends

jmp toto..   ;error code:143 (I forgot that too!)
toto. BB
.:

;all this is fixed in Wink 6.71 Smile
    

EDIT2:
I notice that there are many many little things to improve in Wink.
(and big things too Wink ) For now, i'm working on Wink 6.72.
But it's sometimes difficult for me to see all problems.
If, on your side, you notice any abnormal things, please let me know.
thank you.

soon, Wink 6.74, much more faithful in the behavior of "struct" highlighting.
There was a lot of flaws about this. Many errors and unsupported cases.
All this will be corrected with W6.74.
I'll be able to offer a perfect reproduction of the behavior of "struct".
(also a first management of "labels/endl/label" inside "proc")

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


Last edited by ouadji on 03 Dec 2010, 13:51; edited 1 time in total
Post 17 Nov 2010, 21:02
View user's profile Send private message Send e-mail Reply with quote
ouadji



Joined: 24 Dec 2008
Posts: 1081
Location: Belgium
ouadji

just this version to show you the improvements of Wink about 'struct'.
Wink is in progress, and continually improved,
that said, this version 6.74 is fully-functional.

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


Last edited by ouadji on 27 Jan 2011, 17:24; edited 1 time in total
Post 03 Dec 2010, 13:50
View user's profile Send private message Send e-mail Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 2940
Location: vpcmipstrm
bitRAKE
This is a great improvement from previous versions.
Post 04 Dec 2010, 05:35
View user's profile Send private message Visit poster's website Reply with quote
ouadji



Joined: 24 Dec 2008
Posts: 1081
Location: Belgium
ouadji

Thank you bitRAKE,

but there are still a lot small flaws and many things to improve.
Feel free to send me your comments and tell me where Wink does not work.
Of course, there will always be the almost insurmountable wall of the macro language.
In this case, I check the syntax of braces and I report errors, but nothing more yet.
That said, the labels that are declared inside a macro are not saved in the database labels .. for now, in the case of labels inside macros, failing to give a correct information, I prefer not give information.

To be continued ... Wink ... 6.75 in progress.

Image

_________________
I am not young enough to know everything (Oscar Wilde)- Image
Post 04 Dec 2010, 23:07
View user's profile Send private message Send e-mail Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 2940
Location: vpcmipstrm
bitRAKE
I like any feature which displays errors prior to compile. This would be extremely useful to someone back-porting 64-bit code. I'm assuming instructions containing r?? registers would also be flagged. Too bad similar treatment doesn't exist for all processor feature levels: MMX,SSEn,3DNow,AVX -- a growing problem going forward.
Post 16 Dec 2010, 15:45
View user's profile Send private message Visit poster's website Reply with quote
ouadji



Joined: 24 Dec 2008
Posts: 1081
Location: Belgium
ouadji

I waited to see if someone found this feature useful.
I see that "yes", I will explore this idea more in depth.
The mechanism is already in place,
now it's just a matter about information in keywords database.

I noticed that some cases with "struct" are not solved by Wink6.74.
This problem is solved.
Wink 6.75 uses the backtracking, and now solves all cases.

There would be some way to go much further
by using some functions of the compiler itself.
(to solve "macro")
In this case, one should parse and dissect the compiler completely ...
it's my dream ... but ... a mammoth task ! Confused

_________________
I am not young enough to know everything (Oscar Wilde)- Image
Post 16 Dec 2010, 17:20
View user's profile Send private message Send e-mail Reply with quote
edemko



Joined: 18 Jul 2009
Posts: 549
edemko
i'm afraid there will be difficulties with
movme equ mov
any serious patch to fasm and you'll have to re-build much
do you remember "...fasm core is not changeable constantly...", and now we can see lots of files in the root

To my mind sse.inc, i386.inc, mmx.inc, etc.inc would be nice Tomasz.
But as always - i'm not sure.
Post 18 Dec 2010, 01:35
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2, 3 ... 13, 14, 15 ... 19, 20, 21  Next

< 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 YouTube, Twitter.

Website powered by rwasa.