Author Topic: MasmBasic  (Read 345853 times)

jj2007

  • Moderator
  • Member
  • *****
  • Posts: 11550
  • Assembler is fun ;-)
    • MasmBasic
Re: MasmBasic
« Reply #540 on: March 27, 2021, 06:50:39 AM »
Thanks for [Ctrl] mouse wheel  Tip - very helpful for me (eventually will try out template situation).

Now as long as I remember to use [Ctrl] mouse wheel I should be OK (in general)

When you press Alt Z, you can make your level of zooming permanent.

Quote
the top row menu options File Edit&Format etc is not permanently visible (sometimes the case)

They should be visible when the window is activated. Can you check that, please?

Quote
once I have opened an .asc file (etc) (yellow background) - I cannot seem to be able to get back to the "opening screen" (green background) UNLESS I just reinstall the SetUpMasmBasic

- The green background is reserved for the help file ("opening screen"). You can open it from menu File/MasmBasic help.
- Use menu File/New Masm source to create a new project; use the links with white background for the time being.
- When you hover with the mouse over a keyword such as Print, Open, For_ etc, the cursor turns into an arrow with a question mark; right-click to get a greenish box from which you can copy entire snippets.
- there are many keyboard shortcuts (see \Masm32\MasmBasic\Res\Keywords.ini); try typing .rep<space> or opi<space>. You will often need deb4<space> to understand what your code does.

Quote
there is an alinement issue in that to get the pull down context menu (eg from File) - the cursor has to be in the right adjacent "Tab Setting"  (refer attachment - the green "crosshairs" show where the cursor has to be to access File options)

Sorry for that. My noteback has a modest 1366*780 resolution, so I cannot compete with your 3200 x 1800 native display. Aligning the menus was tricky, so I can't promise anything in the near future. The same applies for other elements that are not DPI aware, such as the bookmarks to the right.

Richard

  • Regular Member
  • *
  • Posts: 45
Re: MasmBasic
« Reply #541 on: March 27, 2021, 02:04:43 PM »
@jj2007

Quote
Quote
the top row menu options File Edit&Format etc is not permanently visible (sometimes the case)
[
They should be visible when the window is activated. Can you check that, please?

IF I (left or right) Click in the

" File Edit ... AutoCode"  region    lets call this region = "..." here and call this clicking = "stray mouse click"

then "..." disappears BUT returns again IF I immediately "valid mouse click", with or without moving mouse!

 
So as long as I do not "stray mouse click", but "hover" instead, then that stops the disappearing (of course, as mentioned by you, if I go to another application meaning RichMasm is not active = "..." disappear but returns immediately when click in RichMasm background to make RichMasm active)

So NOT really a problem of disappearing "..." , just only needs a bit of getting used to (as all other applications I use NEVER disappear their "..." region for "stray mouse clicks" in the "..." region, also other applications never disappear "..." when temporarily leaving but application still visible in multi window)

Thanks for your explanation.

Richard

  • Regular Member
  • *
  • Posts: 45
Re: MasmBasic
« Reply #542 on: April 04, 2021, 04:46:07 PM »

Just getting some practice before I start writing my own code. I tried the following example (first time for examples) and F6 gave the following error.

I may have some residual MASM5.1 (and more recently MASM 6) stuff floating around - so before I start changing/deleting things I better ask! Note that ALL my MASM5.1 (+ MASM 6) stuff existed before I ever heard about RichMasm and MASM32 SDK.


*** Start C:\Masm32\MasmBasic\Res\bldallRM.bat ***
*** 32-bit assembly ***


*** Assemble, link and run SkelTimer ***

*** Assemble using ml  ***
 Assembling: tmp_file.asm
##########################

You CANNOT use the MasmBasic library with
the old ml.exe version 6.14 - use UAsm instead

##########################
*** MasmBasic version 18.02.2021 ***
*** Warning: SQWORD is unsigned with ml **
\masm32\MasmBasic\MasmBasic.inc(728) : error A2052: forced error
 TestMasmVersion(8): Macro Called From
  \masm32\MasmBasic\MasmBasic.inc(728): Include File
*** Assembly error ***


jj2007

  • Moderator
  • Member
  • *****
  • Posts: 11550
  • Assembler is fun ;-)
    • MasmBasic
