Assembly Shorts – Clearing Memory with XOR, REPNE, and STOSD

Clearing memory is a common task, whether manually done by the programmer or added by something like a compiler. In this video, we’ll explore how to clear memory using a few x86 instructions.

How to build the sample program with Visual Studio:
First, assemble with NASM:
nasm -f win32 zero_mem_xor.asm -o zero_mem_xor.obj

Then link with MSVC:
link /SUBSYSTEM:WINDOWS /ENTRY:start zero_mem_xor.obj kernel32.lib /OUT:zero_mem.exe /MACHINE:X86

Join this channel to get access to perks:
https://www.youtube.com/channel/UCI8zwug_Lv4_-KPT62oeDUA/join

Cybersecurity, reverse engineering, malware analysis and ethical hacking content!
πŸŽ“ Courses on Pluralsight πŸ‘‰πŸ» https://www.pluralsight.com/authors/josh-stroschein
🌢️ YouTube πŸ‘‰πŸ» Like, Comment & Subscribe!
πŸ™πŸ» Support my work πŸ‘‰πŸ» https://patreon.com/JoshStroschein
🌎 Follow me πŸ‘‰πŸ» https://twitter.com/jstrosch, https://www.linkedin.com/in/joshstroschein/
βš™οΈ Tinker with me on Github πŸ‘‰πŸ» https://github.com/jstrosch
🀝 Join the Discord community and more πŸ‘‰πŸ» https://www.thecyberyeti.com