WinAsm Studio, The Assembly IDE - Free Downloads, Source Code
Sponsors
Articles
Programming Quick Start
32-bit Assembler is Easy
Porting Iczelion tutorials
What is FASM
Hard Drive Recovery
Wiring your own LAN
Personal menu
Welcome Guest
User:
Pass:
Register!
Resend Validation Email
 
Forum
Pages (4) [1] 2 3 4   ( Go to first unread post )

Need a little help to send text to ebx or ecx, here is my assembly code I use to send text to ebx or ecx so that I compare the Output (hex) with (55)

q22w
Quote Post


New Member
*

Group: Members
Posts: 2
Member No.: 32803
Joined: 12-March 10


hey wasup everyone,

hummm I just wanna know how to send text to ebx or ecx... for comparing the Output((hex)) with ((55))


CODE
.386
.model flat,stdcall
option casemap:none

DlgProc proto :DWORD,:DWORD,:DWORD,:DWORD

include \masm32\include\windows.inc
include \masm32\include\user32.inc
include \masm32\include\kernel32.inc
includelib \masm32\lib\user32.lib
includelib \masm32\lib\kernel32.lib

.data
DlgName db "MyDialog",0
AppName db "Our Second Dialog Box",0

errorMsg db 'Enter One Char Only',0
error db 'Error',0
form db '%X',0

.data?
hInstance HINSTANCE ?
CommandLine LPSTR ?
buffer db 16 dup(?)
TestString db ?
buf dd ?
buf2 db ?
.const
IDC_EDIT            equ 3000
IDC_BUTTON     equ 3001
IDC_EXIT            equ 3002
IDC_EDIT2            equ 3003
IDM_GETTEXT  equ 32000
IDM_CLEAR       equ 32001
IDM_EXIT           equ 32002
 

.code
start:
   invoke GetModuleHandle, NULL
   mov    hInstance,eax
   invoke DialogBoxParam, hInstance, ADDR DlgName,NULL, addr DlgProc, NULL
   invoke ExitProcess,eax

DlgProc proc hWnd:HWND, uMsg:UINT, wParam:WPARAM, lParam:LPARAM
   .IF uMsg==WM_INITDIALOG
       invoke GetDlgItem, hWnd,IDC_EDIT
       invoke SetFocus,eax
   .ELSEIF uMsg==WM_CLOSE
       invoke SendMessage,hWnd,WM_COMMAND,IDM_EXIT,0
   .ELSEIF uMsg==WM_COMMAND
       mov eax,wParam
       .IF lParam==0
           .IF ax==IDM_GETTEXT
               invoke GetDlgItemText,hWnd,IDC_EDIT,ADDR buffer,32
               invoke MessageBox,NULL,ADDR buffer,ADDR AppName,MB_OK
           .ELSEIF ax==IDM_CLEAR
               invoke SetDlgItemText,hWnd,IDC_EDIT,NULL
           .ELSEIF ax==IDM_EXIT
               invoke EndDialog, hWnd,NULL
           .ENDIF
       .ELSE
           mov edx,wParam
           shr edx,16
           .if dx==BN_CLICKED
               .IF ax==IDC_BUTTON
-=-=-=-=-
I lost here
:coder :coder :coder :coder :coder
                   invoke GetDlgItemText,hWnd,IDC_EDIT2,addr buf,32
                    invoke lstrlen,addr buf
                    invoke wsprintf,addr buf2,addr form,buf
                   invoke SetDlgItemText,hWnd,IDC_EDIT,eax
-=-=-=-=-
               .ELSEIF ax==IDC_EXIT
                   invoke SendMessage,hWnd,WM_COMMAND,IDM_EXIT,0
               .ENDIF
           .ENDIF
       .ENDIF
   .ELSE
       mov eax,FALSE
       ret
   .ENDIF
   mov eax,TRUE
   ret
DlgProc endp
end start



,.,.,

Help plz blink.gif

PMEmail Poster
Top
ja_qwerty
Quote Post


New Member
*

Group: Members
Posts: 12
Member No.: 30162
Joined: 19-December 09


q22: hi, i can not undestend what are yu want?
hey, add your project(whole)
PMEmail Poster
Top
drax125
Quote Post


Member
**

Group: Members
Posts: 31
Member No.: 10385
Joined: 21-July 08


hi there,

look at the attachment, i made a simple program for you.
hopefully this is what your looking for.







Attached File ( Number of downloads: 9 )
 Login or Register to download
PMEmail Poster
Top
ja_qwerty
Quote Post


New Member
*

Group: Members
Posts: 12
Member No.: 30162
Joined: 19-December 09


what was you speacking for?
PMEmail Poster
Top
drax125
Quote Post


Member
**

Group: Members
Posts: 31
Member No.: 10385
Joined: 21-July 08


i that program,

you must put 1 char in string1 and string2, then press go to compare.

i didnt put any comment in the source code since it was too small and stright forward. but if you have problem on that just let me know.



PMEmail Poster
Top
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:

Topic Options Pages (4) [1] 2 3 4  Reply to this topicStart new topicStart Poll

 

Sponsors
Computer Science

Internet
C/C++
Hardware & PC maintenance

HiEditor

General Discussions
Suggestions/Bug Reports
WinAsm Studio

General Discussions
Suggestions/Bug Reports
WinAsm Studio FAQ
Multilingual User Interface
Add-Ins
Assembly Programming

Main
Newbies
Projects
Custom Controls
Snippets
Announcements & Rules

Announcements

General

Online Degrees - Distance Learning
The Heap
Russian
Google