China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-01 12:38
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Main loop menu for the game module on a self-made DVD disc (batch file) View 1,226 Replies 0
Original Poster Posted 2005-04-10 00:00 ·  中国 广东 广州 教育网
铂金会员
★★★★
C++启程者
Credits 5,154
Posts 1,827
Joined 2003-07-18 00:00
23-year member
UID 7105
Gender Male
Status Offline
Using a batch file for the main loop menu of the game module on my all-in-one DVD disc for system installation, maintenance, and games (just press an option and you can play):
(for everyone to refer to)

@ECHO OFF
PROMPT $P$G
:ask
a:
cls
tw32 >nul
echo . .
echo . .
echo . .
echo . . Show game menu
echo . . Don't feel like playing right now
echo . . Please press an option:
get c ab >nul
if "%get%"=="a" goto list
if "%get%"=="b" goto nogame

:list
echo . . The Path Through Space
echo . . Racing Pursuit
echo . . Assassinate Hitler
echo . . Doom
echo . . Xuanyuan Sword: Dance of the Maple
echo . . The Legend of Sword and Fairy
echo . . Heroes of Jin Yong
echo . . Sango Heroes
echo . . Chinese traditional chess
echo . . Four Nations War
echo . . Handtalk Go
echo . . Huarong Pass
echo . . Knowledge Quiz
echo . . The worst little game
echo . . Please press an option:
get c abcdefghijklmn >nul
cls
tw32 /u >nul
set amount=10000

if "%get%"=="e" set amount=40000
if "%get%"=="f" goto pal
if "%get%"=="g" goto playcd
if "%get%"=="i" goto playcd

xmsdsk %amount% z: /t /y
xcopy %romcd%\%get% z:\%get%\ /e /s
z:
cd\%get%
call play.bat
goto ask

:playcd
%romcd%
cd\%get%
call play.bat
goto ask

:pal
set paldir=%get%
tw32 >nul
echo .
echo .
echo .
echo . To play this game, you must know how much memory your computer has
echo . Which of the following is your computer's memory capacity approximately (MB, megabytes):
echo .
echo .
echo . . 32
echo . . 64
echo . . 96
echo . . 128
echo . . 160
echo . . 192
echo . . 224
echo . . 256
echo . . 288
echo . . 320
echo . . 352
echo . . 384
echo . . 416
echo . . 448
echo . . 480
echo . . 512
echo . . Please enter your computer's memory capacity (one of the numbers above), then press Enter:
get s 999 >nul

cls
tw32 /u >nul

if "%get%"=="32" goto 32

strings diskmb=sub %get%, 20
strings diskkb=mul %diskmb%, 1024
xmsdsk %diskkb% z: /t /y
goto playpal

:32
xmsdsk 30000 z: /t /y

:playpal
xcopy %romcd%\%paldir% z:\%paldir%\ /e /s
z:
cd\%paldir%
call play.bat
goto ask

:nogame
echo . .
echo . .
echo . .
echo . . Return to DOS
echo . . Restart
echo . . Shut down
echo . . Please press an option:
get c abc >nul
cls
tw32 /u >nul
if "%get%"=="a" goto final
if "%get%"=="b" goto reboot
if "%get%"=="c" goto off

:reboot
reboot

ff
off

:final




Forum Jump: