[net.micro.pc] TURBO PASCAL and assembly language link ? emergent!!

wei@princeton.UUCP (P Wei) (11/19/85)

I want to write a routine in assembly language (IBM-PC running DOS2.0) and
invoke it in TURBO PASCAL. Can anyone tell me if the following is right as
soon as possible ?
In TURBO PASCAL program,
procedure routine(a, b : integer); external 'comfile.com';

The routine in assembly language :
code segment
     assume cs:code
routine  proc near
	 push bp
	 mov bp,sp
	 mov ax,[bp+4]     ;is this to get b parameter?
			   ;TURBO PASCAL pushes the parameters from left
			   ;to right. i.e. first parameter is pushed first.
			   ;Is this right ?
;
;By the way, is it typing error in the TURBO PASCAL reference manual (v.3.0),
;in the section discussing the internal data format and the external procedure,
;that says mov ax,[bp-1] will get the string length pushed onto the stack?
;Should that be mov ax,[bp+4] ?
Thanks!
HP Wei    (wei@princeton)