The MASM Forum

64 bit assembler => UASM Assembler Development => Topic started by: Alextp on March 13, 2016, 12:11:56 AM

Title: Lexer JWASM for Synwrite
Post by: Alextp on March 13, 2016, 12:11:56 AM
Text editor SynWrite / CudaText-- have lexer "Assembly JWASM". Install it via AddonManager.
Maybe someone can comment it?

I hilited with red: .names (e.g. .code, .if)
I hilited with greenish: label:
I fold blocks .if / .endif
I put to "tree" procs, labels

Title: Re: Lexer JWASM for Synwrite
Post by: jj2007 on March 13, 2016, 05:24:15 AM
In the 20th Century, somebody invented a feature called "hyperlink". Can be used to point to pages that contain the content you seem to be talking about 8)
Title: Re
Post by: Alextp on March 13, 2016, 06:11:30 AM
Hm, you can test CudaText using portable zip https://sourceforge.net/projects/cudatext/files/release/Windows/cudatext-win-x32.zip/download
(to install lexer, call menu Plugins/ AddonManager/ Install)
Title: Re: Lexer JWASM for Synwrite
Post by: jj2007 on March 13, 2016, 06:54:27 AM
Many functions but no "Build" button :(

It may need some fine-tuning, too:
Title: Re: Lexer JWASM for Synwrite
Post by: Alextp on March 13, 2016, 07:21:49 AM
Build-button: install plugins Ext Tools (via Addon manager) and (needs restart) see top menu Tools.
ListIndex error: it's from viewing file "generics.asm"? Or some commd? Can you attach it?
Title: Re: Lexer JWASM for Synwrite
Post by: jj2007 on March 13, 2016, 09:46:11 AM
It says that the tool is being installed, but nothing in the tools menu after a restart, sorry.

Besides, a simple Ctrl B or "go to next bookmark" makes the whole app freeze, and it must be killed via task manager 8)

