Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site princeton.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!princeton!wei From: wei@princeton.UUCP (P Wei) Newsgroups: net.micro.pc Subject: TURBO PASCAL and assembly language link ? emergent!! Message-ID: <1164@princeton.UUCP> Date: Tue, 19-Nov-85 11:51:29 EST Article-I.D.: princeto.1164 Posted: Tue Nov 19 11:51:29 1985 Date-Received: Wed, 20-Nov-85 08:23:16 EST Distribution: net Organization: Princeton University EECS Dept Lines: 23 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)