Re: MasmBasic
« Reply #543 on: April 04, 2021, 07:11:48 PM »
Hi Richard,

how did you force RichMasm to use ML? With OPT_Assembler ml? The error message is clear, MasmBasic won't accept the old assembler, for good reasons. So if \Masm32\bin\ml.exe is an old version, you get that message.

By default, RichMasm wants ?:\Masm32\bin\UAsm64.exe, but with e.g. ; OPT_Assembler AsmC you can work with another one.

Do you have the latest UAsm, see http://www.terraspace.co.uk/uasm.html#p2, to be extracted as \Masm32\bin\UAsm64.exe?

I have no experience with any pre-MASM 6.14 code, can you post a short example? Perhaps I can make it run...

Richard

  • Regular Member
  • *
  • Posts: 45
Re: MasmBasic
« Reply #544 on: April 05, 2021, 12:54:50 AM »
@jj2007

Thanks for reply - would have answered sooner (for some reason your email ended up in junk mail and so did not know).

Refer attachment

All I wanted to do was to try programs from the forum (refer last two images) to gain a bit of practice (with code that works) before trying out my original code.

(Keeping in mind that I am still getting used to my 3200x1800 display in high DPI mode (scaling 100) and as you mentioned only some parts I can scale up (to be readable) with Ctrl Mouse  wheel but system fonts can not be.  So the "mixed sizes" is OK (needs getting used to) but until I practice a lot more, it is easy for me to accidently click in error. Also, I am getting used to selection from top menu bar is not aligned to context columns (as you acknowledged earlier - it is very tricky to code especially when one (you) does not have a high DPI display.

First, just for fun, I wanted to try out the unicode ascii file program - loaded the .asc file from the forum and pressed F6 (not adjusting any settings or anything). A black DOS-like command screen appeared and a little pop-up window saying something to the effect that if some unicode characters do not appear correctly ... then to try Lucinda Console (or something similar sounding). So I immediately went to Settings>Personalize>Fonts> and selected Lucinda Console. I returned to the unicode program console window - but it looked like something "locked up" with it - so I tried to completely close down the program (and RichMasm) but no response. Not even Windows Task Manager OR Task Bar could close it! I could not even move that window around (out of the way of other applications running). "a.asc" was just a temporary "save" just to allow from earlier on, to close RichMASM application - I was not actually wanting to do anything with a.asc - just to close off RichMASM (I got confused with something earlier - so best to start with a "clean slate").  RichMASM locked up with the first image window (keep in mind I was trying to click my way out - so who knows what I may have triggered off.

So I SHUTDOWN my computer, checked that the Lucina Console font was active (according to windows), launched RichMASM and opened up Unicode_File_Names.asc and so the Unicode_File_Names.asc appeared to work OK (just pressing F6 in RichMASM IDE).

I went to the second example program SkelTimer.asc and pressed F6 and the error message as above appeared.

So the "lock up" confused me, I probably did some wrong key presses trying to exit. (I think maybe changing the font and not restarting first also added to the confusion).

I was not attempting to load any old MASM (5 and 6) stuff - however they are still lingering around (maybe I should permanently remove - since I am no longer using DOSBOX and MASM5.1 (RichMASM has "spoilt me")). However it is quite possible that some directories (eg MASM) is loaded up with MASM5.1 stuff and MASM32 SDK stuff etc (I have not checked out for this double useage of directory).

I hope you have enough info from me to see what went wrong - I do not think there is anything wrong with RichMASM.

jj2007

  • Moderator
  • Member
  • *****
  • Posts: 11550
  • Assembler is fun ;-)
    • MasmBasic
Re: MasmBasic
« Reply #545 on: April 05, 2021, 02:05:17 AM »
Hi Richard,

I can't solve the font problems for anything outside the main editor window (listbox, Find+Replace, bookmarks etc) for the time being. Regarding the main editor window, you already know the mouse wheel trick, and I suppose you hit Alt Z to save the zoom level. One more hint: There are templates that use the System font, which is not zoomable; press Ctrl A to select the whole text, then Ctrl L twice. This changes the whole text to a zoomable flavour. Ctrl Shift L selects an extra large text btw - I use that for macro and proc names.

Re freezing: I've experienced that in recent months, and the culprit is Firefox in my case. It happens after a long (5-10 hours) session, and it freezes indeed everything. Normally it goes away after a few minutes. I doubt that RichMasm has any role in it, as its memory usage is tiny compared to a browser.

Thanks a lot for your feedback :thup:

Richard

  • Regular Member
  • *
  • Posts: 45
Re: MasmBasic
« Reply #546 on: April 05, 2021, 02:52:37 AM »
Thanks for reply.

I understand and appreciate re sizes - that is a major reason why I want to "practice" with code that works, so to get "used to" and be "comfortable with" with everything.

I use windows 10 x64 build 2H20 and all sorts of "weird things" quite often happen - the latest is that for a few months now, when I run my computer for a long time (1-3 days continuously) number crunching - I will most likely get a "black screen" , no mater what I try and screen won't come back (and my programs are still running). In these cases I have to press and hold the power key for 10 seconds (the most drastic shutdown procedure).

On this occasion, my computer has been running about 2 days (and the black screen not yet occurred) - so maybe changing the font really really messed up windows).

I will "sleep over it" and start from scratch re example programs before I will download any UASM stuff (I am not planning on going "backwards" (from RichMASM) so after a lot more practice with examples from this forum and RichMASM then will try my own code writing solely using your IDE and F6.

Just a side note, if you don't mind me asking, are you "in the know" about - GNU gcc, Intel syntax versus AT&T syntax, Geany. The reason why I ask is that once I get relatively small and simple sounding MASM projects up and going (in RichMASM) - that I will port the code into a (other) High level language via include files but the preferred way is via gcc and at that using intel syntax (my ultimate aim, the "other" high level language occupies 99% of code but that code only does 1% of the work, the assembly code (technically not really "in-line assembly") occupies 1% of the code but does 99% of the work (and probably much faster)) 

jj2007

  • Moderator
  • Member
  • *****
  • Posts: 11550
  • Assembler is fun ;-)
    • MasmBasic
Re: MasmBasic
« Reply #547 on: April 05, 2021, 03:14:26 AM »
Just a side note, if you don't mind me asking, are you "in the know" about - GNU gcc, Intel syntax versus AT&T syntax, Geany. The reason why I ask is that once I get relatively small and simple sounding MASM projects up and going (in RichMASM) - that I will port the code into a (other) High level language via include files but the preferred way is via gcc and at that using intel syntax (my ultimate aim, the "other" high level language occupies 99% of code but that code only does 1% of the work, the assembly code (technically not really "in-line assembly") occupies 1% of the code but does 99% of the work (and probably much faster))

That's a matter of taste. I don't like C/C++, and I can produce what I need much faster with Basic syntax. I've tried FreeBasic, but it's an awful mess of "toolchains" and "backends", and on the FB Forum 90% of the discussion is about problems compiling some code with the Gas, Gcc, whatever backend. No thanks. In Assembly, the number of instructions is limited, and the machine does exactly what I tell it to do :cool:

Try doing this in C or C++ (you can drag a .txt, .asm, .rtf or .asc file over the exe):
Code: [Select]
GuiParas equ "Controls", xr20, w500, h200, icon Info, bBlue, m7
GuiMenu equ @File, &Open, &Save, -, E&xit, @Edit, Undo, Copy, Paste
include \masm32\MasmBasic\Res\MbGui.asm
  GuiControl MyEdit, "RichEdit", wCL$()
  GuiControl MyStatus, "statusbar", "Hello"
Event Command
  If_ NotifyCode==BN_CLICKED Then SetWin$ hMyStatus=Str$("Button or menu #%i clicked at ", MenuID)+fTime$(0)
GuiEnd