home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 5 / ctrom5b.zip / ctrom5b / PROGRAM / ASM / ALIB30B / SORT11.ASM < prev    next >
Assembly Source File  |  1994-11-03  |  1KB  |  54 lines

  1. ;***************************** SORT11.ASM ***********************************
  2.  
  3. LIBSEG           segment byte public "LIB"
  4.         assume cs:LIBSEG , ds:nothing
  5.  
  6. ;----------------------------------------------------------------------------
  7. .xlist
  8.     include  mac.inc
  9.     include  common.inc
  10.  
  11.     extrn    selection_sort:near
  12.     extrn    file_sort:near
  13.     
  14.     extrn    sort_engine:word
  15.     extrn    prime_asciiz_off:word
  16.     extrn    rec_term_char:byte
  17.     extrn    sort_field_len:word
  18.     extrn    sort_column:word
  19.     extrn    fixed_record_len:word
  20. .list
  21.  
  22. comment 
  23. ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -(  SORT   )
  24. SELECTION_SORT_FILE - selection sort of file
  25. ;
  26. ; inputs:  es:di = ptr to asciiz file name string      
  27. ;             bx = record length if fixed, else zero if variable length record
  28. ;             al = variable lenght record separator, else zero if fixed record
  29. ;             dx = starting column for sort
  30. ;             ah = length of sort field
  31. ; output:   carry set if insufficient memory to do sort
  32. ;           
  33. ;* * * * * * * * * * * * * *
  34. 
  35.     PUBLIC    SELECTION_SORT_FILE
  36. SELECTION_SORT_FILE    PROC    FAR
  37.     push    bp
  38.     mov    bp,offset selection_sort
  39.     mov    cs:sort_engine,bp
  40.     
  41.     mov    cs:fixed_record_len,bx
  42.     mov    cs:rec_term_char,al
  43.     mov    byte ptr cs:sort_field_len,ah
  44.     mov    cs:sort_column,dx
  45.     call    file_sort
  46.     pop    bp
  47.     retf
  48. SELECTION_SORT_FILE    ENDP
  49.  
  50.  
  51. LIBSEG    ENDS
  52.     end
  53.