flat assembler
Message board for the users of flat assembler.
Index
> Windows > inifile without sections |
Author |
|
MHajduk 30 Aug 2010, 20:41
I guess that this topic may be interesting to you.
You can also write some text parser by yourself eventually. |
|||
30 Aug 2010, 20:41 |
|
semiono 30 Aug 2010, 21:12
|
|||
30 Aug 2010, 21:12 |
|
MHajduk 30 Aug 2010, 21:26
Ну чтож... выбери наиболее подходящий вариант.
Well... choose the solution most suitable to your needs. |
|||
30 Aug 2010, 21:26 |
|
semiono 31 Aug 2010, 10:27
+1 english only available on the forum )))
Something i need above... I need to load strings per number from a file and keep string to buffer for compare it... Something exist to loads strins? api or asm?... invoke StringNumber,eax,5,NULL |
|||
31 Aug 2010, 10:27 |
|
MHajduk 31 Aug 2010, 11:04
fscanf from 'MSVCRT.DLL'.
|
|||
31 Aug 2010, 11:04 |
|
semiono 31 Aug 2010, 14:22
Until I decided to create one hard to replace file.
Code: invoke ExpandEnvironmentStrings,'%UserProfile%\SciTE.session',bFile,MAX_PATH invoke CreateFile,bFile,GENERIC_WRITE,FILE_SHARE_WRITE,NULL,CREATE_ALWAYS,FILE_ATTRIBUTE_ARCHIVE,NULL mov [hFile],eax invoke WriteFile,[hFile],p1,68,node,NULL invoke GetSystemMetrics,SM_CXSCREEN invoke wsprintf,x,'%d',eax invoke SetFilePointer,[hFile],68,NULL,NULL invoke WriteFile,[hFile],x,4,node,NULL invoke SetFilePointer,[hFile],72,NULL,NULL invoke WriteFile,[hFile],p2,17,node,NULL invoke GetSystemMetrics,SM_CYSCREEN sub eax,52 invoke wsprintf,y,'%d',eax invoke SetFilePointer,[hFile],89,NULL,NULL invoke WriteFile,[hFile],y,3,node,NULL invoke SetFilePointer,[hFile],92,NULL,NULL invoke WriteFile,[hFile],p3,22,node,NULL invoke CloseHandle,[hFile] section '.data' readable p1 db '# SciTE session file',10,10,'position.left=0',10,'position.top=0',10,'position.width=' p2 db 10,'position.height=' p3 db 10,'position.maximize=0',10,10 section '.data' readable writable bFile db ? hFile dd ? lpDir db ? node dd ? x dd ? y dd ? I found that '?' data must be into separated section that not be overlaped with constant data. I don't know it early. )) 1. what is need to say strongly size to node ? I don't know SM_CXSCREEN realy width 800[] or 2048 returned gluck: Quote: position.width=800[] 2. Is it possible to write GetSystemMetrics() ahead code and WriteFile() functions below? Something in eax > x i have losted... Maybe this need to use locals .. endl ? 3. and this Mac stile 0a not 0d 0a!... Cool? )) --- fscanf from 'MSVCRT.DLL'. This is great! Thanks allways! |
|||
31 Aug 2010, 14:22 |
|
bitRAKE 31 Aug 2010, 17:24
wsprintf will return number of characters.
Code: cinvoke wsprintf,y,'%d',eax invoke WriteFile,[hFile],y,eax,node,NULL . . . y rb 1024 ; max buffer Last edited by bitRAKE on 02 Sep 2010, 01:45; edited 1 time in total |
|||
31 Aug 2010, 17:24 |
|
semiono 31 Aug 2010, 20:37
Thanks!
Code: .. invoke GetSystemMetrics,SM_CYSCREEN sub eax,52 ; task bar size invoke wsprintf,y,'%d',eax ; y rb 1024 accepted! invoke SetFilePointer,[hFile],89,NULL,NULL invoke WriteFile,[hFile],y,eax,node,NULL add eax,89 ; correct text position invoke SetFilePointer,[hFile],eax,NULL,NULL invoke WriteFile,[hFile],p3,22,node,NULL invoke CloseHandle,[hFile] ... nothing good |
|||
31 Aug 2010, 20:37 |
|
semiono 31 Aug 2010, 20:55
offtop:
FasmDir\include\const.inc: Code: HKCU equ HKEY_CURRENT_USER HKLM equ HKEY_LOCAL_MACHINE @CR db 13 @LF db 10 Where is i need to include this to win32ax.inc includes ? I'm lazy to write it to every my program. This is bug - Code: ; Extended Win32 programming headers (ASCII) include 'win32a.inc' include 'const.inc' include 'macro/if.inc' Why? I'm sorry for I try modify fasm original distributive! |
|||
31 Aug 2010, 20:55 |
|
revolution 31 Aug 2010, 23:35
semiono wrote: FasmDir\include\const.inc: Code: @CR = 13 @LF = 10 |
|||
31 Aug 2010, 23:35 |
|
Alphonso 01 Sep 2010, 06:32
bitRAKE, did you mean to use cinvoke with wsprintf or to manually adjust the stack?
|
|||
01 Sep 2010, 06:32 |
|
semiono 01 Sep 2010, 22:51
today is really popular xml format, what is engine to invoked to software to set fields in file programly?
WritePrivateProfileString() for xml ? |
|||
01 Sep 2010, 22:51 |
|
bitRAKE 02 Sep 2010, 01:44
Alphonso wrote: bitRAKE, did you mean to use cinvoke with wsprintf or to manually adjust the stack? _________________ ¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup |
|||
02 Sep 2010, 01:44 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.