News:

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

Main Menu

MasmBasic

Started by jj2007, May 23, 2012, 10:16:07 PM

Previous topic - Next topic

jj2007

Version 27.10.2020:
- bugfix: ArrayStripDuplicates could set a faulty last value
- new: ArrayMinMax myarray(), minVar, maxVar (i.e. you can now specify two destination variables)
- new: AddFloat, e.g. SetFloat myRealX=123.456, AddFloat myRealX=[any immediate number or numeric variable]
- ArraySet accepts now variables, e.g. ArraySet xyarray() As REAL4=maxDate, 0.0, minDate, ecx

Finally, RichMasm's layout improved slightly: the pinboard has moved to the upper right corner, as shown below (this is the proc called by GuiImage - a bit over 350 lines).


xandaz

  MasmBasic gives net error when downloading. can someone give me a valid linlk?

jj2007

http://masm32.com/board/index.php?topic=94.0 doesn't work for you? I just tested it, everything works as it should...

jj2007

I found lovely music that doesn't distract me from coding: The Russian Guitars 1800-1850

hutch--

Nice track, like it.

2B||!2B

jj,

The new update seems to give errors about unresolved externals. Why?
MasmBasic.lib(LibTmpAC.obj) : error LNK2019: unresolved external symbol _CreateFontIndirectA@4 referenced in function _MbCloseN@0
MasmBasic.lib(LibTmpAC.obj) : error LNK2019: unresolved external symbol _GetOpenFileNameA@4 referenced in function _MbCloseN@0
MasmBasic.lib(LibTmpAC.obj) : error LNK2019: unresolved external symbol _GetOpenFileNameW@4 referenced in function _MbCloseN@0
MasmBasic.lib(LibTmpAC.obj) : error LNK2019: unresolved external symbol _GetSaveFileNameA@4 referenced in function _MbCloseN@0
MasmBasic.lib(LibTmpAC.obj) : error LNK2019: unresolved external symbol _GetSaveFileNameW@4 referenced in function _MbCloseN@0
MasmBasic.lib(LibTmpAC.obj) : error LNK2019: unresolved external symbol _SHBrowseForFolderA@4 referenced in function _MbCloseN@0
MasmBasic.lib(LibTmpAC.obj) : error LNK2019: unresolved external symbol _SHGetPathFromIDListA@8 referenced in function _MbCloseN@0
MasmBasic.lib(LibTmpAC.obj) : error LNK2019: unresolved external symbol _CoTaskMemFree@4 referenced in function _MbCloseN@0
MasmBasic.lib(LibTmpAB.obj) : error LNK2019: unresolved external symbol _StdOut@4 referenced in function _TestRetVal@0


Also, how can i redim an array that has been allocated by Dim?

Example:
Dim My$(999) As DWORD
Dim My$(new:1234)


Errors
Error A2102: Symbol not defined : new
The documentation is so confusing.

jj2007

Quote from: 2B||!2B on December 07, 2020, 05:45:16 PM
The new update seems to give errors about unresolved externals. Why?

I've just downloaded the installer, and used it on a "virgin" Masm32 installation. Everything works fine... did you modify any Masm32 files? Does it work now, if yes: what did you change? I am curious what could be the cause, as I cannot reproduce this problem.

QuoteAlso, how can i redim an array that has been allocated by Dim?

Example:
Dim My$(999) As DWORD
Dim My$(new:1234)


Errors
Error A2102: Symbol not defined : new

When you add As DWORD, MasmBasic assumes you want a numeric array. I will add an error message to catch this :cool:

include \masm32\MasmBasic\MasmBasic.inc
  Init
  Dim MyDouble() As REAL8 ; a numeric array
  Dim My$() ; a string array
  For_ ecx=0 To 9
Let My$(ecx)=Str$("This is string #%i", ecx) ; assign strings
  Next
  For_ ecx=0 To 9
PrintLine "[", My$(ecx), "]" ; display them
  Next
  Dim My$(new:99)
  Print Str$("The new array has %i elements\n", My$(?))
  For_ ecx=0 To 9
PrintLine "[", My$(ecx), "]" ; empty strings
  Next
EndOfCode


QuoteThe documentation is so confusing.

Sorry for that... I'm not very good at writing help files, I know. Just ask if you run into a problem.

jj2007

Quote from: 2B||!2B on December 07, 2020, 05:45:16 PM
The new update seems to give errors about unresolved externals. Why?
MasmBasic.lib(LibTmpAC.obj) : error LNK2019: unresolved external symbol _CreateFontIndirectA@4 referenced in function _MbCloseN@0 ...

Does anybody else have such problems? I can't reproduce it here...

Today's update simplifies the re-dimensioning of string arrays:
include \masm32\MasmBasic\MasmBasic.inc ; download
  Init
  Dim My$() ; create a string array
  For_ ecx=0 To 99
Let My$(ecx)=Str$("String #%i", ecx)
  Next
  Print Str$("This array has %i elements\n", My$(?))
  Dim My$() ; re-dim it
  For_ ecx=0 To 9
Let My$(ecx)=Str$("New string #%i", ecx)
  Next
  Inkey Str$("The new one has %i elements\n", My$(?))
EndOfCode


Output:
This array has 100 elements
The new one has 10 elements


Attached the demo, but with code for a two-dimensional string array

2B||!2B

Hi JJ,

Sorry for the late reply. Yes, i modded some masm32 inc files to remove the duplicate of include of files.
I think that is the cause of this issue. But previous version(not sure which one i currently use as i have no idea how to get the version) is working.

jj2007

Quote from: 2B||!2B on December 15, 2020, 03:45:43 PM
Hi JJ,

Sorry for the late reply. Yes, i modded some masm32 inc files to remove the duplicate of include of files.
I think that is the cause of this issue. But previous version(not sure which one i currently use as i have no idea how to get the version) is working.

That is generally not a good idea, as you are no longer compatible with anybody else in the forum. And to my knowledge, duplicates of include files were never an issue, neither for MasmBasic nor for plain Masm32 SDK code (it shows in the output window if there are any duplicates).

As to the version: all files have a date+time stamp.

Richard

Just installed SetUpMasmBasic18Feb2021

My computer has a 3200 x 1800 native display (15 inch) and because many applications require the High DPI resolution - I have to set Windows 10 scaling to 100% (default is 200%).

However, now all the text is "half height" (compared to a standard display)!

The usual windows [Ctrl] +  does not work here to increase text size, and using [Windows Key] + is a "pain" to keep on doing. Because I have applications running in the background needing scaling 100, I do not constantly want to switch scaling 100 to 200 and vice versa.

Any way to increase text size for the IDE etc?

jj2007

Quote from: Richard on March 27, 2021, 04:48:14 AMAny way to increase text size for the IDE etc?

Hi Richard,

Hold Control and move the mouse wheel forward. When you are ok with the font, press Alt Z.

Note this is not possible with the system font; if you encounter a template with that font, press Ctrl A to select everything, then go to the menu "Edit & Format" and select "Proportional". Let me know if it works, please :cool:

Richard

@jj2007

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)



Problems I have are that

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

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

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)


jj2007

Quote from: Richard on March 27, 2021, 06:33:24 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.

Quotethe 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?

Quoteonce 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.

Quotethere 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

@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.