Author Topic: Things you cannot do in Assembly  (Read 1517 times)

jj2007

  • Moderator
  • Member
  • *****
  • Posts: 8435
  • Assembler is fun ;-)
    • MasmBasic
Things you cannot do in Assembly
« on: October 22, 2017, 10:28:22 AM »
... unless you install the MasmBasic library :badgrin:

To build the map example in the following post, you need MasmBasic of 26 Oct 2017 or later. Follow the instructions here.
« Last Edit: October 26, 2017, 01:24:02 PM by jj2007 »

jj2007

  • Moderator
  • Member
  • *****
  • Posts: 8435
  • Assembler is fun ;-)
    • MasmBasic
Re: Things you cannot do in Assembly
« Reply #1 on: October 22, 2017, 10:33:47 AM »
And here is the map viewer example, full source and exe attached. Extract all files to a folder and launch the exe.

To make it run properly, an instance of M$ Excel should be running. In case you don't have Office: Microsoft's free Excel Viewer works perfectly.

The map viewer example does the following in just under 100 lines of code:
- grab data from an Excel spreadsheet
- translate the data into a colour code, from green=good, yellow=medium to red=bad
- display everything as a map, including tooltips as shown below.

Tested so far on Win7-64 and Win10, grateful for feedback. Hit F1 to see the data as a list.

LiaoMi

  • Member
  • **
  • Posts: 235
Re: Things you cannot do in Assembly
« Reply #2 on: October 22, 2017, 11:21:19 AM »
... unless you install the MasmBasic library :badgrin:

Attached a beta for testing - see the map example in the following post. Follow the instructions here.

Hi Jochen,

the quick access window has a scroll bar, if you expand this window completely, it will be limited relative to the main window. If you expand the main window down and expand the quick access also down, and then return the main window back to a smaller size, in this case, quick access window is not adjusted in relation to the size of the main window. Nothing unusual so far, but if you use scrolling to the bottom, then most options, that are below the window border, are no longer visible. The main feature is that the window has already been opened in this state, i.e. without changing the window size, there is no access to the bottom lines. In the picture it can be seen in the lower right corner, the size of the slider itself is too small, because it went beyond the borders. I always have to change the window to access the bottom lines. Everything else works well! Thanks for the work!  :t


jj2007

  • Moderator
  • Member
  • *****
  • Posts: 8435
  • Assembler is fun ;-)
    • MasmBasic
Re: Things you cannot do in Assembly
« Reply #3 on: October 22, 2017, 11:36:37 AM »
Yes, some of the help entries have become too big, maybe I must limit them. But doesn't a simple right-click into the green zone close the quick access window? I use it mostly to copy code examples, it is often faster than typing it...

LiaoMi

  • Member
  • **
  • Posts: 235
Re: Things you cannot do in Assembly
« Reply #4 on: October 23, 2017, 12:56:06 AM »
But doesn't a simple right-click into the green zone close the quick access window?

So should it work? My right click does not cause any action, the quick access window is open as before. Under the quick access window, I mean a white box with a list of macros - 382 Macro total  :P

jj2007

  • Moderator
  • Member
  • *****
  • Posts: 8435
  • Assembler is fun ;-)
    • MasmBasic
Re: Things you cannot do in Assembly
« Reply #5 on: October 23, 2017, 06:50:45 PM »
There is a little misunderstanding: Normally I call your "quick access window" simply "the listbox". I saw the green background in your screenshot and thought it was the green help zone that opens when you hover over a keyword like Open and then right-click on it.

The listbox should indeed respect the main window's limits; this is corrected in the release of 23 October, thanks for the hint. Let me know if it works better now. I have also added a map example to the File/New Masm source templates, see (->sinus plot, Gdi+, maps).

LiaoMi

  • Member
  • **
  • Posts: 235
Re: Things you cannot do in Assembly
« Reply #6 on: October 23, 2017, 10:08:47 PM »
There is a little misunderstanding: Normally I call your "quick access window" simply "the listbox". I saw the green background in your screenshot and thought it was the green help zone that opens when you hover over a keyword like Open and then right-click on it.

The listbox should indeed respect the main window's limits; this is corrected in the release of 23 October, thanks for the hint. Let me know if it works better now. I have also added a map example to the File/New Masm source templates, see (->sinus plot, Gdi+, maps).

 :t Thank you, its very comfortable to work with the menu, I really like it. When the window opens for the first time, in the upper right corner there is a massive shift, the checkbox is completely hidden, for correct work it is necessary to redraw the window, I click on Restore and Maximize and the window is displayed correctly  :t



 :exclaim:


jj2007

  • Moderator
  • Member
  • *****
  • Posts: 8435
  • Assembler is fun ;-)
    • MasmBasic
Graphics demo
« Reply #7 on: October 26, 2017, 01:28:55 PM »
- download & install version 26 October 2017
- in RichMasm, select menu File/New Masm source
- in the Templates window, click on Gdi+ to the right
- hit F6 to build and see the demo below

Try sizing the application to see how the elements behave. Some are fixed, some scale proportionally to the window size, and the map is half fixed, half variable. And yes, this is by design :bgrin:

Here is the code that inserts the map:

  GuiControl Map, "canvas", x300, y640, w200+120, h150+100, +WS_THICKFRAME
  ArrayLoadMap 0, "Europe"     ; needs Europe.map and Europe.dmi

...
Event CanvasPaint
  ArrayPlot RgbCol(160,255,240)
  PaintMap RgbCol(127, 127, 127), lines=3
  ArrayPlot exit, "Europe"


The scaling is determined as follows:
Code: [Select]
x300  position the left edge at 300/1000*width of main application client area
y640  position the upper edge at 640/1000*height of main application client area
w200+120  use 200/1000 of main app client area width, plus a fixed amount of 120 pixels
h150+100  use 150/1000 of main app client area height, plus a fixed amount of 100 pixels

Let me know if there are any problems. Btw this is the first MB version that is compatible with UAsm 2.43 ;)

felipe

  • Member
  • ****
  • Posts: 826
  • Eagles are just great!
Re: Things you cannot do in Assembly
« Reply #8 on: October 26, 2017, 03:49:16 PM »
Wow jj! always working!  :t
Felipe.