home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / MISC / REC.ZIP / LIB86F.ASM < prev    next >
Encoding:
Assembly Source File  |  1985-07-30  |  1.4 KB  |  42 lines

  1.  
  2. ;    ============================================================
  3. ;    External predicate module.  Predicate x@ takes from the PDL
  4. ;    the address of a table containing entry points of predicates
  5. ;    of the form x<char>, where <char> is a character between the
  6. ;    exclamation point (!) and the tilde (~).
  7. ;
  8. ;        LIB86 - Copyright (c) 1985
  9. ;
  10. ;        [Gerardo Cisneros, 29 June 1985]
  11. ;
  12. ;    29 Jul 85 - x@ to set up table start - GCS
  13. ;    ===========================================================
  14.  
  15. LIBP:    pop    bx        ;get pointer to argument of x
  16.     mov    al,cs:[bx]    ;get the character
  17.     inc    bx        ;update address for return
  18.     push    bx        ;back on the stack
  19.     cmp    al,'@'        ;special treatment for x@
  20.     jnz    xx1        ;jump through table if not @
  21.     mov    bx,PX        ;get pointer to PDL arg
  22.     mov    ax,[bx]        ;load the argument
  23.     mov    cx,PY
  24.     sub    cx,bx        ;determine its size
  25.     call    UCL        ;lift before proceeding
  26.     cmp    cx,2        ;address is new table base
  27.     jz    xx2        ;else assume a single byte
  28. xx1:    cmp    al,07FH        ;larger than tilde?
  29.     jnc    lbt        ;noop and true if so
  30.     sub    al,'!'        ;prepare table index
  31.     jc    lbt        ;noop and true if control char or space
  32.     add    al,al        ;twice is index
  33.     mov    ah,0
  34.     mov    bx,SBT        ;start of subroutine table
  35.     mov    di,ax
  36.     jmp    word ptr [bx+di]    ;go do it
  37.  
  38. xx2:    mov    SBT,ax        ;set up new table start
  39. lbt:    jmp    SKP        ;exit true
  40.  
  41. ;    end
  42.