I guess the fastest (and shortest) way to do that on an 80x86 is:
xorl %eax,%eax
leal 4096(page_start),%esp
<repeat 1024 times>
pushl %eax
<end repeat>
Of course you will have to turn interrupts off while doing this, and
you have to save and restore %esp - but it's twice as fast as your
move-and-increment procedure (assuming that push, mov and increment
operations each take 1 clock cycle - that's what my i486 documentation
says) and takes only 1024+ bytes of code space. Your code takes at
least(?) 4 bytes of code per word cleared, assuming 32-bit protected
mode:
xorl %eax,%eax
xorl %ecx,%ecx
leal 0(page_start),%ebx
<repeat 1024 times>
movl %eax,(%ebx,%ecx,4) ! 3 bytes
incl %ecx ! 1 byte
<end repeat>
-- Michael "Tired" Riepe <riepe@ifwsn4.ifw.uni-hannover.de> "Beware the storm that gathers here!" (The Prophet's Song)