flat assembler
Message board for the users of flat assembler.
Index
> IDE Development > flat editor 3.11 Goto page Previous 1, 2 |
Author |
|
r88 04 May 2016, 03:28
Update for fasmw source, VERSION 0.95.11 (fasm 1.71.06). Add toolbar and tooltips. I 'm using other IDE and this code is for learning.
last changes ; mov [tbab.hInst], NULL ; mov [tbab.nID], 0 ;hTbBmp ; invoke ImageList_GetImageCount, [hImageList] ; here =0 or ... ; mov ecx, eax ; invoke SendMessage,[hToolBar],TB_ADDBITMAP,ecx, tbab section '.rsrc' resource data readable directory RT_MENU,menus,\ ;... RT_MANIFEST, _manifest ;... resource _manifest,1,LANG_NEUTRAL,manifest resdata manifest file 'RESOURCE\manifest.txt' ;db '<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <dependency> <dependentAssembly> <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="X86" publicKeyToken="6595b64144ccf1df" language="*"/> </dependentAssembly> </dependency> </assembly>' endres he he
|
|||||||||||
04 May 2016, 03:28 |
|
Tomasz Grysztar 04 Sep 2016, 16:41
poby1 wrote: Now about that syntax coloring, any idea when this might be added? Is this project still active? |
|||
04 Sep 2016, 16:41 |
|
poby1 06 Sep 2016, 20:54
Tomasz Grysztar wrote:
I'm using flat assembler 1.71.54, flat editor 3.12, interface 0.98.03 I'm not seeing much syntax highlighting. Instructions, labels, registers etc are all the same color. How can this be fixed so it looks more like other editors that colorise to differentiate between different things? |
|||
06 Sep 2016, 20:54 |
|
Tomasz Grysztar 07 Sep 2016, 13:06
The fasm's tables and core functions are all at hand there, so you could perhaps quickly patch-up a variant of "fasm_syntax" function in fasmw that would color instructions and other symbols from these tables:
Code: proc fasm_syntax lpLine,uChars,lpColors push ebx esi edi mov esi,[lpLine] mov edi,[lpColors] mov ebx,characters mov ecx,[uChars] xor edx,edx .scan_syntax: lodsb .check_character: cmp al,20h je .syntax_space cmp al,3Bh je .syntax_comment mov ah,al xlatb or al,al jz .syntax_symbol or edx,edx jnz .syntax_neutral cmp ah,27h je .syntax_string cmp ah,22h je .syntax_string cmp ah,24h je .syntax_pascal_hex cmp ah,39h ja .syntax_neutral cmp ah,30h jae .syntax_number .syntax_neutral: inc edx inc edi loop .scan_syntax jmp .done .syntax_space: call .recognize_name inc edi loop .scan_syntax jmp .done .syntax_symbol: call .recognize_name mov al,1 stosb loop .scan_syntax jmp .done .recognize_name: or edx,edx jz .unrecognized_name pusha dec esi sub esi,edx mov ecx,edx call get_instruction jnc .recognized_instruction call get_data_directive jnc .recognized_instruction mov edi,preprocessor_directives call get_directive jnc .recognized_instruction call get_symbol jnc .recognized_symbol popa xor edx,edx .unrecognized_name: retn .recognized_instruction: popa xchg ecx,edx sub edi,ecx mov al,1 rep stosb xchg ecx,edx retn .recognized_symbol: popa xchg ecx,edx sub edi,ecx mov al,2 rep stosb xchg ecx,edx retn .syntax_pascal_hex: cmp ecx,1 je .syntax_neutral mov al,[esi] mov ah,al xlatb or al,al jz .syntax_neutral cmp ah,24h jne .syntax_number cmp ecx,2 je .syntax_neutral mov al,[esi+1] xlatb or al,al jz .syntax_neutral .syntax_number: mov al,2 stosb loop .number_character jmp .done .number_character: lodsb mov ah,al xlatb xchg al,ah or ah,ah jz .check_character cmp al,20h je .check_character cmp al,3Bh je .check_character mov al,2 stosb loop .number_character jmp .done .syntax_string: mov al,3 stosb dec ecx jz .done lodsb cmp al,ah jne .syntax_string mov al,3 stosb dec ecx jz .done lodsb cmp al,ah je .syntax_string xor edx,edx jmp .check_character .process_comment: lodsb cmp al,20h jne .syntax_comment inc edi loop .process_comment jmp .done .syntax_comment: mov al,4 stosb loop .process_comment .done: pop edi esi ebx ret endp But in fasm many features are defined in form of additional macros, various symbols may get re-defined, etc. For this reason I never tried to include such feature in the basic IDE, leaving it to implement by more complex ones, like Fresh (it used to be based on the same editor core as fasmw, but then it moved to use its own one). |
|||
07 Sep 2016, 13:06 |
|
JohnFound 07 Sep 2016, 15:51
Tomasz Grysztar wrote: (it used to be based on the same editor core as fasmw, but then it moved to use its own one). No, it is still based on FASMW editor, but the old version. I am slowly working on a new editor, but it is not based on Win API and can not be used in the current version 2.x of Fresh. It is prepared for the next 3.x series. _________________ Tox ID: 48C0321ADDB2FE5F644BB5E3D58B0D58C35E5BCBC81D7CD333633FEDF1047914A534256478D9 |
|||
07 Sep 2016, 15:51 |
|
Goto page Previous 1, 2 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.