News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Need help usung RAEdit.dll

Started by gfalen, August 12, 2008, 12:12:43 PM

Previous topic - Next topic

gfalen

The latest version of Simed has vertical lines connecting the collapsible blocks.  When I use the dll that comes with simed I do not get these lines.

What do I do to enable this?

[attachment deleted by admin]

KetilO

The vertical lines are tab character markers.
They will only show if the whitespase is tab characters and not spaces.
The color is set by RACOLOR.hicol3

KetilO

gfalen

I would like to modify the raedit code so it ALWAYS shows these  lines.  Could you give me some tips how to do this?

KetilO

It is done here:
File: Paint.asm
Proc: DrawLine
Sub: DrawWord:


DrawWord:
movzx edx,byte ptr [esi+edi]
.if edx==VK_TAB
mov ecx,[ebx].EDIT.fntinfo.tabwt
mov eax,rect.left
sub eax,rcleft
xor edx,edx
div ecx
mul ecx
add eax,rcleft
.while byte ptr [esi+edi]==VK_TAB && edi<[esi].CHARS.len
.if edi && !fChr
pushad
lea esi,[eax+2]
mov ecx,[ebx].EDIT.fntinfo.fntht
shr ecx,1
mov edi,rect.top
.while ecx
push ecx
inc edi
invoke SetPixel,hDC,esi,edi,[ebx].EDIT.clr.hicol3
inc edi
pop ecx
dec ecx
.endw
popad
.endif
add eax,ecx
inc edi
.if fWrd
dec fWrd
.endif
.endw
mov rect.right,eax
.elseif edx==VK_SPACE
.
.
.


KetilO

KetilO

Hi

Uploaded the recent SimEd / RAEdit project.

Whats new in RAEdit:
------------------------------
o Block guide markers.
o Indent markers also works on spaces.

Get it here:
http://www.radasm.com/projects/SimEd.zip

KetilO

gfalen

What do theese guys do

BD_NOBLOCK              equ 40h             
BD_ALTHILITE            equ 80h

KetilO


BD_NOBLOCK              equ 40h
Is used for blocks that has no ending, like some comment blocks.

BD_ALTHILITE            equ 80h
It will add 1 to the wordgroup. See REM_SETWORDGROUP.
Can be used for blocks where you want alternative syntax coloring.
In high level langages it can be used for inline asm.

KetilO

gfalen

I see the new code in function.asm but I don't fully understand it
Anyway since these flags are'nt used yet I'll worry about it later.

BTW - do you know
test expr, mask
.if !ZERO?
can be replaced with
.if expr & mask

test expr, mask
.if ZERO?
can be replaced with
.if !(expr & mask)     ; () needed due to bug in masl
...

I have been working on my own editor based on Masmed.  In so doing
I have made some observations I'd like to share with you if it's ok.

1. SetHiliteWords proc, nColor, lpWords        (raedit.asm)
; Use nColor[3] & 4 as case toggle.  This way if you have a group
; which is mostly case sensitive, you can just set the bit in it's
; color and leave off the leading '^'
...
NxtWrd:
    and fEnd, 0
    .if byte ptr nColor[3] & 4  ; group is case sensitive. Toggles meaning of '^'
        or fEnd, 3
    .endif
    ...
NxtWrd1:
    ...
    .elseif al == '^'           ; '^' THIS word is not case sensitive
        inc esi
        xor fEnd, 3     ;
        jmp NxtWrd1
    ...

I have a lot of good ideas for changes/modifications (like you're use of jump tables in
this latest release) but I'm not familiar enough with the raedit code to implement
all of them myself.

I would like very much to collaborate with you on a custom version of raedit.
If you are willing send me a PM.

G.F

KetilO

Hi


test x,1
.if ZERO?
mov x,1
.endif
.if !(x & 2)
mov x,2
.endif
test x,3
.if !ZERO?
mov x,3
.endif
.if x & 4
mov x,4
.endif
mov x,5

Debug:
00401000 >/$ F705 04304000 >TEST DWORD PTR DS:[403004],1
0040100A  |. 75 0A          JNZ SHORT About.00401016
0040100C  |. C705 04304000 >MOV DWORD PTR DS:[403004],1
00401016  |> F705 04304000 >TEST DWORD PTR DS:[403004],2
00401020  |. 75 0A          JNZ SHORT About.0040102C
00401022  |. C705 04304000 >MOV DWORD PTR DS:[403004],2
0040102C  |> F705 04304000 >TEST DWORD PTR DS:[403004],3
00401036  |. 74 0A          JE SHORT About.00401042
00401038  |. C705 04304000 >MOV DWORD PTR DS:[403004],3
00401042  |> F705 04304000 >TEST DWORD PTR DS:[403004],4
0040104C  |. 74 0A          JE SHORT About.00401058
0040104E  |. C705 04304000 >MOV DWORD PTR DS:[403004],4
00401058  |> C705 04304000 >MOV DWORD PTR DS:[403004],5

Since it produces similar code they are equal.

KetilO

gfalen

Yes, when I said "can be replaced with" I was implying that it is more "concise" - a preferable alternative.

What do you think about using third color bit as "case toggle"?  In my editor I have large groups of case-sensitive
words.  To manually add the '^' prefix to each would really be annoying - LOL/

KetilO

QuoteWhat do you think about using third color bit as "case toggle"?

Added.

KetilO