CODE SEGMENT PUBLIC ASSUME CS:CODE, SS:DATA, DS:DATA extrn __eq: near extrn __ne: near extrn __le: near extrn __lt: near extrn __ge: near extrn __gt: near extrn __ule: near extrn __ult: near extrn __uge: near extrn __ugt: near extrn __lneg: near extrn __switch: near dw 0 CODE ENDS DATA SEGMENT PUBLIC dw 0 DATA ENDS CODE SEGMENT PUBLIC ASSUME CS:CODE, SS:DATA, DS:DATA PUBLIC _test1 _test1: PUSH BP MOV BP,SP ; BP is used for stack frame. ; ; arguments are on the stack, the last argument is top of the stack. ; CL: the number of arguments. ; ; top of stack ; (saved BP in called function) ; (saved PC) ; 5th argument ; 4th argument ; 3th argument ; 2th argument ; 1th argument ; bottom of stack ; ; function name is max 8 characters. MOV AX,1 PUSH AX MOV AX,2 PUSH AX MOV AX,3 PUSH AX MOV AX,4 PUSH AX MOV AX,5 PUSH AX MOV CL,5 CALL _func0000 ADD SP,10 ; AX is return value. MOV AX,12345 POP BP RET EXTRN _func0000:NEAR CODE ENDS END