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



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

fixed.

this version "6.55" is built with fasmw 1.69.21.
I'm working to develop Wink 6.6 (lookup with FNV-1a hash algorythm)
Wink 6.5x is already obsolete for me.
Wink 6.6 will be built with the last IDE/Core (currently 1.69.23/0.95.02)

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


Last edited by ouadji on 27 Jan 2011, 17:25; edited 2 times in total
Post 13 Sep 2010, 19:28
View user's profile Send private message Send e-mail Reply with quote
baldr



Joined: 19 Mar 2008
Posts: 1651
baldr
edemko,

Your pushrl macro can be modified to accept syntax similar to original push (i.e. space-separated; with commas it looks like multiple operands for single push):
Code:
macro pushr values* { irps value, values \{ reverse push value \} }
pushr eax ecx edx ebx esp ebp esi edi    
Post 13 Sep 2010, 22:35
View user's profile Send private message Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
baldr,

But still, edemko's way will work in situations like this:
Code:
pushrl 3+4+5 32+435+2    


It would be interesting to see whether fasm's built-in way could be accurately replicated with macros or not (besides using some sort of disassembler code to search for the PUSHes and reverse* them at assembly time)

*In the case of use64 environment also some sort of assembler code would be needed to fix RIP-relative addressing.

[edit]Well, the reversing method I've said above would miserably fail with relocations, so perfect emulation of the parser seems to be the way to go.[/edit]
Post 13 Sep 2010, 23:08
View user's profile Send private message Reply with quote
Treant



Joined: 09 Oct 2009
Posts: 16
Location: Russia
Treant
Why button wink on/off is active, when i enable/disable it.
Please fix it.
Post 15 Sep 2010, 17:49
View user's profile Send private message Reply with quote
baldr



Joined: 19 Mar 2008
Posts: 1651
baldr
LocoDelAssembly,

I think it's impossible. After tokenizing «1 -1» and «1-1» are indistinguishable. Some kind of "zero-width non-joiner" can help, to indicate that "there was 0x20". Wink
Post 15 Sep 2010, 18:31
View user's profile Send private message Reply with quote
ouadji



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

I don't understand where is the problem,
please give me more details.

Options/Appearance/

a) "Wink off" ---> "Wink is OFF" / "Pause"
b) "Wink on" ---> "Wink is ON" / "Ready" or "Full Scan"


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



Joined: 09 Oct 2009
Posts: 16
Location: Russia
Treant
When i click on "wink off" Appearance window close
But when i again open it i can click on wink off button.
Wink now disabled, but i can disable t more.
active or inactive button can indicate enable or disable wink.
Post 16 Sep 2010, 07:10
View user's profile Send private message Reply with quote
ouadji



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

A closed door can not be closed again?
it's a problem like this ?
the "Wink off" button must be disable when Wink is off ? (and ditto for "wink on" button)
yes, you're right, but it's a small detail (cosmetic ?) compared to the algorithms on which I'm working for now ....
that said, ok, i'm agree, I'll look at that too.

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



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

Wink 6.57 uses now the FNV-1a hash algorythm.(for lookup keywords)
Searching labels with the same way is more complex.
The computing overload to update the hash tables in real time is important.

Wink 6.57 offers an experimental merge feature.
This feature allows you to merge the databases labels of multiple files (file.asm + file(s).inc ?).
I don't know if that interests you ... try it.
As usual, feedbacks and comments are well come.

about "merge"..
The first opened file is at the bottom,
the last opened file is at the top.
like this,

a) File/Open/toto.asm
b) File/Open/toto_a.inc
c) File/Open/toto_b.inc

d) Options/Appearance/Merge on

Code:
;toto_b.inc

in_toto_b  : nop
             ret

;toto_a.inc

in_toto_a  : call in_toto_b
        ret

;toto.asm

call in_toto_a

    

You can close or open other files,
but remember this rule, the first at the bottom, the last at the top.

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


