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

13 lines
177 B
Plaintext

ORG RESET
mov a, #100
mov b, #10
call multiply
; at this point, the result of 100*10 = 1000 = 03e8h is stored in registers a and b
; a = e8
; b = 03
jmp $
multiply:
mul ab
ret