Functions in Assembly are just labeled chunks of code you jump to and return from. Since Assembly doesnβt have built-in function syntax, you manage the flow and the stack manually.
call function_name
β jump to a function and save return address on stackret
β return from function, popping the return address off the stackstack
to pass parameters and save registerspush
and pop
to save registers and local dataret
at the end of functions to return control back properly.
say_hello
. (In real code, this would print "Hello" or do work.)