Author Topic: Fun WITH Masm  (Read 90 times)

jj2007

  • Member
  • *****
  • Posts: 7641
  • Assembler is fun ;-)
    • MasmBasic
Fun WITH Masm
« on: November 16, 2017, 09:12:26 PM »
include \masm32\include\masm32rt.inc    ; **** purest Masm32 ****
.code
WinMain proc
LOCAL msg:MSG
  include With.mac                      ; just for fun...
  With wc:WNDCLASSEX
        _ cbSize = WNDCLASSEX
        _ style = CS_HREDRAW or CS_VREDRAW or CS_OWNDC
        _ lpfnWndProc = WndProc
        _ hInstance = GetModuleHandle(0)
        _ hIcon = LoadIcon(eax, IDI_APPLICATION)
        _ hIconSm = eax                 ; the rv macro returns results in eax
        _ hCursor = LoadCursor(NULL, IDC_ARROW)         ; get a cursor
        _ hbrBackground = COLOR_BTNFACE+1
        _ lpszClassName = chr$("Masm32GUI")
  EndWith
  invoke RegisterClassEx, addr wc      ; the window class needs to be registered
...

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 4875
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Fun WITH Masm
« Reply #1 on: November 16, 2017, 09:49:53 PM »
Seems to work OK here.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :biggrin:

Vortex

  • Member
  • *****
  • Posts: 1711
Re: Fun WITH Masm
« Reply #2 on: November 17, 2017, 05:45:07 AM »
Hi Jochen,

Nice work :t  The application works fine on XP 64-bit.

jj2007

  • Member
  • *****
  • Posts: 7641
  • Assembler is fun ;-)
    • MasmBasic
Re: Fun WITH Masm
« Reply #3 on: November 17, 2017, 08:14:16 AM »
 :biggrin:

Just a demo to show what a MACRO assembler can do... I am not a fan of Visual Basic, but I always found the With command interesting.

Siekmanski

  • Member
  • *****
  • Posts: 1111
Re: Fun WITH Masm
« Reply #4 on: November 17, 2017, 08:23:42 AM »
Works OK here too.

felipe

  • Member
  • ***
  • Posts: 341
  • assemble the unassembled.
Re: Fun WITH Masm
« Reply #5 on: November 17, 2017, 08:59:30 AM »
Nice one!
 :icon14:
Felipe.