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

Main Menu

Irvine library error MASM Visual Studio 2015

Started by ISM34, October 21, 2016, 04:22:54 AM

Previous topic - Next topic



There is also the option to use a debug macro included in the MasmBasic library:

include \masm32\MasmBasic\            ; ## little demo using Kip Irvine's library with Masm32 ###
include \masm32\MasmBasic\IrvineMb\  ; needed to build Irvine's (many but not all) 32-bit examples
somevar        dd 123                        ; hit F6 to build this example
somestring     db "MasmBasic rocks", 0
someQword      dq 123456781234567890
someOword      dq 1111111122222222h, 3333333344444444h
ThisIsIrvine   db "Just to confirm that this code is really using the Irvine library", 0
  mov edx, offset ThisIsIrvine
  call WriteString
  call Crlf
  or eax, -1          ; set sign flag
  stc                 ; set carry flag
  mov eax, 11111111     ; in \Masm32\qeditor.exe, use "Project/Console build all", then "Project/Run Program"
  mov ebx, 22222222     ; in \Masm32\RichMasm\RichMasm.exe, just hit F6 (detects console mode automatically)
  mov ecx, 33333333h    ; load ecx and edx with hex values
  mov edx, 44444444h    ; see below, displayed as x:ecx, x:edx
  movups xmm0, qword ptr someQword      ; you can display qwords
  movups xmm1, oword ptr someOword
  mov esi, offset somestring      ; see $esi below
  fldpi            ; load 3.14159 into the FPU
  deb 4, "This is the output of the deb macro:", eax, ebx, x:ecx, x:edx, $esi, xmm0, x:xmm1, ST(0), $esi, flags      ; deb can display regs, variables, strings, flags, constants
  Inkey CrLf$, "bye"
end start

Just to confirm that this code is really using the Irvine library
This is the output of the deb macro:
eax             11111111
ebx             22222222
x:ecx           33333333
x:edx           44444444
$esi            MasmBasic rocks
xmm0            123456781234567890
x:xmm1          33333333 44444444 11111111 22222222
ST(0)           3.141592653589793238
$esi            MasmBasic rocks
flags:          CzSo

I attach the Irvine-specific stuff; extract to \Masm32\MasmBasic\IrvineMB


Get the Win32 help file and start reading. I could not program with out it. My editor is RADasm version . It has a simple debugger that comes in handy. For low level debugging I use Windbg or Olly. Study the examples in the masm sdk and learn how to copy and paste!