home *** CD-ROM | disk | FTP | other *** search
- ' ******************** INITIALIZE ******************
-
- Init:
-
- %VideoSegment = &HB800
-
- ' Get Current Drive and Current Path
- Path$=SPACE$(67)
-
- CALL CurrentDrive(Drive) ' Get Current Drive
- CALL GetPath(0,Path$) ' and Path
-
- Drive$=CHR$(Drive+65)+":\"
- Path$=Drive$+Path$
-
- Spa=INSTR(Path$,CHR$(0))
- InitialPath$=LEFT$(Path$,(Spa-1)) ' For Help File
- Path$=InitialPath$
-
-
- DIM Border$(4),TITLE$(12)
- DIM WErrData(5),WBCharData(5),WFilesData(5),WPathData(5),WSaveData(5)
- DIM WMaskData(5),WBlockData(5),WFileNameData(5),WSCharData(5),WClearData(5)
-
- ' Array to hold COLORS Window
- DIM WBack(208),WBackData(5),WFore(630),WForeData(5)
-
- ' LARGE and SMALL array to hold Window
- DIM WLarge(2000),WLarge2(2000)
- DIM WSmall(240)
-
- ' COLORS , ERROR & SAVE WINDOW DATA
- WBackData(0)=0 : WForeData(0)=0 : WErrData(0)=10 : WSaveData(0)=3 ' ROW
- WBackData(1)=10 : WForeData(1)=26 : WErrData(1)=26 : WSaveData(1)=16 ' COL
- WBackData(2)=16 : WForeData(2)=30 : WErrData(2)=28 : WSaveData(2)=22 ' WIDTH
- WBackData(3)=13 : WForeData(3)=21 : WErrData(3)=3 : WSaveData(3)=3 ' LENGTH
- WBackData(4)=11 : WForeData(4)=11 : WErrData(4)=79 : WSaveData(4)=11 ' ATTR
- WBackData(5)=2 : WForeData(5)=2 : WErrData(5)=2 : WSaveData(5)=1 ' TYPE
- ' FILES WINDOWS
- WFilesData(0)=1 : WPathData(0)=5 : WMaskData(0)=6 : WFileNameData(0)=2 ' ROW
- WFilesData(1)=1 : WPathData(1)=16: WMaskData(1)=16: WFileNameData(1)=16 ' COL
- WFilesData(2)=15: WPathData(2)=33: WMaskData(2)=16: WFileNameData(2)=16 ' WIDTH
- WFilesData(3)=9 : WPathData(3)=3 : WMaskData(3)=3 : WFileNameData(3)=3 ' LENGTH
- WFilesData(4)=11: WPathData(4)=11: WMaskData(4)=11: WFileNameData(4)=11 ' ATTR
- WFilesData(5)=2 : WPathData(5)=1 : WMaskData(5)=1 : WFileNameData(5)=1 ' TYPE
- ' CHARACTER WINDOW
- WSCharData(0)=0 : WBCharData(0)=0 : WClearData(0)=10 ' ROW
- WSCharData(1)=0 : WBCharData(1)=0 : WClearData(1)=24 ' COL
- WSCharData(2)=40: WBCharData(2)=20: WClearData(2)=32 ' WIDTH
- WSCharData(3)=21: WBCharData(3)=14: WClearData(3)=3 ' LENGTH
- WSCharData(4)=11: WBCharData(4)=11: WClearData(4)=79 ' ATTR
- WSCharData(5)=2 : WBCharData(5)=2 : WClearData(5)=2 ' TYPE
-
- Arrow$=CHR$(24)+CHR$(25)+CHR$(27)+CHR$(26) ' ARROW Characters
-
- LastChar$=" "
-
- Border$(0)="Move Cursor " ' Special Arrow keys
- Border$(1)="Single Border "
- Border$(2)="Double Border "
- Border$(3)="Last Character"
- Border$(4)="Change Color "
-
- Arrow=0 ' Turn off to start
- OldArrow =1 ' Single border
-
- Xpos=1 ' Starting
- Ypos=1 ' X and Y positions
-
- FY=4
-
- XBox=2 ' Starting
- YBox=2 ' Positions
- XSpec=2 ' for
- YSpec=2 ' HighLighting
- XSave=18
- YSave=5
-
- CurrentFore=15 ' Set foreground
- CurrentBack=0 ' and Background colors
-
- Mask$="*.*" ' Initialize directory mask
- FileName$="NONE" ' and file name
-
- TextHigh = 79 ' Highlighting color
- TextNorm = 14 ' Normal color
-
- StatColor$="Black Blue Green Cyan Red MagentaBrown White "
-
- ' Legal filename characters
- GoodFileName$="$%'()-@^{}!_0123456789"
- GoodFileName$=GoodFileName$+"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
- GoodFileName$=GoodFileName$+"abcdefghijklmnopqrstuvwxyz"
-
- GoodMask$=GoodFileName$+"?*."
-
- GoodPath$=GoodFileName$+":\."
-
- ' Set-up Commands screen
- SCREEN 0,0,1,0
- COLOR 15,1
- CLS
- COLOR 15,4 : LOCATE 1,31 : PRINT" Command Summary "
- COLOR 15,1
- ? : ?
- PRINT " Function Keys F1-F10: "STRING$( 15, 32)"Other key assignments:"
- COLOR 14, 1 : PRINT
- PRINT " F1 - HELP"STRING$( 29, 32)"Esc - Exit program or cancel command."
- PRINT " F2 - Files Menu"STRING$( 23, 32)"HOME - Move to start of current line."
- PRINT " F3 - Mark Block Begin"STRING$( 17, 32)"END - Move to end of current line."
- PRINT " F4 - Mark Block End"STRING$( 19, 32)"Ctrl HOME - Move to upper lefthand"
- PRINT " F5 - Colors Menu"STRING$( 34, 32)"corner of screen."STRING$( 12, 32);
- PRINT " F6 - Special Characters Menu Ctrl END - Move to lower righthand"
- PRINT " F7 - Box Characters Menu"STRING$( 25, 32)"corner of screen."
- PRINT " F8 - Change Cursor Key Action Ctrl right or left cursor - Move to"
- PRINT " - Repeat Last Character"STRING$( 21, 32)"middle of current line."
- PRINT " - Single Border Character PgUp - Clear entire screen."
- PRINT " - Double Border Character PgDn - Toggle Special Cursor Mode."
- PRINT " - Change Color"STRING$( 19, 32)"Cursor - Move cursor or perform"
- PRINT " F9 - Display Current Status"STRING$( 19, 32)"Special function."
- PRINT " F10- HELP "STRING$( 22, 32)"(Check the status line at the bottom"
- PRINT STRING$( 39, 32)"of the screen for the current settings.)"
- LOCATE 24,1
- COLOR 15, 4 : PRINT " Press any key to continue ... ";
-
- ' Print title screen
- SCREEN 0,0,0,0
- COLOR 14,0
- CLS
-
-
- TITLE$(1)=" ▒█████ ▒█████ ▒██████ ▒███████ ▒███████ ▒██ ▒██"
- TITLE$(2)=" ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒█ ▒██ ▒█ ▒███ ▒██"
- TITLE$(3)=" ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒████ ▒██"
- TITLE$(4)=" ▒█████ ▒██ ▒████ ▒████ ▒████ ▒██▒██▒██"
- TITLE$(5)=" ▒██ ▒██ ▒██▒██ ▒██ ▒██ ▒██ ▒████"
- TITLE$(6)=" ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒██ ▒█ ▒██ ▒█ ▒██ ▒███"
- TITLE$(7)=" ▒█████ ▒█████ ▒███ ▒██ ▒███████ ▒███████ ▒██ ▒██"
- TITLE$(8)=SPACE$(79)
- TITLE$(9)=SPACE$(34)+"Ver 1.0"
- TITLE$(10)=SPACE$(79)
- TITLE$(11)=SPACE$(34)+"Ken Orlo"
- TITLE$(12)=SPACE$(79)
-
- YStop=6
- FOR T=1 TO 12
- FOR Y=24 TO YStop STEP -1
- LOCATE Y,1
- ? TITLE$(T);
- NEXT Y
- YStop=YStop+1
- NEXT T
- ?
- LOCATE ,20
- ? "Copyright 1988 COMPUTE! Publications, Inc."
- LOCATE ,30
- ? "All rights reserved."
- LOCATE 23,1
- ? "Press any key to begin ...";
- CALL GetKey(A$)
- LOCATE 23,1
- ? " ";
-
- YStop=6
- FOR T=1 TO 12
- FOR Y=YStop TO 1 STEP -1
- LOCATE Y,1
- ? TITLE$(T)
- NEXT Y
- YStop=YStop+1
- NEXT T
-
- COLOR CurrentFore,CurrentBack
- CLS
- CALL Status
-
- RETURN
-
-
- ' ******************* Window Routines ************************
- 'Opening Windows
- 'CALL OPENWINDOW(Window1(),Windowdata1())
- '
- 'Closing Windows
- 'CALL CLOSEWINDOW(Window1(),Windowdata1())
- '
- 'Window1=Array to hold window data.
- ' Dim window1 large enough. DIM Window1(WIDTH * LENGTH)
- '
- 'Windowdata1=Array to hold Window information
- ' Windowdata1(0)=ROW
- ' Windowdata1(1)=COL
- ' Windowdata1(2)=WIDTH
- ' Windowdata1(3)=LENGTH
- ' Windowdata1(4)=Border Attribute
- ' Windowdata1(5)=Type (1=Single 2=Double OTHER=No border)
- '
- ' **** THIS ROUTINE ASSUMES TO BE USED AT VIDEO PAGE 1 ****
-
- SUB OPENWINDOW(ARRAY%(1),WDATA%(1))
- LOCAL CORNER%,WID%,WLEN%,EXTRA%,ATTR%,BORDWID%,BORDLEN%
-
- CORNER%=WDATA%(0) * 160 + WDATA%(1) * 2
- WID%=WDATA%(2)
- WLEN%=WDATA%(3)
- EXTRA%= (80 - WID%) * 2
- ATTR%=WDATA%(4)
- BORDWID%=WID%-2
- BORDLEN%=WLEN%-2
- TYPE%=WDATA%(5)
-
- ' WARNING! No error checking.
-
- CALL WINDOWON(ARRAY%(0),CORNER%,WID%,WLEN%,EXTRA%)
- IF TYPE =1 THEN
- CALL SINGLEBORDERON(CORNER%,BORDWID%,BORDLEN%,ATTR%,EXTRA%)
- EXIT SUB
- END IF
- IF TYPE =2 THEN
- CALL DOUBLEBORDERON(CORNER%,BORDWID%,BORDLEN%,ATTR%,EXTRA%)
- EXIT SUB
- END IF
-
- END SUB
-
-
- SUB CLOSEWINDOW(ARRAY%(1),WDATA%(1))
- LOCAL CORNER%,WID%,WLEN%,EXTRA%
-
- CORNER%=WDATA%(0) * 160 + WDATA%(1) * 2
- WID%=WDATA%(2)
- WLEN%=WDATA%(3)
- EXTRA%= (80 - WID%) * 2
-
- CALL WINDOWOFF(ARRAY%(0),CORNER%,WID%,WLEN%,EXTRA%)
-
- END SUB
-
- ' ******************* INLINE Assembly Routines ************************
- ' WINDOWON - Save text under Window
- SUB WINDOWON INLINE
- $INLINE "WINSAVE.BIN"
- END SUB
-
- ' WINDOWOFF - Replace text under Window
- SUB WINDOWOFF INLINE
- $INLINE "WINREST.BIN"
- END SUB
-
- ' SINGLEBORDERON - Single Line border around Window
- SUB SINGLEBORDERON INLINE
- $INLINE "SINBORD.BIN"
- END SUB
-
- ' DOUBLEBORDERIN - Double Line border around Window
- SUB DOUBLEBORDERON INLINE
- $INLINE "DOUBORD.BIN"
- END SUB
-
-
- ' GetPath - Gets the current Path
- SUB GetPath INLINE
- $INLINE "DIRECT.BIN"
- END SUB
-
- ' CurrentDrive - Returns 0=A , 1=B , etc.
- SUB CurrentDrive INLINE
- $INLINE "DRIVE.BIN"
- END SUB