flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
sina 15 Dec 2003, 21:19
hi i am trying to write something like this
the program will open the text file containing lines like Code: H = 1 0 = 16 and then in the dialog's edit box i am going to write H20 (water molecule) and the program will calculate the mass (2xh + 0) and print it on a static (18g ![]() but now i am in the beginning and dealing to open the file including the constant masses Code: data_file file 'data.txt' data_file_handle dd ? section '.code' code readable executable start: invoke GetModuleHandle,0 invoke DialogBoxParam,eax,37,HWND_DESKTOP,DialogProc,0 or eax,eax jz exit exit: invoke ExitProcess,0 proc DialogProc,hwnddlg,msg,wparam,lparam enter push ebx esi edi cmp [msg],WM_COMMAND je wmcommand cmp [msg],WM_CLOSE je wmclose xor eax,eax jmp finish wmcommand: cmp [wparam],ID_Close je wmclose jmp processed wmclose: invoke _lclose,[data_file_handle] invoke EndDialog,[hwnddlg],0 read: invoke OpenFile,data_file,0,OF_READ mov [data_file_handle],eax processed: mov eax,1 finish: pop edi esi ebx return this crashes when exited i think there are lots of imaginary things i have tried here ![]() some help needed ( at least just show me the way ) for example getting one line of code or one character with readfile and putting it into static control will be great please dont get rid of this newbie ![]()
|
|||||||||||
![]() |
|
comrade 15 Dec 2003, 21:35
API you use is obsolete. Use CreateFile, ReadFile, WriteFile, CloseHandle.
|
|||
![]() |
|
sina 17 Dec 2003, 22:11
ok i just looked at fresh strlib anf file procs and i am ok now
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.