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 ... 12, 13, 14 ... 19, 20, 21  Next
Author
Thread Post new topic Reply to topic
ouadji



Joined: 24 Dec 2008
Posts: 1081
Location: Belgium
ouadji 24 Sep 2010, 02:29

The code "20h" (bit n° 5) allows the presence in an addressing mode.
but there is an error here ... cx is not allowed in an addressing mode. I'll fix that.

like this with bh and bx ,

Code:
;------------------------------------------------ b
words_b:
db \
02,'bh'                                  ,7,0,\
02,'bl'                                    ,7,0,\
04,'byte'                          ,9,0,\
05,'break'                         ,9,0

db \
06,'bitmap'                              ,9,80h,\
06,'binary'                              ,9,40h,\
02,'bp'                                  ,7,20h,\
02,'bx'                                  ,7,20h

mov ax,[bx + toto] ; allowed
mov ax,[bh + toto] ; not allowed

05,'dword'                              ,9,20h

mov eax,dword[...

dito for short, near, all registers ...
all words allowed inside a addressing mode. 

    

_________________
I am not young enough to know everything (Oscar Wilde)- Image
Post 24 Sep 2010, 02:29
View user's profile Send private message Send e-mail Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20303
Location: In your JS exploiting you and your system
revolution 24 Sep 2010, 02:32
fasm does have an "address_registers" table.

Is there something in your table that the fasm tables do not provide?
Post 24 Sep 2010, 02:32
View user's profile Send private message Visit poster's website Reply with quote
ouadji



Joined: 24 Dec 2008
Posts: 1081
Location: Belgium
ouadji 24 Sep 2010, 02:44
yes.
code "80h" ... case sensitive words

87h ... "7h" == jmp opcode ... jmp,loop,je,jc,call ....

"proc" == 81h (case sensitive 80h + proc 01h)
"endp" == 82h (case sensitive 80h + endp 02h)

there are other codes ... "db 06,'export' ,9,(80h+40h)"
and others will be added.

edit :
and most important of all,the code color ...
fasm tables do not provide this code color.


PS: back to bed, 04.55 here Smile

_________________
I am not young enough to know everything (Oscar Wilde)- Image
Post 24 Sep 2010, 02:44
View user's profile Send private message Send e-mail Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20303
Location: In your JS exploiting you and your system
revolution 24 Sep 2010, 03:00
Colour is inferred by which table the keyword comes from. That is easily solved.

Case sensitive words will be macros. You will always have to add those manually since they are not part of the assembler syntax. You can just have your own small table that holds the common macro names and insert it in to the master table the same way the fasm tables are inserted.

The jump and call mnemonics is something that I can't see how to solve without a special case setting.

However, there are far fewer special case things than normal case things. Usually I would tell my staff that since the normal cases far outweigh the special cases that they must make it generic and add in the easier to handle special cases manually. Overall project management becomes a lot simpler and bugs are reduced. Of course you are not my staff so I can't tell you what to do, but I think it should be something to consider. The way you do it now whenever Intel or AMD introduce some new instructions, or Tomasz introduces a new directive or operator, you will have to go back into your code and add in everything manually, and thus duplicating the work that has already gone into fasm.

Anyhow, it is up to you. If you find it too burdensome to do then just carry on with how you do it now. I hope you don't have too many more bugs in your tables.
Post 24 Sep 2010, 03:00
View user's profile Send private message Visit poster's website Reply with quote
ouadji



Joined: 24 Dec 2008
Posts: 1081
Location: Belgium
ouadji 24 Sep 2010, 09:08
Quote:

Colour is inferred by which table the keyword comes from. That is easily solved.
sorry, but i'm not agree with you. (it would be too easy.)

"dword" and "xmm10"
these two words have different color.

Code:
symbols_5:
 db 'dword',11h,4
 db 'elf64',18h,58h
 db 'fword',11h,6
 db 'large',1Bh,82h
 db 'pword',11h,6
 db 'qword',11h,8
 db 'short',12h,1
 db 'tbyte',11h,0Ah
 db 'tword',11h,0Ah
 db 'use16',13h,16
 db 'use32',13h,32
 db 'use64',13h,64
 db 'xmm10',10h,0CAh
.....
    
Code:
instructions_2:
 db 'bt',4
 dw bt_instruction-instruction_handler
 db 'if',0
 dw if_directive-instruction_handler
.....

"bt" and "if" have not the same color. <------------------------------

    
Code:
instructions_3:
.....
 db 'org',0
 dw org_directive-instruction_handler
 db 'out',0
 dw out_instruction-instruction_handler
.....

"org" and "out" have not the same color. <------------------------------

    
Code:
instructions_4:
.....
 db 'else',0
 dw else_directive-instruction_handler
 db 'emms',77h
 dw simple_extended_instruction-instruction_handler
.....

"else" and "emms" have not the same color. <--------------------------
 
instructions_5:
.....
db 'break',0
 dw break_directive-instruction_handler
 db 'bswap',0
 dw bswap_instruction-instruction_handler
.....
"break" and "bswap", not the same color. <------------------------

instructions_7:
.....
db 'cmpxchg',0B0h
 dw basic_486_instruction-instruction_handler
 db 'display',0
 dw display_directive-instruction_handler
.....

"cmpxchg" and "display" .... dito.

    


I stop here, but there are many cases.
Tomasz classifies words in order of length without worrying about anything else.
It is unusable to me.


_________________
I am not young enough to know everything (Oscar Wilde)- Image
Post 24 Sep 2010, 09:08
View user's profile Send private message Send e-mail Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20303
Location: In your JS exploiting you and your system
revolution 24 Sep 2010, 09:52
ouadji: There is other details in the symbols table besides the keyword. And directives and instructions are in separate parts of the source and can easily be split by address comparison.

All those problems can be solved, but you just have to be willing, that is all. And if you are not willing then that is okay, no big deal, I was just trying to help you to reduce bugs.
Post 24 Sep 2010, 09:52
View user's profile Send private message Visit poster's website Reply with quote
ouadji



Joined: 24 Dec 2008
Posts: 1081
Location: Belgium
ouadji 24 Sep 2010, 10:57

What bothers me with this way of using fasm tables, it's to be completely "linked" to the fasm tables,
and to lose the ability to give to a word a particular function.
Wink is evolving, and this approach bothers me a bit..
I don't want curb (to restrict ?) Wink by making it totally dependent of fasm tables.
This way totally strangles the future possibilities of Wink.
that said, thank you revolution for your help and advice.
(sorry for my english)

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



Joined: 24 Dec 2008
Posts: 1081
Location: Belgium
ouadji 24 Sep 2010, 14:23
after much thought ... Very Happy
I'll look more closely to this problem.

Use a generic code for all words and, with a personal table,
keep the ability to assign to each word particular codes.

Why not ! I can't find that very useful (sorry),
but it can nevertheless be great fun to implement this approach.

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



Joined: 21 Jul 2003
Posts: 4024
Location: vpcmpistri
bitRAKE 24 Sep 2010, 14:29
FASM gives ablity to word. Rolling Eyes

Everything else is defined by user, and can be different for every program written in FASM! Please, try this other perspective. FASM is the foundation - must be linked directly, imho. Then additional (dynamic) tables for user source code defined items.

You restrict Wink by forcing Window API -centric usage of FASM. Which is partially understandable since Wink is on Windows, but is not a general solution. Being dependent on FASM tables is not a restriction -- it is a requirement for FASM syntax!

Why would there be a need to alter function of word contrary to FASM tables? Of course, FASM allows it to be done by user. Wink has no way to detect it has been done by user. For example, if I overload EXTRN. Within the macro EXTRN has one meaning (defined by FASM). Outside of the macro EXTRN has another meaning (defined by user). The macro is case-sensitive whereas the directive is not! Ideally, editor would color each accordingly -- one could hardly expect this level of integration.

Even if Wink is to be only a Windows tool for Windows programmers it should start with FASM tables and augment that data with exceptions. Excuse me, but I was under the impression Wink was to support FASM syntax.

_________________
¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup
Post 24 Sep 2010, 14:29
View user's profile Send private message Visit poster's website Reply with quote
ouadji



Joined: 24 Dec 2008
Posts: 1081
Location: Belgium
ouadji 24 Sep 2010, 14:54

Obviously that Wink is based on fasm tables,
and supports FASM syntax (it's my turn --> Rolling Eyes ) Wink accepts all the fasm words.
(but not automatically, only "manually" until now. with file key_W.wink)
Quote:

Why would there be a need to alter function of word contrary to FASM tables?

Because some words are highlighted or not depending on the text that surrounds them,
depending syntax around them, depending the previous word ...

edit:
this is not really a function code, but rather a syntactic behavior code. (comportment code ?)
Quote:

The macro is case-sensitive whereas the directive is not!
Ideally, editor would color each accordingly -- one could hardly expect this level of integration.

Wink is not a compiler colorful!

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



Joined: 25 Jun 2010
Posts: 14
render 29 Sep 2010, 17:31
hi, how can I use comment //
example:

// this code it's.....
xor eax,eax //coments

give me psl macroexample.
Post 29 Sep 2010, 17:31
View user's profile Send private message Reply with quote
ouadji



Joined: 24 Dec 2008
Posts: 1081
Location: Belgium
ouadji 29 Sep 2010, 19:26

please, "copy/paste" these few examples in wink(6.57)


Code:
;this does compile ! 3 passes, 26 bytes

include/*
comment
*/'win32a.inc'

/*comment*/mov/*comment*/eax,/*comment*/eax/*comment*/
mov eax,/*

comment

*/my_proc.varo

/*comment*/mov eax,my_proc

/*
  /*
mov eax,ebx /*nested comment*/
  */
*/
     /*1 /*2 /*3 /*4 */3 */2 */1 */;0

proc/*comment*/\/*comment*/
/*
comment
*/
   my_proc/*

   var1/var2

       */var1:dword/*comment*/ , var2:dword

/*comment*/.varo  /*
                  */: mov eax,[var1]

endp
    

_________________
I am not young enough to know everything (Oscar Wilde)- Image
Post 29 Sep 2010, 19:26
View user's profile Send private message Send e-mail Reply with quote
ouadji



Joined: 24 Dec 2008
Posts: 1081
Location: Belgium
ouadji 07 Oct 2010, 23:14

small preview of upcoming features of next Wink.
Here, the management of "struct" ("macro" will also be managed)


(of course, fully compatible with back-slash, long lines, multilines comments ...f5 twister ...)

Image
Quote:

from bitRAKE:

For example, if I overload EXTRN. Within the macro EXTRN has one meaning (defined by FASM). Outside of the macro EXTRN has another meaning (defined by user). The macro is case-sensitive whereas the directive is not !
Ideally, editor would color each accordingly.
one could hardly expect this level of integration.
this case will be fully managed by next wink
(customized feature for BitRAKE Wink ) (hard code to do that Confused )

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


Last edited by ouadji on 08 Oct 2010, 10:51; edited 1 time in total
Post 07 Oct 2010, 23:14
View user's profile Send private message Send e-mail Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 4024
Location: vpcmpistri
bitRAKE 08 Oct 2010, 03:24
ouadji wrote:
bitRAKE wrote:
For example, if I overload EXTRN. Within the macro EXTRN has one meaning (defined by FASM). Outside of the macro EXTRN has another meaning (defined by user). The macro is case-sensitive whereas the directive is not !
Ideally, editor would color each accordingly.
one could hardly expect this level of integration.
this case will be fully managed by next wink
(customized feature for BitRAKE Wink ) (hard code to do that Confused )
Oh, I don't believe it.
Seeing it will certainly be a pleasant surprise.

Will STRUC also respond similar to STRUCT macro - with dot labeling support?

_________________
¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup
Post 08 Oct 2010, 03:24
View user's profile Send private message Visit poster's website Reply with quote
ouadji



Joined: 24 Dec 2008
Posts: 1081
Location: Belgium
ouadji 08 Oct 2010, 09:47

yes, why not (I think it is also possible to do that).
But I never use "struc" and i don't quite understand the differences between "struct" and "struc".
What can be done with "struc" that it's not possible with "struct" (and vice versa).
the explanations (in the fasm doc) are minimal about this,
it's not enough to really understand the difference.
Otherwise, yes, everything is possible.

edit:


another problem ...
I don't have enough colors to highlight all cases
(colors between which we can really see a difference, like red, blue, green, orange ...).
"Fasmw" does not support the text in bold, nor the underlined text.
i'm crazy about assembly language, but not about api windows.
("CreateFontIndirect" is not my thing !)
the use of "api_windows" isn't really "assembly language",
but only "black_box_IN_OUT". I hate that !
Confused

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


Last edited by ouadji on 08 Oct 2010, 10:30; edited 1 time in total
Post 08 Oct 2010, 09:47
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 08 Oct 2010, 10:24
ouadji wrote:
What can be done with "struc" that it's not possible with "struct" (and vice versa).
"struct" is defined to provide more standard syntax for structures, easier to define, though less powerful than general "struc". And "struct" uses "struc" internally - only "struc" is the real fasm syntax, "struct" is just a macro.
Post 08 Oct 2010, 10:24
View user's profile Send private message Visit poster's website Reply with quote
ouadji



Joined: 24 Dec 2008
Posts: 1081
Location: Belgium
ouadji 08 Oct 2010, 10:45

" 'struct' is just a macro, 'struct' uses 'struc' internally "
yes, i know that. (thank you Tomasz)

I'm going to look more closely at the "struc" directive.
That said ... there is not enough explanation about "struc" in fasm doc.

heuuu ... like me Tomasz ?
in front of screen 15hours / day Razz
mee too ... have a good day Tomasz. Wink

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



Joined: 21 Jul 2003
Posts: 4024
Location: vpcmpistri
bitRAKE 09 Oct 2010, 05:03
STRUC is really MACRO-like. If you understand MACRO then there are only a couple of other things to add. STRUCs have a 'hidden' parameter - the first token on the line becomes "." (a period) within the STRUC.
Code:
struc Temp {
  .: ; a label is created with the STRUC name
}    
When we do something like "my Temp" FASM creates a label "my:" because the "." gets replaced.

STRUCs only work as the second token on a line. "Temp my" would not invoke the STRUC macro -- it must be the second token. Whereas true MACROs must be the first token to invoke them.
Post 09 Oct 2010, 05:03
View user's profile Send private message Visit poster's website Reply with quote
Coty



Joined: 17 May 2010
Posts: 553
Location: &#9216;
Coty 03 Nov 2010, 23:19
I like wink Very Happy However, I am getting error code 706 when I set windows to automatically open ASM files with it, the IDE starts... But with no wink Sad

I'm using windows XP if it matters any...


Description: Wink error
Filesize: 1008 Bytes
Viewed: 7803 Time(s)

wink.PNG



_________________
http://codercat.org/
Post 03 Nov 2010, 23:19
View user's profile Send private message Send e-mail Visit poster's website Reply with quote
ouadji



Joined: 24 Dec 2008
Posts: 1081
Location: Belgium
ouadji 04 Nov 2010, 00:54

706 (wink 6.57)
Quote:
I like wink
thank you Coty

706 : the file "key_W.wink" does not open !

this file must be in the same directory as wink.
This seems to be a problem with this automatic feature of Windows.
"I think" this is not a problem with Wink.
amazing! Someone has may be an idea?
I am not an expert about windows features

wink 7.0 is in progress,
much more powerful than Wink 6.57.
Code:
      invoke  CreateFile,\
 FileTitle,GENERIC_READ,0,0,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,0 
 mov     ebx,' 706'
        cmp     eax,-1
      je      .RKF_crash
      ....

 FileTitle db 'key_W.wink',0
    
edit:

I think it's a directory problem
it seems that Windows opens Wink,
but without being in the Wink directory ...
then Wink can't find his keywords file.
Maybe do a preliminary search of the keywords file directory!
I'll think about that! (GetFullPathName ??)

_________________
I am not young enough to know everything (Oscar Wilde)- Image
Post 04 Nov 2010, 00:54
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:  
Goto page Previous  1, 2, 3 ... 12, 13, 14 ... 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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.