only forth also definitions hidden also  system also decimal
\ *******************************************************************************************
\ This part between ste stars lines should not be removed, in case you find a bug or would like
\ to include a feature, let me know it,  hs
: ?load-file	( str -- )
	dup file-exists?
	if ??cr load-file else cr ." --> Can't load " ". then ;
: auto-install
	p" cd <Forthmacs$Dir>.^"		"cli drop
	p" enumdir <Forthmacs$Dir>.risc_os.installing fileliste" "cli drop
	p" fileliste" read fopen
	astring astring locals| arcname arcpath listfd |
	begin	arcname listfd fgetline
	while	p" copy <Forthmacs$Dir>.risc_os.installing." arcpath "copy
		arcname arcpath "cat
		p"  xyz/gz ~C~VD" arcpath "cat  arcpath "cli drop
		??cr cr ." un(g)zipping tar.gz archive " arcname ".
		p" <Forthmacs$Dir>.bin.gzip -d xyz"	"cli drop
		??cr ." Do you want a tarlist before installing?   <y/n>" key upc [char] N <>
		at? drop 0 at kill-line
		if ??cr p" <Forthmacs$Dir>.bin.tar -tf xyz"	"cli drop then
		cr ." Shall I install the archive?   <y/n>" key upc [char] Y =
		at? drop 0 at kill-line
		if	p" <Forthmacs$Dir>.bin.tar -xf xyz"	"cli drop
			p" <Forthmacs$Dir>.risc_os.installjob." arcpath "copy
			??cr arcname arcpath "cat arcpath ?load-file
			p" wipe <Forthmacs$Dir>.risc_os.installjob.* ~C~V" "cli drop
                then
                p" wipe xyz* ~C~VF"			"cli drop
	repeat
	listfd fclose	
	p" wipe fileliste ~C~V"				"cli drop
	p" back"					"cli drop
	??cr ;
auto-install  forget auto-install
\ *******************************************************************************************

libcall: emacs
libcall: gzip
libcall: tar
libcall: egrep
libcall: archive
libcall: uucp
libcall: uue
libcall: uud

: cli-undefined
	astring astring locals| command line |
	command "copy  p"  " command "cat
	get-tail command "cat
 	command "cli
	if command (interpret-do-undefined then ;
	' cli-undefined is interpret-do-undefined

: ?fload	\ name
	blword ?load-file ;
: edit		( filename -- error? )
	astring locals| command |
	p" emacs " command "copy  command "cat
	command "shell erase-screen ;
: ed	blword edit ;



only forth also definitions

0 ( <- maske )  1 ( <-flag )
begin
   if	cr ." ***** press a key or <Space> to exit *****" cr
	cr ."  1   Forthmacs Compatible mode ?"
	cr ."  2   load forth debugger ?"
	cr ."  3   load cpu tracer ?"
	cr ."  4   load serial utils ?"
	cr ."  5   load block interface ?"
	cr ."  6   load runtime profiler ?"
	cr ."  7   load clock ?"
	cr ."  8   mailing service ?"
	cr ."  9   load windows ?" cr
	cr ."  A   Backup Forthmacs ?" cr
	cr ."  B   View  'General Information' ? "
	cr ."  C   View  'Information about Versions' ?"
	cr ."  D   View  'ReadMe' ?"

   then	begin key? while key drop repeat	( mask )
	bl  2000 0 do 10 ms key? if drop key leave then loop
        upc dup bl = if drop exit then
  case
	[char] 1 of  01 or	0 endof
	[char] 2 of  02 or	0 endof
	[char] 3 of  04 or	0 endof
	[char] 4 of  08 or	0 endof
	[char] 5 of  16 or	0 endof
	[char] 6 of  32 or	0 endof
	[char] 7 of  64 or	0 endof
        [char] 8 of 128 or      0 endof
        [char] 9 of 256 or	0 endof
	[char] A of p" bin.Forth_Back" ?load-file	1 endof
	[char] B of p" -v docs.ascii.copyright" edit drop	1 endof
	[char] C of p" -v risc_os.versions" edit drop	1 endof
	[char] D of p" -v readme" edit drop		1 endof
                                0 swap
  endcase
again

dup  01 and iftrue ?fload lib.compatible	??cr ifend
dup  02 and iftrue ?fload lib.arm.debugm ?fload lib.arm.debug ??cr ifend
dup  04 and iftrue ?fload tracer		??cr ifend
dup  08 and iftrue ?fload modem			??cr ifend
dup  16 and iftrue ?fload blocks 		??cr ifend
dup  64 and iftrue ?fload lib.clock		??cr ifend
dup  32 and iftrue ?fload profiler		??cr ifend
dup 128 and iftrue ?fload mails			??cr ifend
dup 256 and iftrue ?fload windows		??cr ifend
drop
