home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hall of Fame
/
HallofFameCDROM.cdr
/
prog1
/
4th_86.lzh
/
SQUARE.DEM
< prev
next >
Wrap
Text File
|
1989-02-15
|
2KB
|
56 lines
( This file creates a simple turnkey demonstration of line drawing
routine.
---- it also shows a simple way of positioning the cursor
(see WORM.4TH for the proper use of ANSI sequences)
---- and a way of introducing delays )
OFF PRINTLOAD
brkon
iload kernel23.img " kernel23.img loaded" ." crlf
g0load 7egam3.bin " 7egam3 loaded " ." crlf
: dy1 10000 0 do loop ;
: dly 3 0 do dy1 loop ;
: centr 10 0 do crlf loop 24 ;
fload sq.4th " sq.4th" ." crlf
( define a constant that is the def adr of the last word)
LAST @ DUPB@ + 2+ @ CONST ENTRYPOINT
: MYPROGRAM norm centr 24 spcs
" This is a demonstration UCC-4th PROGRAM" ." crlf 5 spcs
" for EGA Graphics only" ;
: BOOT ( bootstrap)
1000h setmem brkoff myprogram dly ENTRYPOINT EXEC dly norm
centr 24 spcs " that's all folks" ." centr q-u-it ;
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 + 10 - LXI, ( SET SP)
H '' SYSTK LXI, ( '' CSP SHLD, )
df89h head! ( mov di,bx) ( SET CSP)
:ENTER BOOT ( enter forth and execute user bootstrap)
;
STATUS ( print code size)
" SQUARE.COM" SAVE
" COM file written^13 10^" ."
q-u-it