News:

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

Main Menu

Recent posts

#1
The Workshop / Re: Looking for MASM feature p...
Last post by fearless - Today at 01:52:46 PM
I think it was https://bytepointer.com

But seems to be down, the last snapshot on the wayback machine is this one:

https://web.archive.org/web/20240623141221/https://bytepointer.com/masm/index.htm
#2
The Workshop / Looking for MASM feature per v...
Last post by Shintaro - Today at 09:31:45 AM
Hi,

There was a website that showed the different releases of MASM and when the feature/keyword was released.

For the life of me I cannot find that website.

Does anyone know it?

Cheers.
#3
UASM Assembler Development / Re: Linux users, please
Last post by NoCforMe - Today at 05:24:45 AM
Quote from: daydreamer on June 20, 2025, 04:42:14 PMCross platform, wrapper functions
Like proc with winapi function names,inside is invoke to Linux same function?
Or the other way around?

You're asking about the package I wrote?
None of the above; it was just an overlay for DOS programs that gave you a text-based windowed interface.
#4
UASM Assembler Development / Re: Linux users, please
Last post by daydreamer - Today at 05:01:56 AM
The only "multitasking" in oldest computers was main basic program, while machine code snippet was setup as vblank retrace interrupt
Inspired me to setup wm_timer 1/30 second for game / animation physics + start wm_paint message

#5
UASM Assembler Development / Re: Linux users, please
Last post by TimoVJL - Today at 01:27:56 AM
linux have wine libs for common Win32 API

A IBM TopView had rival:
DESQview
#6
The Campus / Re: Nested .REPEAT, .IF and .W...
Last post by _japheth - Today at 12:14:41 AM
Hi,

GOTO is an "assembly-time" jump, accepted inside macros only, and probably only useful if combined with conditional assembly instructions ( IF, ELSE [note the missing "dot"]).
That's supposedly not at all what you did want to do!? A simple JMP should work better.
#7
ObjAsm / Re: UTF8 performance
Last post by Biterider - June 20, 2025, 11:15:27 PM
Hi
I had to write a procedure to determine the required buffer size in advance when converting from UTF-8 to wide characters.
The code is essentially a stripped-down version of the code used for the conversion.

; --------------------------------------------------------------------------------------------------
; Procedure:  UTF8ToWideSize
; Purpose:    Calculate the amount of memory needed to store the converted WIDE string from a
;             UTF8 stream.
; Arguments:  Arg1: -> Source UTF8 BYTE stream. Must be zero terminated.
; Return:     eax = Number of BYTEs requred. Zero if failed.
; Notes:      The ZTC is always included in size calculations.
;             The returned value can only be zero if the procedure fails.

.code
align ALIGN_CODE
UTF8ToWideSize proc pSource:POINTER
  ?mov ecx, pSource
  xor eax, eax

@@NextChar:
  movzx edx, BYTE ptr [xcx]
  test edx, edx                                           ;ZTC?
  .if ZERO?
    add eax, sizeof(WORD)                                 ;ZTC
    ret
  .endif

  test edx, 10000000y
  .if ZERO?
    ;1 Byte encoding (0xxxxxxx)
    add eax, sizeof(WORD)
    inc xcx
    jmp @@NextChar
  .endif

  and edx, 11111000y
  .if edx == 11110000y                                   ;11110xxx
    ;4 Byte encoding (11110xxx 10xxxxxx 10xxxxxx 10xxxxxx)
    add eax, sizeof(WORD)
    add xcx, 4*sizeof(BYTE)
    jmp @@NextChar
  .endif

  and edx, 11110000y
  .if edx == 11100000y                                   ;1110xxxx
    ;3 Byte encoding (1110xxxx 10xxxxxx 10xxxxxx)
    add eax, sizeof(WORD)
    add xcx, 3*sizeof(BYTE)
    jmp @@NextChar
  .endif

  and edx, 11100000y
  .if edx == 11000000y                                   ;110xxxxx
    ;2 Byte encoding (110xxxxx 10xxxxxx)
    add eax, sizeof(WORD)
    add xcx, 2*sizeof(BYTE)
    jmp @@NextChar
  .endif

  xor eax, eax                                          ;Conversion error
  ret
UTF8ToWideSize endp

Biterider
#8
UASM Assembler Development / Re: Linux users, please
Last post by FORTRANS - June 20, 2025, 10:09:18 PM
Hi,

Quote from: NoCforMe on June 19, 2025, 09:37:21 AMI had never heard of that,

   Ah, well it was fairly short lived, I suppose.  But it was fun to
try it out.

Quotebut yeah, like that. Except that it wasn't anything like a multi-user multitasking "environment", just an overlay on top of DOS programs. It sure looked like the screenshots of the IBM thing, though.

   Well, I was wondering about that.  Nice to hear about it.

Thanks,

Steve N.
#9
The Campus / Re: Nested .REPEAT, .IF and .W...
Last post by Quan - June 20, 2025, 07:18:14 PM
Adding to this, I'm essentially trying to replicate this chunk of code in a macro so I can use it multiple times.
xor eax, eax
mov esi, offset strHW
loop_start:
inc eax
mov edi, offset strHW + 5
add esi, eax
xor ecx, ecx
add ecx, 11
cld
repe cmpsb
jz found

cmp eax, 10
jne loop_start

found:
mov ebx, -1
Is anything I'm doing wrong or unconventional?

EDIT: Minor, unrelated logic error, cmp instruction at the end of the loop is supposed to compare eax with 10, not ecx with 10.
#10
The Campus / Nested .REPEAT, .IF and .WHILE...
Last post by Quan - June 20, 2025, 07:12:40 PM
I have this simple programme here
include \masm32\include\masm32rt.inc

testing MACRO
xor eax, eax
mov esi, offset strHW
.REPEAT
inc eax
mov edi, offset strHW + 5
add esi, eax
xor ecx, ecx
add ecx, 11
cld
repe cmpsb
.IF !ZERO?
GOTO found
.ENDIF

.UNTIL eax == 10
:found
mov ebx, -1
ENDM

.data
data_start EQU $

strHW db 'Hello World!', 0
    strQuery db 'test32.exe', 0
   
.code
start:
testing

push 0
call ExitProcess
end start
and I'm getting this error here.
C:\3\test.asm(35) : fatal error A1010:unmatched block nesting : .if-.repeat-.while

I think my syntax is correct. Am I missing something? Or .if being nested in .repeat is not allowed?

EDIT: The condition in .UNTIL is supposed to be eax == 10 and not ecx == 10. The same error is still produced after this edit.