Category : Assembly Language Source Code
Archive   : ASPIC.ZIP
Filename : MENU.ASM

 
Output of file : MENU.ASM contained in archive : ASPIC.ZIP
***************************************************************
* Demonstration of the CASE/SWITCH structure *
* (and a lot of other stuff) *
* *
* Clears the screen, prints a menu of options, then *
* prompts for a selection. *
* *
* Each option sets the search path for the order in which to *
* search sub-directorys for included files so that new *
* versions can use files from previous versions which have *
* not been changed. *
* *
* Externally declared INCLUDE directories are searched AFTER *
* specified ones by adding the new include path to the *
* beginning of the old one. *
* *
* In this example, we support a hypothetical special version *
* which has been archived, so it must be extracted first into *
* a temporary directory using an external command. *
***************************************************************

BELL = 7 ;BELL charactor

.if .._pass=1
.shell CLS ;Use external command to clear the screen
.ECHO Assembly Menu
.ECHO =============
.ECHO
.ECHO 1) Version 1.1
.ECHO 2) Version 1.2
.ECHO 3) Version 2.0
.ECHO 4) Special version for XYXTECH
.ECHO
VERSION = [KBD] "Select version to create: " ;Get menu selection
.switch VERSION
.case 1
.ECHO "Assembling Version 1.1",$a ;Option 1
.SETENV "INCLUDE=v11;",#INCLUDE ;sub directory v11 first
.else
.case 2
.ECHO "Assembling Version 1.2",$a ;Option 2
.SETENV "INCLUDE=v12;v11;",#INCLUDE ;search v1.2 then v1.1
.else
.case 3
.ECHO "Assembling Version 2.0",$a ;Option 3
.SETENV "INCLUDE=v20;v12;v11;",#INCLUDE ;search v2.2, v1.2, v1.1
.else
.case 4
.ECHO
SPECIAL = [KBD] "EXTRACT INTO TEMP? ",BELL ;get verification & flag

.if !SPECIAL
.ERROR "Cancelled." ;
.endif

.if !EXIST("arc\xytech.arc")
.ERROR "ARCHIVE FILE NOT FOUND!"
.endif

.ECHO "Assembling Special Version",$a ;Option 4

.if !EXIST("temp\") ;make sure the directory exists
.ERROR "Directory 'TEMP' does not exist"
.endif

.if EXIST("temp\*.*") ;if there are any files in temp
.shell "VDEL temp\*.*" ;delete old files in temp
.endif

;******************************************************
;*** Extract special version into temp subdirectory ***
;******************************************************

.shell "PKUNZIP arc\xyxtech.arc .\temp\ *.asm *.asi"

.if .._err ;check for extraction failure
.ERROR "Unable to extract source!"
.endif

.SETENV "INCLUDE=TEMP" ;use only files from archive
.else
.case (other)
.ERROR Invalid version
.endif
.endif
.ECHO "Assembly path is ",#INCLUDE,$a

***************************************************************
* Include statements for program go here... *
***************************************************************

.END


  3 Responses to “Category : Assembly Language Source Code
Archive   : ASPIC.ZIP
Filename : MENU.ASM

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/