RosettaCodeData/Task/Function-definition/8086-Assembly/function-definition.8086

12 lines
280 B
Plaintext

start:
mov al, 0x04
mov bl, 0x05
call multiply
;at this point in execution, the AX register contains 0x0900.
;more code goes here, ideally with some sort of guard against "fallthrough" into multiply.
; somewhere far away from start
multiply:
mul bl ;outputs 0x0014 to ax
ret