1 Replies - 529 Views - Last Post: 15 September 2018 - 03:15 PM

#1 help3791694   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 14-September 18

how can i change the display into dialog input box instead of cmd?

Posted 14 September 2018 - 10:25 PM

TITLE my program (Exercise6.asm)

INCLUDE irvine32.inc
INCLUDE Macros.inc

.data
str1 BYTE "Enter two integers: ", 0
str4 BYTE "The highest integer: ", 0dh, 0ah, 0
str6 BYTE "The smallest integer: ",0dh, 0ah, 0

arrInt DWORD 2 dup(?)
arrLen = LENGTHOF arrInt

.code
main PROC
call getIntUser
call Crlf
call printInt
call Crlf
exit
main ENDP

getIntUser PROC
mov ecx, arrLen
mov edx, OFFSET str1
mov esi, OFFSET arrInt
L1: 
   call WriteString
   call ReadInt
   mov [esi], eax
   add esi, TYPE arrInt
   loop L1
   ret
getIntUser ENDP

printInt PROC
mov ecx, arrLen
mov esi, OFFSET arrInt

mov eax, [esi]
add esi, TYPE arrInt
mov ebx, [esi]
.IF eax > ebx
mov edx, OFFSET str4
call WriteString
call WriteDec
call Crlf
mov edx, OFFSET str6
call WriteString
mov eax, ebx
call WriteDec

.ELSE
xchg eax, ebx
mov edx, OFFSET str4
call WriteString
call WriteDec
call Crlf
mov edx, OFFSET str6
call WriteString
mov eax, ebx
call WriteDec
.ENDIF

ret
printInt ENDP

END main




Is This A Good Question/Topic? 0
  • +

Replies To: how can i change the display into dialog input box instead of cmd?

#2 no2pencil   User is offline

  • Professor Snuggly Pants
  • member icon

Reputation: 6824
  • View blog
  • Posts: 31,469
  • Joined: 10-May 07

Re: how can i change the display into dialog input box instead of cmd?

Posted 15 September 2018 - 03:15 PM

Not sure if you just expect that someone is going to code this for you, but you should probably use the Windows API for dialog boxes.
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1