Author Topic: Editors  (Read 4437 times)

daydreamer

  • Member
  • ****
  • Posts: 894
  • watch Chebyshev on the backside of the Moon
Re: Editors
« Reply #75 on: April 06, 2019, 06:25:40 AM »
In RadAsm is just a directory with subdirectories, and there you save little files with pieces of code.
thanks
suggestion are push and pop sequences that for code that use all registers
most used winapi setting up,messagebox,richedit and all kinds of winapi UI controls
a version for each of the GDI and ddraw and direct2d ,that starts a block of graphics code and end code
GDI has its specific getDC and ddraw has lock and unlock surface with or without check for vertical retrace
there is probably several useful skeletons for d3d proc's that handle different the usual proc's,for example renderproc
one snippet is drawprimitives or a section with many drawprimitives
a workerthread skeleton proc,so you easily can start utilize more than one thread
Quote from Flashdance
Nick  :  When you give up your dream, you die
*wears a flameproof asbestos suit*
what cpu handle "press any key"? any cpu of course(from C#) :D

jj2007

  • Member
  • *****
  • Posts: 9635
  • Assembler is fun ;-)
    • MasmBasic
Insert code snippet
« Reply #76 on: April 06, 2019, 02:12:51 PM »
Below the current RichMasm AutoCode menu - suggestions welcome.

In addition, there are over 100 keyboard shortcuts: you type two or three letters followed by a space, and they expand to a full word of sequence. For example:

ism<space> -> invoke SendMessage,

mb<space> -> MsgBox 0, "¨", "Hi", MB_OK (here, when hitting space, the red spot will be selected, so that you can type the text right away)

deb4<space> -> deb 4, "¨", eax

opi<space> -> Open "I", #

gcr<space> -> GuiControl MyRichEdit, "richedit", y=0+37, h=1000-35, text "This is a RichEdit control"

Some expand to multiple lines (again, the red spot will be selected):
.rep
.Repeat
    ¨
.Until 0

swi
Switch_ ecx
  Case_ 0
   ¨
  Default_
  nop
Endsw_

etc ... the full list is in \Masm32\MasmBasic\Res\Keywords.ini

daydreamer

  • Member
  • ****
  • Posts: 894
  • watch Chebyshev on the backside of the Moon
Re: Editors???and change to alternative compilers???
« Reply #77 on: August 16, 2019, 02:43:50 AM »
Hi
I read about you can tell the IDE use alternative compiler in Visual Studio
but if you manage to change 64bit compiler to one that supports inline asm,doesnt it become licence problem if you have to use a linux kinda compiler?

I dont like the compiler taking decisions on where placing variables like it wants,not what I expect from typical ASM placing of variables is where you find them and the next variable is right after the previous one
Quote from Flashdance
Nick  :  When you give up your dream, you die
*wears a flameproof asbestos suit*
what cpu handle "press any key"? any cpu of course(from C#) :D

AW

  • Member
  • *****
  • Posts: 2233
  • Let's Make ASM Great Again!
Re: Editors???and change to alternative compilers???
« Reply #78 on: August 16, 2019, 03:23:51 AM »
Hi
I read about you can tell the IDE use alternative compiler in Visual Studio
but if you manage to change 64bit compiler to one that supports inline asm,doesnt it become licence problem if you have to use a linux kinda compiler?

I dont like the compiler taking decisions on where placing variables like it wants,not what I expect from typical ASM placing of variables is where you find them and the next variable is right after the previous one
You can use the Intel System Studio compiler from inside Visual Studio to build x64 inline asm.
There is a free version, with 3-months now with 1-year renewable licenses (this is the one I got). I posted the link here sometime ago, but can't recall it now.
Test:

Code: [Select]
#include <stdio.h>

char myMessage[] = "Hello There";

int main()
{
__asm
{
mov rcx, offset myMessage
call printf
};
return 0;
}

Output:
Hello There

daydreamer

  • Member
  • ****
  • Posts: 894
  • watch Chebyshev on the backside of the Moon
Re: Editors???and change to alternative compilers???
« Reply #79 on: August 17, 2019, 09:34:38 PM »
Hi
I read about you can tell the IDE use alternative compiler in Visual Studio
but if you manage to change 64bit compiler to one that supports inline asm,doesnt it become licence problem if you have to use a linux kinda compiler?

I dont like the compiler taking decisions on where placing variables like it wants,not what I expect from typical ASM placing of variables is where you find them and the next variable is right after the previous one
You can use the Intel System Studio compiler from inside Visual Studio to build x64 inline asm.
There is a free version, with 3-months now with 1-year renewable licenses (this is the one I got). I posted the link here sometime ago, but can't recall it now.
Test:

Code: [Select]
#include <stdio.h>

char myMessage[] = "Hello There";

int main()
{
__asm
{
mov rcx, offset myMessage
call printf
};
return 0;
}

Output:
Hello There
thanks very much AW
I really like to write SIMD,but found a quirk with compiler put variables in memory like it want it,so I decided to go back to Assembly,because I can trust variables are exactly as I placed them
anyway Makes GDI macros for lesser typing/easier to convert C code by just remove parenthesis
Quote from Flashdance
Nick  :  When you give up your dream, you die
*wears a flameproof asbestos suit*
what cpu handle "press any key"? any cpu of course(from C#) :D