News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Lexer JWASM for Synwrite

Started by Alextp, March 13, 2016, 12:11:56 AM

Previous topic - Next topic

Alextp

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


jj2007

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)

Alextp

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)

jj2007

Many functions but no "Build" button :(

It may need some fine-tuning, too:

Alextp

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?

jj2007

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 ;)

Alextp

>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

fearless

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




jj2007

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
::)

Alextp

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)

Alextp

Posted your idea-
https://github.com/kvichans/cuda_exttools/issues/64
you may "notify" on topic

jj2007

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:

Alextp

 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.

fearless

Yes seems to be working.

This is what i have done so far:

- Setup LIB and INCLUDE vars:



- 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




- 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




- 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





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)



Alextp

Tks for this info. I see it works. ProjManager not done -only todo...