10
20
30 :
40
50 cmd$=FNOS_GetEnv
60 :
70 VDU15:CLS:gap%=0:bbfw%=FALSE:IFPAGE>&FFFF:bbfw%=(INKEY-256 AND &DB)=&53
80 REPEAT:txH%=VPOS+1:PRINT:UNTILtxH%=VPOS+1:PRINTCHR$8;:txW%=POS+1
90 IFtxW%<2:REPEAT:txW%=POS+1:VDU9:UNTILtxW%=POS+1
100 VDU20:CLS:gfH%=txH%*(8-2*gap%):gfW%=txW%*8 :
110 gfY%=gfH%:REPEAT:gfY%=gfY%*2:UNTIL gfY%>=&300:
120 gfX%=gfW%:REPEAT:gfX%=gfX%*2:UNTIL gfX%>=&400
130 IFbbfw%:gfY%=gfH%*4:gfX%=gfW%:REPEAT:gfX%=gfX%*2:UNTIL gfX%>=gfY%:
140 :
150
160 A%=-1:IFos%>31:IFHIMEM>&FFFF:cpu%=86
170 IFHIMEM>&FFFF:IFPAGE>&8000:IFPAGE<&FFFF:cpu%=44
180 IFPAGE<&20000:IFHIMEM<&20001:DIM A%-1:!A%=0:P%=A%:[OPT 0:NOP:]:A%=!A%
190 IFA%=&EA:cpu%=65 ELSE IFA%=&00:cpu%=80 ELSE IFA%=&12:cpu%=09
200 IFA%=&A0:cpu%=11 ELSE IFA%=&90:cpu%=86
210 :
220 PRINTCHR$13;"Host:";SPC10;LEFT$(STR$os%+" ",4);
230 IFos%>27:PRINTMID$("Commodore 64 TI CalculatorAmstrad CPC ZX Spectrum DOS/Windows ",os%*13-363,13);
240 IFos%<11:PRINTMID$("ElectronBBC B BBC B+ Master MasterETCompact RISC OS SpringbdUnix 6809UnixApple ",os%*8+1,8);
250 IFos%=17:PRINT"6809Beeb"; ELSE IFos%=24:PRINT"CP/M"; ELSE IFos%=43:PRINT"RT11/RSTS/RSX"; ELSE IFos%=57:PRINT"6809DOS";
260 IFos%=6:A%=INKEY-256:IF(A%AND&F0)=&A0:PRINTMID$("1.22.02.13.03.13.53.63.74.04.35 ",(A%AND15)*3+1,3);
270 IFos%=8:A%=INKEY-256:IF(A%AND&F0)=&B0:PRINT"v";A%AND15;
280 IFos%=10:A%=INKEY-256:IF(A%AND&F0)=&20:PRINT;~A%;
290 PRINT
300 :
310 IFos%=32:fs%=29 ELSE IFPAGE<&FFFF:A%=0:Y%=0:E%=0:fs%=(USR&FFDA)AND&FF ELSE IFos%=8:fs%=24 ELSE fs%=0
320 PRINT"Filing System: ";LEFT$(STR$fs%+" ",4);
330 IFfs%=29:PRINT"DOSFS" ELSE IFfs%=24:PRINT"UNIXFS"
340 IFfs%<>29:IFfs%<>24:PRINTMID$("NONE TAPE12TAPE3 ROM DISK NET TSOFT IEEEFSADFS HOSTFSVIDEO COPRO RAM NULL PRINT SERIALHADFS VDFS ",fs%*6+1,6)
350 :
360 d$=".":s$="/":IF(os%AND-24):d$="/":s$=".":IF(os%AND-32):d$="\"
370 PRINT"Filenames are: ";
380 IF(os%AND-32):PRINT"DOS"; ELSE PRINTMID$("BBC UnixBBC CP/M",(os%AND24)DIV2+1,3+(os%AND8)DIV8);
390 PRINT"-like"'SPC15;
400 IF(os%AND-24):PRINT"d:"; ELSE PRINT":d";
410 IF(os%AND24)=24:PRINT"filename";s$;"ext"'SPC6"also: d:";
420 PRINTd$;"directory";d$;"filename";s$;"ext";CHR$8
430 :
440 kbd%=(os%<8):IF(INKEY-256AND&DB)=&53:kbd%=1
450 PRINT"Keyboard type: ";MID$("Acorn RegularRussell",kbd%*7+8,7)
460 PRINTSPC15;"f1=&";8-(kbd%>0);"1 f10=&";MID$("C89",kbd%+2,1);"A";
470 IFtxW%<60:PRINT'SPC13;
480 PRINT" Cursors=&";MID$("8CCC88",kbd%*2+3,2);"-&";MID$("8FCF8B",kbd%*2+3,2)
490 :
500 PRINT"CPU:";SPC11;
510 IFcpu%=09:PRINT"6809";
520 IFcpu%=11:PRINT"PDP11";
530 IFcpu%=44:PRINT"ARM";
540 IFcpu%=65:PRINT"6502";
550 IFcpu%=80:PRINT"Z80";
560 IFcpu%=86:PRINT"80x86";
570 PRINT
580 mem%=((HIMEM+32767)AND-32768)-(PAGE AND -32768)
590 PRINT"Memory:";SPC8;mem%DIV1024;"K (&";~mem%;")"
600 :
610 PRINT"CALL &FFxx:";SPC4;
620 IFPAGE<&FFFF:PRINT"Yes"SPC(3-8*(txW%>32));"PAGE<&FFFF" ELSE PRINT"No";SPC(4-8*(txW%>32));"PAGE>&FFFF"
630 PRINT"Program text: ";
640 IF!PAGE=&D7C1C7C5:PRINT"Brandy"; ELSE IF?(TOP-3):PRINT"Acorn/Wilson"; ELSE PRINT"Russell";SPC5;
650 IFtxW%<40:PRINT'SPC13;
660 IF?(TOP-3):PRINT" ?(TOP-3)<>0";CHR$8 ELSE PRINT" ?(TOP-3)=0";CHR$8
670 PRINT"Program name: """;run$""""
680 PRINT"Command line: """;cmd$""""
690 :
700 PRINT"Logical pixs: ";:IFtxW%>1:PRINT;gfX%;"x";gfY% ELSE PRINT"unknown"
710 PRINT"Physical pixs: ";:IFtxW%>1:PRINT;gfW%;"x";gfH% ELSE PRINT"unknown"
720 PRINT"Text:";SPC10;:IFtxW%>1:PRINT;txW%;"x";txH% ELSE PRINT"unknown"
730 PRINT"Colours:";SPC7;:A%=3:IFtxW%>1:IFtxW%<40:A%=2
740 FORclr%=0TO15:COLOUR128+clr%:PRINTSPCA%;
750 IFclr%=7:COLOUR128:PRINT'STRING$(15,CHR$9);
760 NEXT:COLOUR128:COLOUR7:PRINT
770 :
780 A$="":END
790 :
800
810 DEFFNOS_GetEnv:LOCALA$,A%,X%,Y%:X%=1:os%=((USR&FFF4)AND&FF00)DIV256
820 IFHIMEM<&FFFF:IF?(TOP-2)=0:IF?5=195:os%=24:IF?&FFF4=195:os%=((USR&1800FFF4)AND&FF00)DIV256
830 IF!PAGE=&D7C1C7C5:run$=ARGV$(0):FORA%=1TOARGC:A$=A$+ARGV$(A%)+" ":NEXT:=A$
840 IFos%>31:IFPAGE>&FFFFF:DIMX%LOCAL256:SYS"GetModuleFileName",0,X%,255:run$=$$X%:=@cmd$
850 A%=&600-&7B00*(PAGE>&8000)-&3F00*(PAGE>&C000):IF!(PAGE-&100)=@%:A%=PAGE-&300
860 IF?(TOP-3)=0:A%=&100:IFHIMEM<&FFFF:A%=PAGE-&300:IF!(HIMEM+512)=@%:A%=HIMEM
870 A$=$A%:IFPAGE=&8F00:run$=A$:SYS16TOA$,,A%:SYS72,"",A%:A$=MID$(A$,1+INSTR(A$+" "," ",1+INSTR(A$," "))):IFLENA$=0:A$=run$
880 FORY%=-1TO0:A$=" "+A$:REPEATA$=MID$(A$,2):UNTILASCA$<>32:IFASCA$=34:A%=INSTR(A$,"""",2)+1 ELSE A%=INSTR(A$+" "," ")
890 IFY%:run$=MID$(A$,1-(ASCA$=34),A%-1+2*(ASCA$=34)):A$=MID$(A$,A%+1)
900 NEXT:=A$