Programming Examples

4. Demonstrating the Procedure Calling Convention

Assembly Program Listing

;Assembler Module that passes results back to C driver module

myfeat .EQU 000

success .EQU -9

.CODE

.IMPORT errorcount,DATA

.SUBSPA $CODE$

.EXPORT feat000,ENTRY

.PROC

.CALLINFO

feat000 .ENTER

LDI 0,ret0

COMIB,<> myfeat,arg0,exit

NOP

LDI success,ret0

exit .LEAVE

.PROCEND

.END

Chapter 7

137

Page 137
Image 137
HP UX Developer Tools manual Assembly Program Listing