News:

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

Properties window

Started by Klod, July 23, 2009, 12:37:54 AM

Previous topic - Next topic

Klod

I'm having troubles configuring Radasm to work with Nasm.

Skip={C},%include
Code={I},PROC $,? ENDP ;this works
Const={C},$ equ ;this works
Label={C},$ : ;this works
Data={T},$ db, $ dw, $ dd, $ dq,$ df,$ dt,$ byte,$ word,$ dword,$ qword   ;this does not work correctly

szWindow db 'A basic Window',0    ;works
DrawHDC dd 0 ;does not work
Macro={C},%macro $,? %endmacro ;does not work
Struct={C},STRUC $, ENDSTRUC ;does not work

Also I have problems with line 8 in the next block. if uncommented will put a + for each line in the code window?? Lines 2 to 7 work as expected. Line 1 does not produce an output.
[CodeBlock]
1=struc ,endstruc,,,6
2=if,endif,elseif,else,0
3=.CODE,,,,16
4=.DATA,,,,16
5=while,wend,break,,0
6=PROC,ENDP,,,2
7=.BSS,,,,16
;8= %macro ,%endmacro,,,0

I have tried a few ways  :(to make it work but eventually run out of ideas :red
Klod

KetilO

Hi Klod

Quote
Data={T},$ db, $ dw, $ dd, $ dq,$ df,$ dt,$ byte,$ word,$ dword,$ qword   ;this does not work correctly
Macro={C},%macro $,? %endmacro   ;does not work
Struct={C},STRUC $, ENDSTRUC      ;does not work
Change theese:
Data={C},$ db,$ dw,$ dd,$ dq,$ df,$ dt,$ byte,$ word,$ dword,$ qword
Macro=%macro $,%endmacro
Struct=STRUC $,ENDSTRUC

Change the character table and define % as a character:
[CharTab]
2=0251212522222232;20-2F
3=1111111111242221;30-3F

Quote
;8= %macro ,%endmacro,,,0
This will not work due to the %

KetilO

Klod

Hi KetilO thanks for your quick response

mov dword[hInstance], eax      ;this will also produce an entry in the data list as mov
Macro=%macro $,%endmacro   ;this does not work
Struct=STRUC $,ENDSTRUC      ;this does ot work
%1 db %{2},0         ;will produce an entry in the data

Section [CharTab]

Character table definitions.
Manually maintained.

Default character table for characters 0 to 127
0=0000000000000000;00-0F
1=0000000000000000;10-1F
2=0251222522222232;20-2F
3=1111111111242221;30-3F
4=1111111111111111;40-4F
5=1111111111122221;50-5F
6=0111111111111111;60-6F
7=1111111111122200;70-7F

Character 128 to 255 has default entries for Western and Cyrillic character sets.
On all other character sets default is all 0's

Table entry meanings.
0=No special handling.
1=Treated as alpanumeric by hiliter and word selector
2=Treated as operator by hiliter
3=Treated as alpanumeric by hiliter
4=Character initiates comments
5=Character initiates strings.
6=Character initiates comments if double. Example: //

I assume that '%' Ascii 37decimal is meant I tried all possible combinations but still have the same out put as above

Klod

KetilO

Hi Klod

Sorry, it should be:
Macro=%endmacro,%macro $
Struct=ENDSTRUC,STRUC $

Also, in sectiom Code, add:
Skip={C},%include,push,pop,mov,cmp

KetilO

Klod

Thanks KetilO
this works with the exception of
Struct=ENDSTRUC,STRUC $

Thanks
Klod

KetilO

Hi Klod

Could you post a nasm example?

KetilO

Klod

Hi KetilO

; structures
STRUC RECT
.left RESD 1
.top RESD 1
.right RESD 1
.bottom RESD 1
ENDSTRUC

Klod

KetilO

Hi Klod

The syntax will not work with the standard parser in RadASM.
The solution is to create a parser dll. Included is the source for cppparse.dll.
Use it to create a parser for nasm.

KetilO

[attachment deleted by admin]

Ficko

Thanks KetilO!

This is an excellent resourse!  :U

But there is not too much explanation how "CppParse.dll" interact with the IDE.

Do you have some description for it ?

Klod

Thanks KetilO
I had a look at CppParse.zip and although I didn't understand all of the code I got the idea. This is a project that will have to wait for the time being. As it is, with your help Nasm integrates nicely with Radasm, afterall Radasm is still the best IDE.
Thanks for making this great IDE available to all of us
Klod