home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / bp_3_94 / power / move.inc next >
Text File  |  1993-02-23  |  1KB  |  33 lines

  1. ASM ;---------------------------------------
  2. ASM ; Routine zum Verschieben von n Bytes
  3. ASM ;
  4. ASM ; #### Varinate für PB 3.x !!! #####
  5. ASM ;
  6. ASM ; Aufruf: CALL MOVE (Len, Ziel, Quelle)
  7. ASM ;         Len    = Zahl der Bytes (By Value)
  8. ASM ;         Ziel   = Adresse Ziel   (By Ref.)
  9. ASM ;         Quelle = Adresse Quelladresse
  10. ASM ;---------------------------------------
  11. ASM PUSH DS              ; merke DS
  12. ASM PUSH SI
  13. ASM PUSH DI
  14. ASM ; lese Adresse der Quelladresse vom Stack
  15. ASM MOV SI, [BP+06]      ; Ofs-PTR auf Quelle
  16. ASM MOV DS, [BP+08]      ; Seg-PTR auf Quelle
  17. ASM MOV AX, [SI]         ; ermittle Adresse String
  18. ASM MOV CX, [SI+2]       ;  "
  19. ASM MOV SI, AX           ;  "
  20. ASM MOV DS, CX           ;  "
  21. ASM ; lese Len - Parameter und speichere in CX
  22. ASM MOV CX,[BP+&H0E]     ; LEN in CX
  23. ASM ; lese Zieladresse von Stack
  24. ASM MOV DI, [BP+&H0A]    ; Ofs. Ziel
  25. ASM MOV ES, [BP+&H0C]    ; Seg. Ziel
  26. ASM ; verschiebe Speicherbereich
  27. ASM CLD                  ; Dir Flag = 0
  28. ASM REP MOVSB
  29. ASM POP DI
  30. ASM POP SI
  31. ASM POP DS               ; restauriere DS
  32. '! ENDE ASM SUB
  33.