News:

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

Main Menu

Re: Re: 64 bit version of tEdit

Started by guga, November 22, 2020, 05:09:40 PM

Previous topic - Next topic

guga

Great work, steve.


Btw...about the plugins zedd151 mentioned. How it is created ? I man, how to create the proper functions to allows an editor to use plugins ?
Coding in Assembly requires a mix of:
80% of brain, passion, intuition, creativity
10% of programming skills
10% of alcoholic levels in your blood.

My Code Sites:
http://rosasm.freeforums.org
http://winasm.tripod.com

hutch--

Guga,

The basics are a DLL that has a known interface that the app can call. That's the easy part and all you need to pass to it are the handles for things you want to be modifiable. To be able to call multiple DLLs you need some way to address them like a menu option. Its not a big deal to add a menu that you can configure to call a number of different DLLs one at a time and depending on what you want to be modifiable, you pass things like,

hWnd, hMenu, hToolBar, hStatusBar etc ....

jcfuller

  I know this is not a source code editor but KetilO spoiled me with both Radasm3 and FbEdit with a feature I MUST have in any source code editor: Setting Environment variables that are persistent when shelling to a command line prompt. Just my 1 1/2 cents :)


James

hutch--

Funny enough James, I have rarely ever used environment variable apart from what I set rom time to time in batch files. The risk of having them permanently set leaves you open to getting the wrong binaries if you have more than 1 environment. I have various versions of VC/VS as well as the current 64 bit versions and I want to specify for each the right binaries.

With MASM in both 32 and 64 bit I use different linker like the M$ one, Pelle's one and I pick the version for each environment. Ketil's RadAsm is a popular tool that many like but sad to say he no longer updates it and the code is too complex for most to develop.

hutch--

Guga,

I am trying to track down a technique to get around a bad bug in a message used by richedit, when I get in front I will point some code your way to handle plugins. Its basically a call DLL interface that you can either load dynamically or alternately have a fixed single call that depends on the DLL being in the same directory. Roughly if the file exists in the same directory, it will be loaded, if its not available nothing is loaded.

jj2007

Quote from: jcfuller on November 23, 2020, 09:02:01 PMSetting Environment variables that are persistent when shelling to a command line prompt

Agreed (that's what RichMasm's OPT_xxx feature does), but they shouldn't be too persistent. They should be present in the batch file, yes, but if they hang around in the registry afterwards, they can do more harm than good, as Hutch rightly notes.

jcfuller

They are only set I believe as part of the shelling process from RadAsm3 and FbEdit before a batch file or console | gui exe is run. I use the feature extensively with FbEdit [BCX]. I shell to an exe that switches param order from my hacked version of FbEdit and then shells to BCX . BCX has a $ONEXIT feature that will run another program after it is done it's translation ( most often the batch file that compiles the c/c++ translated source). The environment variables are persistent all the way to the batch files so I can control many aspects of a single batch file from within the IDE. They are also persistent with apps you add to the tools menu. Exit RadAsm3 or FbEdit and they are gone.

James


Vortex

ml and Polink accepting environment variables :

set m=masm32
SET path=%path%;\%m%\bin
SET lib=\%m%\lib
set include=\%m%\include
set lib=\%m%\lib

ml.exe /c /coff ScreenRes.asm
polink.exe /SUBSYSTEM:CONSOLE ScreenRes.obj


.386
.model flat,stdcall
option casemap : none

include     windows.inc
include     kernel32.inc
include     user32.inc
include     msvcrt.inc

includelib  kernel32.lib
includelib  user32.lib
includelib  msvcrt.lib

.data

msg         db 'Screen resolution = %u X %u',0

.code

start:

    invoke  GetSystemMetrics,SM_CXSCREEN
    push    eax
    invoke  GetSystemMetrics,SM_CYSCREEN
    pop     ecx
    invoke  crt_printf,ADDR msg,ecx,eax
    invoke  ExitProcess,0

END start