The MASM Forum Archive 2004 to 2012
Welcome, Guest. Please login or register.
June 04, 2023, 11:40:41 AM

Login with username, password and session length
Search:     Advanced search
128553 Posts in 15254 Topics by 684 Members
Latest Member: mottt
* Home Help Search Login Register
+  The MASM Forum Archive 2004 to 2012
|-+  General Forums
| |-+  The Laboratory (Moderator: Mark_Larson)
| | |-+  ZEROLOCALS
« previous next »
Pages: 1 [2] Print
Author Topic: ZEROLOCALS  (Read 15479 times)
dedndave
Member
*****
Posts: 12523


Re: ZEROLOCALS
« Reply #15 on: December 15, 2009, 02:40:35 PM »

push is pretty fast....

        mov     ecx,LocalsQty
        xor     eax,eax

ZeroLs: dec     ecx
        push    eax
        jnz     ZeroLs

and only 11 bytes i think   Cool
Logged
Ficko
Member
*****
Posts: 305


Re: ZEROLOCALS
« Reply #16 on: December 15, 2009, 02:48:34 PM »

I gues we need a subsection for MACROs for easier look up. Roll Eyes

Hutch I really mean it.

There are 1000 of usefull - or not  Tongue - macros scattered all over the forum and since MASM is a (MACRO)ASM I think it would deserve a MACROs section.
Logged
hutch--
Administrator
Member
*****
Posts: 12013


Mnemonic Driven API Grinder


Re: ZEROLOCALS
« Reply #17 on: December 15, 2009, 03:37:40 PM »

You have, its called the Laboratory.  BigGrin
Logged

Regards,



Download site for MASM32
http://www.masm32.com
Ficko
Member
*****
Posts: 305


Re: ZEROLOCALS
« Reply #18 on: December 15, 2009, 04:25:46 PM »

You have, its called the Laboratory. BigGrin

Very funy.  green2

Why won't admit you just hate macros!?  tgrin
Logged
dedndave
Member
*****
Posts: 12523


Re: ZEROLOCALS
« Reply #19 on: December 15, 2009, 04:37:09 PM »

Quote
You have, its called the Laboratory.

lol - you hafta get up pretty early to make Hutch do a bunch of un-scheduled stuff   lol
it has little to do with his like/dislike of macros
you know what they say, "Want in one hand, ...... See which one fills up faster."
Logged
jj2007
Member
*****
Gender: Male
Posts: 6011



Re: ZEROLOCALS
« Reply #20 on: December 15, 2009, 05:29:36 PM »

You have, its called the Laboratory. BigGrin

Why won't admit you just hate macros!?  tgrin

You are barking at the wrong tree. Hutch has provided an awful lot of very good macros, see \masm32\mtacros\macros.asm
Re Zerolocales ot ClearLocals or whatever, that has been bashed to death already. My link points to a 19 byte proc that requires a 5 byte call and no hand-made counting how many bytes need to be cleared. It's a matter of taste...
Logged

Ficko
Member
*****
Posts: 305


Re: ZEROLOCALS
« Reply #21 on: December 15, 2009, 07:00:33 PM »

?#!?*%&§...

Did I stept on your precious toes jj ?

I was just teasing him. wink
Logged
jj2007
Member
*****
Gender: Male
Posts: 6011



Re: ZEROLOCALS
« Reply #22 on: December 15, 2009, 07:36:48 PM »

?#!?*%&§...

Did I stept on your precious toes jj ?

I was just teasing him. wink

Oops, I thought you were serious - apologies Roll Eyes
Logged

Pages: 1 [2] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP The MASM Forum Archive 2004 to 2012 | Powered by SMF 1.0.12.
© 2001-2005, Lewis Media. All Rights Reserved.
Valid XHTML 1.0! Valid CSS!