Function definition: Difference between revisions

Content added Content deleted
Line 139: Line 139:
mov al, 0x04
mov al, 0x04
mov bl, 0x05
mov bl, 0x05
call domultiply
call multiply
;at this point in execution, the AX register contains 0x0900.
;at this point in execution, the AX register contains 0x0900.
;more code goes here, ideally with some sort of guard against "fallthrough" into sum.
;more code goes here, ideally with some sort of guard against "fallthrough" into multiply.


; somewhere far away from start
; somewhere far away from start
multiply:
sum:
mul bl ;outputs 0x0014 to ax
mul bl ;outputs 0x0014 to ax
ret</lang>
ret</lang>