Agent Orange
Veteran Member
Below are all the ingredients for a simple, precious memory sipping, DOS menu program for the purist. Kudos to Van Wolverton.
The following is a list of all the doc's, .com's, and .bat's that are required. These small programs are to be assembled in DOS using DEBUG. You will need to install ANSI.SYS in your CONFIG.SYS ([device=c:\dos\ansi.sys] for example) in order for the ASCII codes and menu overlay to function properly. Make a directory on your c:\ drive named 'MENU'. All of the files associated with the menu program should be located in the 'MENU' directory.
1) ANSI_ESC.TXT - using the prompt $e[ function to add color
2) MAINMENU.BAT - menu program
3) BIGCURS.COM - turns the cursor into a block
4) NOCURS.COM - turns the cursor off
5) NORMCURS.COM - returns the cursor to its normal appearance
6) REPLY.COM - holds the cursor in its place within the MAINMENU.BAT program
7) MAINMENU.DOC - ASCII representation of the menu overlay
ANSI_ESC.TXT
MAINMENU.DOC
Please note: The above MAINMENU.DOC comprised of ASCII
characters and is difficult to represent on a modern system.
ASCII character codes used in the menu overlay:
The following is a list of all the doc's, .com's, and .bat's that are required. These small programs are to be assembled in DOS using DEBUG. You will need to install ANSI.SYS in your CONFIG.SYS ([device=c:\dos\ansi.sys] for example) in order for the ASCII codes and menu overlay to function properly. Make a directory on your c:\ drive named 'MENU'. All of the files associated with the menu program should be located in the 'MENU' directory.
1) ANSI_ESC.TXT - using the prompt $e[ function to add color
2) MAINMENU.BAT - menu program
3) BIGCURS.COM - turns the cursor into a block
4) NOCURS.COM - turns the cursor off
5) NORMCURS.COM - returns the cursor to its normal appearance
6) REPLY.COM - holds the cursor in its place within the MAINMENU.BAT program
7) MAINMENU.DOC - ASCII representation of the menu overlay
Code:
REPLY.COM
debug
-a 100
xxxx:0100 mov ah,8
xxxx:0102 int 21
xxxx:0104 cmp al,0
xxxx:0106 jnz 10a
xxxx:0108 int 21
xxxx:010A mov ah,4c
xxxx:010C int 21
xxxx:010E
-r cx
CX 0000
:e
-n reply.com
-w
Writing 000E bytes
-q
Code:
BIGCURS.COM
debug
-a 100
xxxx:0100 mov ah,1
xxxx:0102 mov cx,10C
xxxx:0105 int 10
xxxx:0107 int 20
xxxx:0109
-r cx
CX 0000
:9
-n bigcurs.com
-w
Writing 0009 bytes
-q
Code:
NORMCURS.COM
debug
-a 100
xxxx:0100 mov ah,0f
xxxx:0102 int 10
xxxx:0104 cmp al,7
xxxx:0106 jz 10d
xxxx:0108 mov cx,607
xxxx:010B jmp 110
xxxx:010D mov cx,0b8c
xxxx:0110 mov ah,1
xxxx:0112 int 10
xxxx:0114 int 20
xxxx:0116
-r cx
CX 0000
:16
-n normcurs
-w
Writing 0016 bytes
-q
Code:
NOCURS.COM
debug
-a 100
xxxx:0100 mov ah,1
xxxx:0102 mov ch,20
xxxx:0104 int 10
xxxx:0106 int 20
xxxx:0108
-r cx
CX 0000
:8
-n nocurs.com
-w
Writing 0008 bytes
-q
ANSI_ESC.TXT
Code:
ANSI Escape Codes (Examples)
Command Foreground / Background
prompt $e[37;41m = White Red
prompt $e[37;44m = White Blue
prompt $e[1;33;41m = High-intensity yellow Blue
prompt $e[1;33;44m = High-intensity yellow Blue
prompt $e[1;36;44m = High-intensity yellow Blue
prompt $e[1;37;44m = High intensity yellow Blue
prompt $e[1;37;46m = High intensity yellow Cyan
Code:
MAINMENU.BAT
debug
echo off
:START
cls
cd c:\menu
nocurs
type mainmenu.doc
:GET_RPLY
reply
if errorlevel 69 goto GET_RPLY
if errorlevel 68 goto F10
if errorlevel 67 goto F9
if errorlevel 66 goto F8
if errorlevel 65 goto F7
if errorlevel 64 goto F6
if errorlevel 63 goto F5
if errorlevel 62 goto F4
if errorlevel 61 goto F3
if errorlevel 60 goto F2
if errorlevel 59 goto F1
goto GET_RPLY
:F10
normcurs
cls
goto END
:F9
goto GET_RPLY
:F8
normcurs
c:\
qd.bat ;(sample program)
:F7
goto GET_RPLY
:F6
goto GET_RPLY
:F5
goto GET_RPLY
:F4
goto GET_RPLY
F3
goto GET_RPLY
:F2
goto GET_RPLY
:F1
cls
nocurs
reply
normcurs
goto START
:END
MAINMENU.DOC
Code:
[ATTACH=CONFIG]55890[/ATTACH]
Please note: The above MAINMENU.DOC comprised of ASCII
characters and is difficult to represent on a modern system.
ASCII character codes used in the menu overlay:
Code:
╔ Alt-201 ═ Alt-205 ╗ Alt-187
║ Alt-186 ▒ Alt-177 ▓ Alt-178
╠ Alt-204 ╣ Alt-185 ╚ Alt-200
╝ Alt-188