( This file does ** NOT ** use KERNEL2.IMG because it starts off by re-defining LINK. This is necessary because the version of LINK built into UCC2 is for non-cross-compile mode only. --- the redefinition works in cross-compile ------- because of the space taken by the new LINK, KERNEL2.IMG would be diplaced from its correct load point and the system would crash --- ** NOTE ** also that the new LINK is defined ** BEFORE ** cross-compile mode is initiated -- otherwise it could not be executed immediate during cross-compile) on redefine ( redefine LINK) : link gtdfa base @ + gtdfa base @ + over - 3 - swap dup e9h swap b! 1+ ! ; off redefine OFF PRINTLOAD 100H FF00H CROSS-COMPILE LAST @ " -- LAST" ." .H 5 spcs HEAD @ " -- HEAD" ." .H 5 spcs HEAD @ BASE @ - " -- (HEAD - BASE)" ." .H 5 spcs 103H ORG ( leave room for jump) " 7BASIC2" LOAD " 7BASIC2 LOADED" ." CRLF LAST @ " -- LAST" ." .H 5 spcs HEAD @ " -- HEAD" ." .H 5 spcs HEAD @ BASE @ - " -- (HEAD - BASE)" ." .H 5 spcs 0 ( no multi-task interlock) " 7OSI2" LOAD " 7OSI2 LOADED" ." CRLF LAST @ " -- LAST" ." .H 5 spcs HEAD @ " -- HEAD" ." .H 5 spcs HEAD @ BASE @ - " -- (HEAD - BASE)" ." .H 5 spcs " 7DISP2" LOAD " 7DISP2 LOADED" ." CRLF cload egam fload hilsier2 : dy1 10000 0 do loop ; : dly 10 0 do dy1 loop ; : saymore crlf 5 spcs " If you want to try this in greater depth" ." crlf 5 spcs " use UCC2.COM and type FLOAD HILSIER " ." crlf 5 spcs crlf " Then you can put in parameters " ." crlf crlf " such as 3 2 HILB or 3 2 SIERP " ." crlf crlf " where 3 is number of levels and 2 is magnification" ." crlf " (best to keep magnification at 1 usually " ." crlf crlf " in which case you need only type 3 HILB or 6 SIERP) " ." crlf crlf 5 spcs " Larry Buchan" ." ; : doit dly hilb dly sierp dly norm saymore ; ( define a constant that is the def adr of the last word) LAST @ DUPB@ + 2+ @ CONST ENTRYPOINT : MYPROGRAM crlf 5 spcs " This is a demonstration 4th PROGRAM" ." crlf 5 spcs " of Hilbert and Sierpin curves " ." crlf 5 spcs crlf " W A I T ====> " ." crlf crlf " each picture lasts only a few seconds " ." ; : BOOT ( bootstrap) INITIO norm myprogram crlf crlf ENTRYPOINT EXEC QUIT ; 1000 ( 128) CONST SYSIZE ( stack space for program) '' SYSIZE BLOCK SYSTK ( define stack) 100H CODE GOFORTH HEAD @ SWAP GETLOC SWAP ORG JMP, HEAD ! ( That patched the startup jump into the given location) SP '' SYSTK '' SYSIZE + LXI, ( set SP) H '' SYSTK LXI, '' CSP SHLD, ( set CSP) :ENTER BOOT ( enter forth and execute user bootstrap) ; " hilmap" map STATUS ( print code size) " hilbert.COM" SAVE " COM file written\13 10\" ." QUIT