Last edited by ouadji on 27 Jan 2011, 17:25; edited 1 time in total
Post 20 Sep 2010, 07:43
View user's profile Send private message Send e-mail Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 3043
Location: vpcmipstrm
bitRAKE
I have fixed the default color selection problem. Very Happy
Code:
; Convert .vssettings highlighting colors to FASMW.INI [Colors] block.
; To browse schemes try:  http://studiostyles.info/
;
;
; Parameters:
;------------
        ; Source INI template for all other settings:
        __INI__ fix 'fasmw_657.INI'
        ; Source file to grab color scheme from:
        __VSS__ fix 'jellybeans.vssettings'



format binary as "ini"

virtual
  INI:
    file __INI__
    .length = $ - $$

    ; determine length of pre-[Colors] bytes
    .pre = 0
    repeat $ - $$
      load q qword from $$ + % - 1
      if q = '[Colors]'
        .pre = % - 1
        break
      end if
    end repeat

    ; determine start of post-[Colors] bytes (i.e. next section start)
    .post = .length
    repeat $ - $$ - .pre - 1
      load b byte from $$ + .pre + %
      if b = '['
        .post = .pre + %
        break
      end if
    end repeat
end virtual



macro ASCII_dwHex [val,istr] {
  local a,b,q
  a = $1'0000'0000 ; to capture dword underflow
  load q qword from istr
  repeat 8 ; ...0-9...A-F...a-f...
    b = q and $FF
    q = q shr 8
    if b < ':'
      if b > '/'
        b = b - '0'
      else
        break
      end if
    else if b < 'G'
      if b > '@'
        b = b - 'A' + 10
      else
        break
      end if
    else if b < 'g'
      if b > '`'
        b = b - 'a' + 10
      else
        break
      end if
    else
      break
    end if
    a = (a shl 4) + b
  end repeat
  q = (a shl 32) and 1
  if q
    display "ASCII Hexadecimal Error: no digits",13,10
    err
  end if
  val = a and $FFFF'FFFF
}

macro DB2dec val {
  local a0,a1,a2
  a0 = (val) mod 10
  a1 = ((val) / 10) mod 10
  a2 = ((val) / 100) mod 10
  if a2 > 0
    db a2+'0',a1+'0'
  else if a1 > 0
    db a1+'0'
  end if
  db a0+'0'
}
macro DW2RGB val {
  DB2dec (val) and $FF
  db ","
  DB2dec ((val)shr 8) and $FF
  db ","
  DB2dec ((val)shr 16) and $FF
}