Given that this app is 3.6 MB for the exe plus roughly 5 MB for the DLLs, it seems that you do not have the full control over its behaviour. With 0.09% of that size, you can get an IDE that works for Masm (http://masm32.com/board/index.php?topic=103.0) ;)
Title: Re: Lexer JWASM for Synwrite
Post by: Alextp on March 13, 2016, 10:38:27 AM
>but nothing in the tools menu after a restart
Strange, since all users see "Tools" menu after installin Ext Tools. (you must see message "Installed.... events: .... commands: ...." on installed Ext Tools)

I see bug if no bookmarks, and GotoBookmark call, and click in emprt wnd.
Will fix..

Can we move to GH?
https://github.com/Alexey-T/CudaText/issues
Title: Re: Lexer JWASM for Synwrite
Post by: fearless on March 13, 2016, 12:12:54 PM
Looks interesting. Had a play around with the SynWrite as well, managed to get it to use resource compiler, masm and linker by adding in some info to the project tools. Does require playing around with the inbuilt variables, and i had to hardcode some filenames for the linker to work for some reason.

Anyhow had a look at cudatext as well (which is the newer rewrite of SynWrite) and had an issue with the centering of dialogs over multi-monitor screens - submitted issue on github about that.

Suggestions based on using both (i assume a lot of what went into SynWrite will make it over to cudatext in some form or other at some point in time)

- New Project / Project Template (plugin possibly ?)
once user has entered all required information about external tools: rc.exe, ml.exe, link.exe and has all variables and command line paths specified, creating a new empty project based on this information would be very useful - something like how RadASM creates new projects or Visual Studio does would be handy to have.

- Build (plugin possibly ?)
similar to external tools, but more accessable to assembler coders (and c++ etc) who are used to a build menu that has the compile, link, build all, debug options etc

- Paths to libs and includes folders assigned to variables, which can be inserted into command line information for build or external tools - SynWrite has a section under project settings that i think would accomplish this, but ideally to have a link to it from build menu would be handy as well - and already filled in for them would be nice (for new users at least)

so $LIB=M:\Masm32\Lib, $INCLUDE=M:\Masm32\Include,  and possibly others that can be useful for creating new projects based on templates $PROJECTSBASE=M\Masm32\Projects etc etc 

This is what RadASMs paths and project options dialogs look like, they use the variables in the paths in the command lines for the project options along with other internal variables
(http://s12.postimg.org/6l5epu8ll/radasmpathsdialog.jpg) (http://postimg.org/image/6l5epu8ll/)

(http://s24.postimg.org/hfacr8w69/radasmprojectoptions.jpg) (http://postimg.org/image/hfacr8w69/)
Title: Re: Lexer JWASM for Synwrite
Post by: jj2007 on March 13, 2016, 03:41:32 PM
Quote from: Alextp on March 13, 2016, 10:38:27 AM
>but nothing in the tools menu after a restart
Strange, since all users see "Tools" menu after installin Ext Tools.

There is a tools menu, but no build button, only these three entries:
- config -> huge cryptic dialog
- run lexer main tool -> does nothing (?)
- results -> no any results for navigation
::)
Title: Re: Lexer JWASM for Synwrite
Post by: Alextp on March 13, 2016, 06:41:05 PM
About Build/ Link/ Compile.... see- you have ExtTools plugin, it runs ext-tools, so make 3 tools for build, compile, link. Make /Build/ default tool- 'lexer main tool'.

ExtTools made by him==> https://github.com/kvichans/cuda_exttools 
Let's move with ASM features to /issues/ ? (I see Mussolini asking 3 times)
Title: Re: Lexer JWASM for Synwrite
Post by: Alextp on March 13, 2016, 06:57:24 PM
Posted your idea-
https://github.com/kvichans/cuda_exttools/issues/64
you may "notify" on topic
Title: Re: Lexer JWASM for Synwrite
Post by: jj2007 on March 13, 2016, 10:48:17 PM
Quote from: Alextp on March 13, 2016, 06:57:24 PM
Posted your idea

Thanks for the credits, but having a "build" button in an IDE was definitely not my idea  :biggrin:
Title: Re: Lexer JWASM for Synwrite
Post by: Alextp on March 17, 2016, 02:29:12 AM
 Guys, author of ExtTools plugin made user macro vars (like $vars in php, but {var} here)
Update ExtTools (install via Addon manager) and see new button "User macro vars" in config
Hope it's ok.
Title: Re: Lexer JWASM for Synwrite
Post by: fearless on March 17, 2016, 06:34:21 AM
Yes seems to be working.

This is what i have done so far:

- Setup LIB and INCLUDE vars:
(http://s27.postimg.org/mdu3k6wi7/cudatext_usermacrovars.jpg) (http://postimg.org/image/mdu3k6wi7/)


- Added rc.exe external tool
  Shell command: checkbox set to tick.
  Params: /v {FileNameNoExt}.rc
  Initial Folder: {FileDir}
  Lexers: Assembly JWASM, Assembly
  Capture Output: Output panel
  Encoding: cp1252

(http://s21.postimg.org/7kmvw0z4z/cudatext_rctool.jpg) (http://postimg.org/image/7kmvw0z4z/)


- Added ml.exe external tool
  Shell command: checkbox set to tick.
  Params: /c /coff /Cp /nologo /I"{INCLUDE}" "{FileNameNoExt}.asm"
  Initial Folder: {FileDir}
  Lexers: Assembly JWASM, Assembly
  Capture Output: Output panel
  Encoding: cp1252

(http://s8.postimg.org/wn44spdkh/cudatext_mltool.jpg) (http://postimg.org/image/wn44spdkh/)


- Added link.exe external tool
  Shell command: checkbox set to tick.
  Params: /SUBSYSTEM:WINDOWS /RELEASE /VERSION:4.0 /LIBPATH:"{LIB}" /OUT:{FileNameNoExt}.exe {FileNameNoExt}.obj {FileNameNoExt}.res
  Initial Folder: {FileDir}
  Lexers: Assembly JWASM, Assembly
  Capture Output: Output panel
  Encoding: cp1252

(http://s12.postimg.org/i1eo0v3ih/cudatext_linktool.jpg) (http://postimg.org/image/i1eo0v3ih/)
(http://s15.postimg.org/6dmq9kfuf/cudatext_linktool2.jpg) (http://postimg.org/image/6dmq9kfuf/)


So after some trial and error and playing around i got it to compile the resource (test.rc), compile the test.asm file and link both test.obj and test.res to create a test.exe file.

I had all relevant files in the same directory (same project folder i was using to test out synwrite) but i only had the test.asm loaded in the cudatext. Didnt see a project main file variable like in synwrite (maybe its still to be added in? or is part of a project manager plugin)

- Had to checkbox shell command otherwise the dos box flashes up on screen for a millisecond
- Had to set a codepage, otherwise the console output complains of unknown codepage, so all three tools are set to cp1252 codepage
- Had to set lexers to assembly and jwasm assembly

It works. Once the project part of it is added in it will be more useful for managing all related files (similar to how the synwrite program does it now i imagine)


Title: Re: Lexer JWASM for Synwrite
Post by: Alextp on March 17, 2016, 07:26:37 AM
Tks for this info. I see it works. ProjManager not done -only todo...