home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Tool Box
/
SIMS_2.iso
/
bp_3_94
/
power
/
move.inc
next >
Wrap
Text File
|
1993-02-23
|
1KB
|
33 lines
ASM ;---------------------------------------
ASM ; Routine zum Verschieben von n Bytes
ASM ;
ASM ; #### Varinate für PB 3.x !!! #####
ASM ;
ASM ; Aufruf: CALL MOVE (Len, Ziel, Quelle)
ASM ; Len = Zahl der Bytes (By Value)
ASM ; Ziel = Adresse Ziel (By Ref.)
ASM ; Quelle = Adresse Quelladresse
ASM ;---------------------------------------
ASM PUSH DS ; merke DS
ASM PUSH SI
ASM PUSH DI
ASM ; lese Adresse der Quelladresse vom Stack
ASM MOV SI, [BP+06] ; Ofs-PTR auf Quelle
ASM MOV DS, [BP+08] ; Seg-PTR auf Quelle
ASM MOV AX, [SI] ; ermittle Adresse String
ASM MOV CX, [SI+2] ; "
ASM MOV SI, AX ; "
ASM MOV DS, CX ; "
ASM ; lese Len - Parameter und speichere in CX
ASM MOV CX,[BP+&H0E] ; LEN in CX
ASM ; lese Zieladresse von Stack
ASM MOV DI, [BP+&H0A] ; Ofs. Ziel
ASM MOV ES, [BP+&H0C] ; Seg. Ziel
ASM ; verschiebe Speicherbereich
ASM CLD ; Dir Flag = 0
ASM REP MOVSB
ASM POP DI
ASM POP SI
ASM POP DS ; restauriere DS
'! ENDE ASM SUB