image of READY prompt

Wang2200.org

Listing of file='@RAMDISK' on disk='vmedia/731-8028.wvd.zip'

# Sector 519, program filename = '@RAMDISK'
0010 REM ! @RAMDISK 08/16/88 -  DS RAM DISK ALLOCATION UTILITY
   : REM ! (c) Copyright, Wang Laboratories, Inc., 1987.  All rights reserved.
0020 REM %variables
   : DIM S1$3,B$3,P$8,E$(18)2,Q$1,T$80,M1$50,M2$50
   : STR(G$,1,1)=HEX(20)
   : STR(F$,1,1)=HEX(30)
0030 REM %screen 1
   : SELECT PRINT 005(80)
   : PRINT HEX(0D030202000F020402000F06);
0040 T$="D S   R A M   D i s k   A l l o c a t i o n"
   : PRINT AT(0,40-LEN(T$)/2);HEX(0F);T$
0050 PRINT AT(23,61);"FN/TAB - Exit";AT(22,61);"RETURN - Proceed";
0060 GOSUB '50("(c) Copyright, Wang Laboratories, Inc., 1987","    All rights
     reserved.")
0065 B$="D50"
0070 REM %get DS address
   : B$="D50"
   : PRINT AT(8,18);"Address of RAM Disk (D50, D60, or D70): ";
   : LINPUT HEX(0E),-B$
   : IF B$="RUN"THEN 65
   : PRINT HEX(06);
   : GOSUB '50(" "," ")
   : $TRAN(B$,"DdBb")R
   : IF POS("DB"=STR(B$,1,1))<>0 AND POS("567"=STR(B$,2,1))<>0 AND STR(B$,3,1)
     ="0" THEN 80
   : GOSUB '50(HEX(0E),"Illegal address")
   : GOTO 70
0080 SELECT #2 <B$>
   : ERRORGOSUB '50(HEX(0E),"Invalid address")
   : GOTO 70
0090 REM %get DS status
   : GOSUB '50(HEX(0E),"Getting device status")
   : STR(F$,2,6)=ALL(00)
   : E$()=ALL(20)
   : $GIO STATUS REQUEST #2 (0E14 0F00 12E2 0600 0700 70A0 4002 88D0 7040 6A10
      6816 4000 8705 1A00 C340, F$)F$;STR(E$(),,VAL(STR(F$,5,1)))
   : S1=VAL(STR(E$(),6,2),2)*256+VAL(STR(E$(),8,1))
0100 STR(F$,8,1)=AND HEX(10)
   : IF STR(F$,8,1)=HEX(00) THEN 110
   : GOSUB '50(HEX(0E),"Disk unavailable")
   : GOTO 70
0110 IF STR(E$(),1,1)=HEX(33)THEN 120
   : GOSUB '50(HEX(0E),"Specified disk is not a DS")
   : GOTO 70
0120 GOSUB '50(" "," ")
0130 REM %get RAM Disk size
   : PRINT AT(10,18);"Number of sectors to allocate to RAM Disk: ";
   : LINPUT HEX(0E),-S1$
   : PRINT HEX(06);
   : IF NUM(S1$)>=LEN(S1$)THEN 140
   : GOSUB '50(HEX(0E),"Invalid number")
   : GOTO 130
0140 CONVERT S1$ TO S1
   : IF S1<901 AND S1 >-1 AND INT(S1)=S1 THEN 150
   : GOSUB '50(HEX(0E),"Illegal RAM Disk size")
   : GOTO 130
0150 REM %allocate RAM Disk
   : GOSUB '50(HEX(0E),"Allocating RAM Disk")
   : STR(G$,1,1)=HEX(30)
   : STR(G$,2,2)=BIN(S1,2)
   : STR(G$,8,8)=P$
   : P$=" "
   : STR(G$,4,4)=ALL(00)
   : $GIO ALLOCATE RAM DISK #2 (0600 0700 70A0 4002 88D0 7040 6A10 6825 8B67 6
     A20 6A30 4000 8706, G$)
   : STR(G$,8,8)=ALL(00)
0160 IF STR(G$,6,1)<> HEX(01) THEN 170
   : GOSUB '50 (HEX(0E),"Insufficient cache space available")
   : GOTO 70
0170 IF STR(G$,6,1)<> HEX(02) THEN 190
   : STR(F$,2,6)=ALL(00)
   : E$()=ALL(20)
   : $GIO STATUS REQUEST #2 (0600 0700 70A0 4002 88D0 7040 6A10 6816 4000 8705
      1A00 C340, F$)F$;STR(E$(),,VAL(STR(F$,5,1)))
   : S2=VAL(STR(E$(),6,2),2)*256+VAL(STR(E$(),8,1))
0180 GOSUB '50("RAM Disk already allocated","To deallocate, enter a size of 0
     ")
   : GOTO 70
0190 IF STR(G$,6,1)=HEX(00) THEN 200
   : GOSUB '50(HEX(0E),"System error")
   : GOTO 70
0200 IF S1>0 THEN GOSUB '50(HEX(0E),"RAM Disk allocation successful")
   : ELSE GOSUB '50(HEX(0E),"RAM Disk deallocated")
   : GOTO 70
0210 DEFFN'127
0220 DEFFN'126
   : LOAD RUN "@MENU"
0230 DEFFN'50(M1$,M2$)
   : REM %'50 - display message at lower left corner (lines 22,23)
   : PRINT AT(22,0);STR(M1$);AT(23,0);STR(M2$);HEX(0F);
   : RETURN