Update assembly x86 safety example

This commit is contained in:
dwrz
2026-10-27 12:41:07 +00:00
parent 9c947ed91e
commit 06a0189e2e
+2 -2
View File
@@ -7,7 +7,7 @@ juliet:
stop: stop:
# Try changing this number. What happens? Why? # Try changing this number. What happens? Why?
# Hint: try 0, 1, 11, 12, 21, 22. # Hint: try 0, 1, 11, 12, 21, 22.
.int 11 .int 12
.text .text
.global _start .global _start
@@ -23,7 +23,7 @@ _start:
# Setup. # Setup.
lea romeo, %rax # Load the starting address of string into %rax. lea romeo, %rax # Load the starting address of string into %rax.
mov $0xb98c9ff0, %ebx # 🌹 = b98c9ff0 (4 bytes) mov $0xb98c9ff0, %ebx # 🌹 = b98c9ff0 (4 bytes)
mov $0, %rcx # Set the intial counter. mov $0, %rcx # Set the initial counter.
# Overwrite the strings with 🌹. # Overwrite the strings with 🌹.
# Increment the address in %rax by four bytes on each iteration. # Increment the address in %rax by four bytes on each iteration.