Author Topic: Re: Re: 64 bit version of tEdit  (Read 1309 times)

guga

  • Member
  • *****
  • Posts: 1357
  • Assembly is a state of art.
    • RosAsm
Re: Re: 64 bit version of tEdit
« on: November 22, 2020, 05:09:40 PM »
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--

  • Administrator
  • Member
  • ******
  • Posts: 8549
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Re: Re: 64 bit version of tEdit
« Reply #1 on: November 22, 2020, 05:27:24 PM »
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 ....
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy:

jcfuller

  • Member
  • **
  • Posts: 196
Re: Re: Re: 64 bit version of tEdit
« Reply #2 on: November 23, 2020, 09:02:01 PM »
  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--

  • Administrator
  • Member
  • ******
  • Posts: 8549
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Re: Re: 64 bit version of tEdit
« Reply #3 on: November 23, 2020, 09:31:15 PM »
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 at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy:

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 8549
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Re: 64 bit version of tEdit
« Reply #4 on: November 23, 2020, 09:37:26 PM »
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.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy:

jj2007

  • Member
  • *****
  • Posts: 11587
  • Assembler is fun ;-)
    • MasmBasic
Re: Re: Re: 64 bit version of tEdit
« Reply #5 on: November 23, 2020, 10:36:23 PM »
Setting 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

  • Member
  • **
  • Posts: 196
Re: Re: 64 bit version of tEdit
« Reply #6 on: November 24, 2020, 01:02:28 AM »
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

  • Member
  • *****
  • Posts: 2588
Re: Re: 64 bit version of tEdit
« Reply #7 on: November 24, 2020, 02:07:23 AM »
ml and Polink accepting environment variables :

Code: [Select]
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

Code: [Select]
.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