page,132
name inport_code
title inport.asm :  msb-work-2
;
;
COMMENT   *  PROCEDURE TO GET THE VALUE OF A REQUESTED PORT WHEN CALLED
             FROM PASCAL ROUTINE.  THE VALUE RETURNED IS RETURNED THRU
             AL DIRECTLY FROM STACK CONTENTS.
          *
;
inport_code   segment  para public 'code'
              assume    cs:inport_code
              public    inport
inport        proc      far                 ;all externals are far
              push      bp                  ;retain the old base pointer
              mov       bp,sp               ;get the stack address
              mov       dx,[bp]+6           ;get requested port number from stack
              in        al,dx               ;interrogate the port
              pop       bp                  ;restore the old base pointer
              ret       2                   ;clean up the stack
inport        endp
inport_code   ends
 end
;
   lineptr     =   ^lineptrnode;
   lineptrnode =   record
       length  :   0 .. 