home *** CD-ROM | disk | FTP | other *** search
-
- ; ============================================================
- ; External predicate module. Predicate x@ takes from the PDL
- ; the address of a table containing entry points of predicates
- ; of the form x<char>, where <char> is a character between the
- ; exclamation point (!) and the tilde (~).
- ;
- ; LIB86 - Copyright (c) 1985
- ;
- ; [Gerardo Cisneros, 29 June 1985]
- ;
- ; 29 Jul 85 - x@ to set up table start - GCS
- ; ===========================================================
-
- LIBP: pop bx ;get pointer to argument of x
- mov al,cs:[bx] ;get the character
- inc bx ;update address for return
- push bx ;back on the stack
- cmp al,'@' ;special treatment for x@
- jnz xx1 ;jump through table if not @
- mov bx,PX ;get pointer to PDL arg
- mov ax,[bx] ;load the argument
- mov cx,PY
- sub cx,bx ;determine its size
- call UCL ;lift before proceeding
- cmp cx,2 ;address is new table base
- jz xx2 ;else assume a single byte
- xx1: cmp al,07FH ;larger than tilde?
- jnc lbt ;noop and true if so
- sub al,'!' ;prepare table index
- jc lbt ;noop and true if control char or space
- add al,al ;twice is index
- mov ah,0
- mov bx,SBT ;start of subroutine table
- mov di,ax
- jmp word ptr [bx+di] ;go do it
-
- xx2: mov SBT,ax ;set up new table start
- lbt: jmp SKP ;exit true
-
- ; end