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 |
|
baldr 13 Sep 2010, 22:35
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 |
|||
13 Sep 2010, 22:35 |
|
LocoDelAssembly 13 Sep 2010, 23:08
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] |
|||
13 Sep 2010, 23:08 |
|
Treant 15 Sep 2010, 17:49
Why button wink on/off is active, when i enable/disable it.
Please fix it. |
|||
15 Sep 2010, 17:49 |
|
baldr 15 Sep 2010, 18:31
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". |
|||
15 Sep 2010, 18:31 |
|
ouadji 15 Sep 2010, 20:50
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" |
|||
15 Sep 2010, 20:50 |
|
Treant 16 Sep 2010, 07:10
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. |
|||
16 Sep 2010, 07:10 |
|
ouadji 16 Sep 2010, 09:38
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. |
|||
16 Sep 2010, 09:38 |
|
ouadji 20 Sep 2010, 07:43
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. Last edited by ouadji on 27 Jan 2011, 17:25; edited 1 time in total |
|||
20 Sep 2010, 07:43 |
|
bitRAKE 23 Sep 2010, 05:02
I have fixed the default color selection problem.
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 ...thanks for the update, ouadji. Some words not highlighted:
|
|||
23 Sep 2010, 05:02 |
|
ouadji 23 Sep 2010, 07:43
Quote:
Quote:
Wink is 100% 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. |
|||
23 Sep 2010, 07:43 |
|
revolution 23 Sep 2010, 08:40
ouadji wrote:
ouadji wrote: Fasm Tables are absolutely not formatted as I need it. |
|||
23 Sep 2010, 08:40 |
|
ouadji 23 Sep 2010, 09:36
Quote:
Quote:
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. |
|||
23 Sep 2010, 09:36 |
|
revolution 23 Sep 2010, 10:20
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. |
|||
23 Sep 2010, 10:20 |
|
edfed 23 Sep 2010, 10:52
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' |
|||
23 Sep 2010, 10:52 |
|
revolution 23 Sep 2010, 13:10
edfed wrote: are you trying to make a modular assembler? something able to compile far any CPU, assuming you load the corresponding opcode tables? 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. |
|||
23 Sep 2010, 13:10 |
|
ouadji 23 Sep 2010, 13:39
Quote:
(and insofar as Tomasz doesn't change his table formats in the future.) Last edited by ouadji on 27 Jan 2011, 17:25; edited 1 time in total |
|||
23 Sep 2010, 13:39 |
|
bitRAKE 24 Sep 2010, 00:44
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. 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)/¯ “languages are not safe - uses can be” Bjarne Stroustrup |
|||
24 Sep 2010, 00:44 |
|
ouadji 24 Sep 2010, 01:51
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 |
|||
24 Sep 2010, 01:51 |
|
revolution 24 Sep 2010, 01:54
Why is ch different from cx?
|
|||
24 Sep 2010, 01:54 |
|
Goto page Previous 1, 2, 3 ... 11, 12, 13 ... 19, 20, 21 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.