Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Conklin E.K.Forth programmer's handbook.2000.pdf
Скачиваний:
321
Добавлен:
23.08.2013
Размер:
2.04 Mб
Скачать

Forth Programmer’s Handbook

 

20). Two cells are removed from the stack.

 

ERASE

( c-addr u — )

Core Ext

 

Erase (set to zero) a region of memory, given its starting address c-addr and

 

length u:

 

 

<addr> <count> ERASE

 

 

Two cells are removed from the stack.

 

FILL

( c-addr u b — )

Core

 

Fill a region of memory, at address c-addr and of length u, with the least-signif-

 

icant byte of the top-of-stack item. Three cells are removed from the stack.

MOVE

( addr1 addr2 u — )

Core

 

Copy u bytes from a source starting at addr1 to the destination starting at addr2.

 

After the transfer, the destination area at addr2 contains exactly what the source

 

area addr1 did before the transfer. If the data areas overlap, the original will not

 

be preserved!

 

CMOVE

( c-addr1 c-addr2 u — )

String

 

Copy u bytes from a source starting at address c-addr1 to the destination start-

 

ing at c-addr2. The copy proceeds character-by-character from lower to higher

 

addresses. Three cells are removed from the stack. “C-move”

 

CMOVE>

( c-addr1 c-addr2 u — )

String

CMOVE> has the same arguments as CMOVE, but the copy proceeds character- by-character from higher to lower addresses. CMOVE> is used for transferring from a data field to an overlapping data field in higher memory. Three cells are removed from the stack. “C-move-back”

References Character string I/O, Section 3.3

String processing, Section 4.1.5

2.3.4 Comparing Character Strings

Character-string comparisons operate on two separate character strings; this allows the two to be compared by use of the ASCII collating sequence. The

Forth Fundamentals 51

Соседние файлы в предмете Электротехника