Copy to the heap (Forth)

Plain Text

Public Domain

Create a copy of a section of memory on the heap

Download (right click, save as, rename as appropriate)

Embed

1
: copy ( addr u -- addr ) dup allocate throw dup >r swap move r> ;