RosettaCodeData/Task/Call-a-function/8086-Assembly/call-a-function-2.8086
2023-07-01 13:44:08 -04:00

10 lines
241 B
Text

push ax ;second argument
push bx ;first argument - typically arguments are pushed in the reverse order they are listed.
call foo
pop bx
pop ax
foo:
push bp
mov bp,sp
;now bp+4 = the value pushed from BX, and bp+6 = the value pushed from AX