home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / pascal / library / dos / btree / mulkey / mulget1.asm < prev    next >
Encoding:
Assembly Source File  |  1988-04-05  |  1.7 KB  |  62 lines

  1. ; Assembler interface to Turbo Pascal - MULKEY
  2. ;
  3. ; Copyright 1988 by Mark R. Boler  -  All Rights Reserved
  4.  
  5. TITLE      MULKEY
  6.  
  7. CODE       SEGMENT BYTE PUBLIC
  8.  
  9.            ASSUME  CS:CODE
  10.  
  11.            EXTRN   RPN_Record: NEAR
  12.  
  13.            PUBLIC  GetLowest, GetHighest, NextRecord, PrevRecord
  14.  
  15. NextRecordOp EQU 6
  16. PrevRecordOp EQU 7
  17. GetLowestOp  EQU 12
  18. GetHighestOp EQU 13
  19.  
  20. ; PROCEDURE xxxxxx(Handle: WORD;
  21. ;                  KeyNum: WORD;
  22. ;                  VAR d);
  23.  
  24. Handle     EQU     WORD  PTR ss:[bx + 10]
  25. KeyNum     EQU     WORD  PTR ss:[bx + 8]
  26. DBuf       EQU     DWORD PTR ss:[bx + 4]
  27.  
  28. NextRecord PROC    FAR
  29.            mov     al, NextRecordOp       ; set op code
  30. CallEntry:
  31.            mov     bx, sp                 ; set up stack frame in bx
  32.            push    Handle                 ; set up for call to RPN_Record
  33.            push    KeyNum
  34.            les     di, DBuf
  35.            push    es
  36.            push    di
  37.            push    es
  38.            push    di
  39.            push    ax
  40.            call    RPN_Record             ; make the call
  41.            ret     8                      ; clean up and return to caller
  42. NextRecord ENDP
  43.  
  44. PrevRecord PROC    FAR
  45.            mov     al, PrevRecordOp       ; load op code
  46.            jmp     SHORT CallEntry        ; make the call
  47. PrevRecord ENDP
  48.  
  49. GetLowest  PROC    FAR
  50.            mov     al, GetLowestOp        ; load op code
  51.            jmp     SHORT CallEntry        ; make the call
  52. GetLowest  ENDP
  53.  
  54. GetHighest PROC    FAR
  55.            mov     al, GetHighestOp       ; load op code
  56.            jmp     SHORT CallEntry        ; make the call
  57. GetHighest ENDP
  58.  
  59. CODE       ENDS
  60.  
  61.            END
  62.