Learning assembly and 'am trying to move from 16-bit to 32-bit.
i have this assembly code to display a string in a message box.

;tasm32/tlink32
.386
      .model flat
      extrn  MessageBoxA:proc
      extrn ExitProcess:proc

.data
      head  db  " 'Heard melodies are sweet,",0
      body  db  " but those unheard Are sweeter;'",0

.code
      begin:
      push 0
      push offset head
      push offset body
      push 0
      call MessageBoxA
      
      push 0
      call ExitProcess
end begin

How do i get the very string displayed in command line without using the api MessageBoxA ; what would be the assembly code like? Please give a suggestion, probably i could get going from there.
thank you.

If I'm understanding you correctly you just want to print the string to command line without using the o/s api MessageBox?
Well let's see you could use the interrupt interface; a quick google search for dos print interrupt or the like should lead you to a multitude of tutorials.
You could also just print directly into the video buffer, once again lots of tutorials available and will take a little bit more thinking on your part.

If I'm understanding you correctly you just want to print the string to command line without using the o/s API MessageBox?
Well let's see you could use the interrupt interface

int 21h DOS interrupt, displays a message on the screen out of a .com file.

org 100h
   mov ah, 9h
   mov dx, offset msg
   int 21h
   msg db "Thanks you... $"

if you imply the above DOS Function Code pattern by the term ’interrupt interface‘ , iam afraid, that, they are/may not be compatible with 32-bit programming environment; also with processor .386 (as specified as the directive in the code).

However, i thank you for taking the time to respond to my uncertainty.

Regards…

Evenbit..

i haven’t tried to do it yet...but 'am more or less certain the direction, that you have pointed out, is the right one with those helpful links and suggestions passed on.
Thank you.
regards...

MosaicFuneral...

The accompanying information you have provided is appreciated and
such useful additional tips make learning more meaningful and satisfying.

After crossing this initial barrier, i like to go to ‘find matching file’.
Thank you.

regards...

This article has been dead for over six months. Start a new discussion instead.