flat assembler
Message board for the users of flat assembler.
Index
> Tutorials and Examples > Personal Developments |
| Author |
|
|
AsmGuru62 15 Dec 2025, 13:51
Very nice looking code!
Especially, I like how you use blank lines. I do that too. |
|||
|
|
FoXx 15 Dec 2025, 14:06
AsmGuru62 wrote: Very nice looking code! Thank you Blank lines separate code into blocks. I follow certain rules in my procedures. My principle is to use registers as often as possible. This speeds up my procedures. |
|||
|
|
FoXx 15 Dec 2025, 14:32
Useful command line splitting procedure.
Applied after the call [GetCommandLine] Code: ;------------------------------------------------ ; * * * Get paramameters of string ;------------------------------------------------ proc GetParamComnandLine ; mov EDI, TableParamameters ; mov ESI, szComnandLine mov EBX, EDI .scan: lodsb cmp AL, '"' je skip cmp AL, "'" je skip dec ESI mov AL, ' ' @@: mov DL, AL mov EAX, ESI stosd @@: lodsb cmp AL, ' ' jb .end cmp AL, DL jne continue mov EDX, ESI dec ESI xor EAX, EAX mov [ESI], AL mov ESI, EDX @@: lodsb cmp AL, ' ' jb .end je continue dec ESI jmp .scan .end: mov ECX, EDI xor EAX, EAX stosd dec ESI mov [ESI], AL mov EAX, ECX sub EAX, EBX shr EAX, 2 ; count of paramameters ret endp |
|||
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.