13 lines
383 B
Plaintext
13 lines
383 B
Plaintext
;this code assumes that both DS and ES point to the correct segments.
|
|
cld
|
|
mov si,offset TestMessage
|
|
mov di,offset EmptyRam
|
|
mov cx,5 ;length of the source string, you'll need to either know this
|
|
;ahead of time or calculate it.
|
|
rep movsb
|
|
ret
|
|
|
|
;there is no buffer overflow protection built into these functions so be careful!
|
|
TestMessage byte "Hello"
|
|
EmptyRam byte 0,0,0,0,0
|