Browse Prior Art Database

PASCAL to Assembler Code Interface

IP.com Disclosure Number: IPCOM000046772D
Original Publication Date: 1983-Aug-01
Included in the Prior Art Database: 2005-Feb-07
Document File: 1 page(s) / 11K

Publishing Venue

IBM

Related People

Carver, MH: AUTHOR

Abstract

This technique allows efficient interfacing of PASCAL code to existing assembly code without causing performance degradation. A new PASCAL statement is defined as follows: LINKASM lname xname, (t1(l1), ... tn(ln)), MACRO, literal; where - "lname" is PASCAL's reference to the routine - "xname" is the actual assembler routine - "t1", etc., are the types of the parameters, where VAL passes the value and VAR passes the address of the parameter. - "l1", etc., are the destination locations of the parameters (AX, BP, Stack, etc.) - "MACRO" specifies if "xname" is a macro. If blank, "xname" is a procedure. - "literal" is the string to be placed after the macro name. It may either be a literal string in quotes, or a variable of string type.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 97% of the total text.

Page 1 of 1

PASCAL to Assembler Code Interface

This technique allows efficient interfacing of PASCAL code to existing assembly code without causing performance degradation. A new PASCAL statement is defined as follows: LINKASM lname xname, (t1(l1),
... tn(ln)), MACRO, literal; where

- "lname" is PASCAL's reference to the routine

- "xname" is the actual assembler routine

- "t1", etc., are the types of the parameters, where VAL

passes the value and VAR passes the address of the

parameter.

- "l1", etc., are the destination locations of the

parameters (AX, BP, Stack, etc.)

- "MACRO" specifies if "xname" is a macro. If blank,

"xname" is a procedure.

- "literal" is the string to be placed after the macro

name. It may either be a literal string in quotes, or a

variable of string type. This parameter should be

omitted if "xname" is not a macro. All assembler routines and macros that are called in a PASCAL program must have a corresponding External Procedure declaration and a LINKASM statement, both occurring before the call to the external assembler routine. The LINKASM statement is used at compile time to build an entry in a LINK cable for the external routine. Then, when the external call is encountered at compile time, the table is used to generate the assembly code to prepare the parameters and invoke the routine. With this technique there is no performance degradation during the run time because all interfacing is prepared at compile time. The technique is simple to use, and th...