VolksForth/sources/cpm/relocate.fth

52 lines
3.1 KiB
Forth
Raw Normal View History

\ *** Block No. 0 Hexblock 0
\\ Relocate System 11Nov86
Dieses File enthaelt das Utility-Wort BUFFERS.
Mit ihm ist es moeglich die Zahl der Disk-Buffers festzulegen,
die volksFORTH benutzt. Voreingestellt sind 4 Buffer.
Benutzung: nn BUFFERS
\ *** Block No. 1 Hexblock 1
\ Relocate a system 16Jul86
| : relocate-tasks ( mainup -- ) up@ dup
BEGIN 2+ under @ 2dup - WHILE rot drop REPEAT 2drop ! ;
| : relocate ( stacklen rstacklen -- )
2dup + b/buf + 2+ limit origin -
u> abort" kills all buffers"
over pad $100 + origin - u< abort" cuts the dictionary"
dup udp @ $40 +
u< abort" a ticket to the moon with no return ..."
flush empty over + origin +
origin $0A + ! \ r0
origin + dup relocate-tasks \ multitasking link
6 - origin 8 + ! \ s0
cold ; -->
\ *** Block No. 2 Hexblock 2
\ bytes.more buffers 29Jun86
| : bytes.more ( n+- -- )
up@ origin - + r0 @ up@ - relocate ;
: buffers ( +n -- )
b/buf * 4+ limit r0 @ - swap - bytes.more ;