; Query: How to get string length at preprocessor level?
; Query: How to break constant string at preprocessor level?
macro GetColor [color*,iName*,Name*,ground*] {
  local ..color

  ; byte array in str# constants: assemble-time context
  virtual
    db ' Name="',Name,'" '
    rept 9+iName i:0 \{ load str\#i byte from $$+i \}
  end virtual

  ; does position % match {str#} bytes
  sOffset = 0
  repeat $ - iOffset
    rept 9+iName i:0 \{
      load b byte from iOffset + 8 + % + i
      if b = str\#i
    \}
        sOffset = iOffset + 10 + iName + % - 2
        break
    rept 9+iName \{
      end if
    \}
  end repeat
  if sOffset = 0
    display 'ERROR: Name="',`Name,'" not found in ',__VSS__,".",13,10
    err
  end if

  ; scan to find `ground string
  virtual ; ' Foreground="0x' or ' Background="0x'
    db ' ',ground,'ground="0x',0
    load q0 qword from $$
    load q1 qword from $$+8
  end virtual

  repeat $ - sOffset
    load q qword from sOffset + %
    if q = q0
      load q qword from sOffset + % + 8
      ; match 15 bytes only
      q = q and $FF'FFFF'FFFF'FFFF
      if q = q1
        ; convert ASCII hexadecimal to integer value
        ASCII_dwHex ..color, sOffset + % + 15
        break
      end if
    end if
  end repeat

  match 'Text',color \{ DEFAULT__FOREGROUND = ..color \}
  match 'Background',color \{ DEFAULT__BACKGROUND = ..color \}

  if ..color = 0x02000000 ; (default color)
    if ground = 'Fore'
      ..color = DEFAULT__FOREGROUND
    else if ground = 'Back'
      ..color = DEFAULT__BACKGROUND
    end if
  end if

  macro COLORS \{
    COLORS
    db color,"="
    DW2RGB ..color
    db 13,10
  \}
}



virtual
  file __VSS__
  iOffset = $$ ; items starting position in __VSS__

  Fore fix 'Fore'
  Back fix 'Back'

  ; Create color macro array:
  macro COLORS {db "[Colors]",13,10} ; depth terminal
  GetColor \
  \;{INI COLOR NAME},       {SIZE},{VSS ITEM},            {COLOR}
    'Text',                10,'Plain Text',                Fore,\
    'Background',          10,'Plain Text',                Back,\
    'SelectionText',       13,'Selected Text',             Fore,\
    'SelectionBackground', 13,'Selected Text',             Back,\
    'Symbols',              8,'Operator',                  Fore,\
    'Numbers',              6,'Number',                    Fore,\
    'Strings',              6,'String',                    Fore,\
    'Comments',             7,'Comment',                   Fore,\
    'ActiveLine_color',    22,'Inactive Selected Text',    Back,\
    'IDEL_color',          12,'Syntax Error',              Fore,\
    'Registers_color',     20,'Preprocessor Keyword',      Fore,\
    'Instructions_color',   7,'Keyword',                   Fore,\
    'Directives_color',    14,'Compiler Error',            Fore,\
    'Nestings_color',      26,'Brace Matching (Rectangle)',Back,\
    'Labels_color',        10,'User Types',                Fore
end virtual



;=============================
; Finally, Build new INI file:
;-----------------------------
        file __INI__ : 0 , INI.pre
        COLORS       ; output [Colors]
        file __INI__ : INI.post , INI.length - INI.post    
...maybe not the best choice of color class from VSS file, but user may change those at will.

...thanks for the update, ouadji.

Some words not highlighted:
  • file
  • load/save
  • from/to
  • break
It doesn't appear the FASM tables are being used?
Post 23 Sep 2010, 05:02
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:

- file
- load/save
- from/to
- break
Are these words case-sensitive or not ?
Quote:

It doesn't appear the FASM tables are being used?
no, indeed! Fasm Tables are absolutely not formatted as I need it.
Wink is 100% Wink Wink

Code:
; Convert .vssettings highlighting colors to FASMW.INI [Colors] block.
; To browse schemes try:  http://studiostyles.info/ 
    

There is nothing to include in wink, everyone can use it if he wishes (?)
sorry bitRAKE, my English is not very good, I don't understand your request about this.

_________________
I am not young enough to know everything (Oscar Wilde)- Image
Post 23 Sep 2010, 07:43
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: 17662
Location: In your JS exploiting you and your system
revolution
ouadji wrote:
Quote:

- file
- load/save
- from/to
- break
Are these words case-sensitive or not ?
Not.
ouadji wrote:
Fasm Tables are absolutely not formatted as I need it.
You could do some conversion at startup to copy and convert the tables into whatever format you need. That way you don't have to keep updating them manually.
Post 23 Sep 2010, 08:40
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:

- file
- load/save
- from/to
- break

NOT case-sensitive

ok, i will fix that, and add these 4 words.
Quote:

You could do some conversion at startup to copy and convert the tables into whatever format you need.
That way you don't have to keep updating them manually.

Yes, I agree, i already thought of that, but it would not be a "simple" conversion.
It would be a small full-fledged program. Tomasz works with a ranking depending on the length
(+ the format is different depending on the table. Symbols, directives, instructions, have different table formats)
Wink works with a alphabetical ranking, and same format for all words.
Yes, of course it would be possible, but it would be a relatively complex code ...
compared to the little time that i need to do that manually.

_________________
I am not young enough to know everything (Oscar Wilde)- Image
Post 23 Sep 2010, 09:36
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: 17662
Location: In your JS exploiting you and your system
revolution
ouadji: But you only need to do it once and then it is done forever. All future fasm updates/additions/extensions could automatically be included into Wink.

Note that "save" is not a directive. Try "store" instead.
Post 23 Sep 2010, 10:20
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4242
Location: 2018
edfed
are you trying to make a modular assembler? something able to compile far any CPU, assuming you load the corresponding opcode tables?

it will bring problems for big endian, 12bits codes, etc. but will be cool if it works.

modular assembler... modler?

i propose one simple algo for the opcode table loading:
Code:
opcodes 68K ;68K --> N
....
if no opcodes, then, load 'X86.opt'
else, load 'N.opt'
    
Post 23 Sep 2010, 10:52
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17662
Location: In your JS exploiting you and your system
revolution
edfed wrote:
are you trying to make a modular assembler? something able to compile far any CPU, assuming you load the corresponding opcode tables?
I think you are talking about table based assemblers. They have been made in the past but they are mostly terrible and inflexible.

For ouadji, using the existing fasm tables means that new opcodes, directives, registers, operators etc. can all be automatically accommodated by just reassembling with the latest fasm source.
Post 23 Sep 2010, 13: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
Quote:

For ouadji, using the existing fasm tables means that new opcodes, directives, registers, operators etc. can all be automatically accommodated by just reassembling with the latest fasm source.
I'll think about it ... but this doesn't turn me on.
(and insofar as Tomasz doesn't change his table formats in the future.)

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


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



Joined: 21 Jul 2003
Posts: 3043
Location: vpcmipstrm
bitRAKE
ouadji wrote:
There is nothing to include in wink, everyone can use it if he wishes (?) sorry bitRAKE, my English is not very good, I don't understand your request about this.
I've provided the VSS to [Colors] conversion source code as thanks for Wink, and to assist others with rapid changes to Wink color scheme. There is no request regarding this except to please forward suggestions/changes.

Thank you for the additions. I'm hoping for better integration with FASM in the future. Tomasz provides code to access each table, so the multiple formats should not be a great issue. Let me know if I can help.

_________________
¯\(°_o)/¯ unlicense.org
Post 24 Sep 2010, 00:44
View user's profile Send private message Visit poster's website Reply with quote
ouadji



Joined: 24 Dec 2008
Posts: 1081
Location: Belgium
ouadji
In my keywords database (opcodes, directives, registers, operators ...),
each keyword is followed by two codes (two bytes).
A byte for the color, a second byte for the word_function .
This last byte (the byte of word_function) contains several information.
the use of fasm tables would be useless to me. Why ?
because it would in any way needed to have a keywords database (manually encoded), to give me these two codes.

Code:
;------------------------------------------------ c
;Wink format

words_c:
db \
02,'ch'                      ,7,0,\
02,'cl'                    ,7,0,\
06,'common'                ,9,0,\
\
05,'ccall'           ,9,87h,\
07,'cinvoke'             ,9,87h,\
06,'cursor'              ,9,80h,\
07,'comcall'             ,9,80h,\
07,'cominvk'             ,9,80h,\
04,'code'                ,9,40h,\
04,'coff'                ,9,40h,\
07,'console'             ,9,40h,\
\
02,'cx'                    ,7,20h,\
02,'cs'                  ,7,20h

...
.....

dd 0
;------------------------------------------------ d
    

_________________
I am not young enough to know everything (Oscar Wilde)- Image
Post 24 Sep 2010, 01:51
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: 17662
Location: In your JS exploiting you and your system
revolution
Why is ch different from cx?
Post 24 Sep 2010, 01:54
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:  
Goto page Previous  1, 2, 3 ... 11, 12, 13 ... 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 GitHub, YouTube, Twitter.

Website powered by rwasa.