Kerr-Mudd, John
2024-09-21 16:10:40 UTC
In case there's any interest in amb - best reply to comp - note the Usage
text in the dump, and the example menu.
Begin forwarded message:
Date: Sat, 21 Sep 2024 12:40:02 +0100
From: "Kerr-Mudd, John" <***@127.0.0.1>
Newsgroups: alt.lang.asm,comp.os.msdos.programmer
Subject: DOS menubar
in 255 with help msg; expanded from an idea I had ages back for a bootmenu
(that had hardcoded sizes); example menu reworked from an old network
boot floppy. Note dodgy number parsing, also the amazing jmp on csrkey
code - ('aad 0x13' is *nearly* perfect! - PgDn is the letdown)
-> d 100 lFF
16AF:0100 BE 80 00 AC-98 91 E3 15-46 49 B2 0A-31 ED AC 2C ........FI..1..,
16AF:0110 30 98 72 2F-74 12 95 F6-E2 01 C5 EB-2E B4 09 BA 0.r/t...........
16AF:0120 A5 01 CD 21-B0 00 EB 79-80 3C 39 76-E9 46 80 E9 ...!...y.<9v.F..
16AF:0130 03 72 1A 88-C6 AC 24 4F-D4 37 30 CF-75 F5 88 F4 .r....$O.70.u...
16AF:0140 D5 10 95 09-ED 74 04 55-31 ED 43 E2-C1 80 FB 05 .....t.U1.C.....
16AF:0150 75 CB 58 88-C5 5A 58 88-C6 5B 58 48-B7 A0 F6 E7 u.X..ZX..[XH....
16AF:0160 B7 00 01 D8-01 D8 2D A1-00 95 BB 00-B8 8E DB B3 ......-.........
16AF:0170 00 43 43 FE-CB 75 02 88-D3 38 D3 77-F2 B0 A0 F6 .CC..u...8.w....
16AF:0180 E7 97 88 F1-3E 30 2B AF-FE C9 75 F8-38 DF 88 DF ....>0+...u.8...
16AF:0190 75 EB B4 00-CD 16 D5 13-7B D9 78 D5-04 D2 74 01 u.......{.x...t.
16AF:01A0 93 B4 4C CD-21 55 73 61-67 65 20 69-73 3A 20 6D ..L.!Usage is: m
16AF:01B0 62 61 72 20-53 74 61 72-74 52 6F 77-20 53 74 61 bar StartRow Sta
16AF:01C0 72 74 43 6F-6C 20 42 61-72 57 69 64-74 68 20 4E rtCol BarWidth N
16AF:01D0 75 6D 52 6F-77 73 20 42-61 72 43 6C-72 0D 0A 0A umRows BarClr...
16AF:01E0 20 20 35 20-70 61 72 6D-73 3A 20 64-65 63 69 6D 5 parms: decim
16AF:01F0 61 6C 20-6F 72 20 27-30 78 48 48-27 0D 0A 24 al or '0xHH'..$
-> q
or
BE 80 00 AC 98 91 E3 15 46 49 B2 0A 31 ED AC 2C
30 98 72 2F 74 12 95 F6 E2 01 C5 EB 2E B4 09 BA
A5 01 CD 21 B0 00 EB 79 80 3C 39 76 E9 46 80 E9
03 72 1A 88 C6 AC 24 4F D4 37 30 CF 75 F5 88 F4
D5 10 95 09 ED 74 04 55 31 ED 43 E2 C1 80 FB 05
75 CB 58 88 C5 5A 58 88 C6 5B 58 48 B7 A0 F6 E7
B7 00 01 D8 01 D8 2D A1 00 95 BB 00 B8 8E DB B3
00 43 43 FE CB 75 02 88 D3 38 D3 77 F2 B0 A0 F6
E7 97 88 F1 3E 30 2B AF FE C9 75 F8 38 DF 88 DF
75 EB B4 00 CD 16 D5 13 7B D9 78 D5 04 D2 74 01
93 B4 4C CD 21 55 73 61 67 65 20 69 73 3A 20 6D
62 61 72 20 53 74 61 72 74 52 6F 77 20 53 74 61
72 74 43 6F 6C 20 42 61 72 57 69 64 74 68 20 4E
75 6D 52 6F 77 73 20 42 61 72 43 6C 72 0D 0A 0A
20 20 35 20 70 61 72 6D 73 3A 20 64 65 63 69 6D
61 6C 20 6F 72 20 27 30 78 48 48 27 0D 0A 24
example:
@echo off
cls
echo.
echo Choose Network Card
echo.
echo 1. E100B (Compaqs,Tosh portege)
echo 2. EL90X (Dell 400)
echo 3. EL556 (Dell 800)
echo 4. XirCom (Tecra 8000, etc)
echo 5. elpc3x (other laptops)
echo 6. elnk3 (older PCs)
echo 7. NE2000 (other PCs)
echo 8. RTL8029
echo.
rem choice /c:12345678X
mbar 4 7 30 8 0x38
::if not errorlevel 1 echo No NIC chosen &goto exit
if errorlevel 1 if not errorlevel 2 set netc=E100B
if errorlevel 2 if not errorlevel 3 set netc=EL90X
if errorlevel 3 if not errorlevel 4 set netc=EL556
if errorlevel 4 if not errorlevel 5 set netc=CE3NDIS
if errorlevel 5 if not errorlevel 6 set netc=ELPC3X
if errorlevel 6 if not errorlevel 7 set netc=ELNK3
if errorlevel 7 if not errorlevel 8 set netc=KEND
if errorlevel 8 if not errorlevel 9 set netc=PCIND
:havenic
echo Card chosen is %errorlevel% %netc%
text in the dump, and the example menu.
Begin forwarded message:
Date: Sat, 21 Sep 2024 12:40:02 +0100
From: "Kerr-Mudd, John" <***@127.0.0.1>
Newsgroups: alt.lang.asm,comp.os.msdos.programmer
Subject: DOS menubar
in 255 with help msg; expanded from an idea I had ages back for a bootmenu
(that had hardcoded sizes); example menu reworked from an old network
boot floppy. Note dodgy number parsing, also the amazing jmp on csrkey
code - ('aad 0x13' is *nearly* perfect! - PgDn is the letdown)
-> d 100 lFF
16AF:0100 BE 80 00 AC-98 91 E3 15-46 49 B2 0A-31 ED AC 2C ........FI..1..,
16AF:0110 30 98 72 2F-74 12 95 F6-E2 01 C5 EB-2E B4 09 BA 0.r/t...........
16AF:0120 A5 01 CD 21-B0 00 EB 79-80 3C 39 76-E9 46 80 E9 ...!...y.<9v.F..
16AF:0130 03 72 1A 88-C6 AC 24 4F-D4 37 30 CF-75 F5 88 F4 .r....$O.70.u...
16AF:0140 D5 10 95 09-ED 74 04 55-31 ED 43 E2-C1 80 FB 05 .....t.U1.C.....
16AF:0150 75 CB 58 88-C5 5A 58 88-C6 5B 58 48-B7 A0 F6 E7 u.X..ZX..[XH....
16AF:0160 B7 00 01 D8-01 D8 2D A1-00 95 BB 00-B8 8E DB B3 ......-.........
16AF:0170 00 43 43 FE-CB 75 02 88-D3 38 D3 77-F2 B0 A0 F6 .CC..u...8.w....
16AF:0180 E7 97 88 F1-3E 30 2B AF-FE C9 75 F8-38 DF 88 DF ....>0+...u.8...
16AF:0190 75 EB B4 00-CD 16 D5 13-7B D9 78 D5-04 D2 74 01 u.......{.x...t.
16AF:01A0 93 B4 4C CD-21 55 73 61-67 65 20 69-73 3A 20 6D ..L.!Usage is: m
16AF:01B0 62 61 72 20-53 74 61 72-74 52 6F 77-20 53 74 61 bar StartRow Sta
16AF:01C0 72 74 43 6F-6C 20 42 61-72 57 69 64-74 68 20 4E rtCol BarWidth N
16AF:01D0 75 6D 52 6F-77 73 20 42-61 72 43 6C-72 0D 0A 0A umRows BarClr...
16AF:01E0 20 20 35 20-70 61 72 6D-73 3A 20 64-65 63 69 6D 5 parms: decim
16AF:01F0 61 6C 20-6F 72 20 27-30 78 48 48-27 0D 0A 24 al or '0xHH'..$
-> q
or
BE 80 00 AC 98 91 E3 15 46 49 B2 0A 31 ED AC 2C
30 98 72 2F 74 12 95 F6 E2 01 C5 EB 2E B4 09 BA
A5 01 CD 21 B0 00 EB 79 80 3C 39 76 E9 46 80 E9
03 72 1A 88 C6 AC 24 4F D4 37 30 CF 75 F5 88 F4
D5 10 95 09 ED 74 04 55 31 ED 43 E2 C1 80 FB 05
75 CB 58 88 C5 5A 58 88 C6 5B 58 48 B7 A0 F6 E7
B7 00 01 D8 01 D8 2D A1 00 95 BB 00 B8 8E DB B3
00 43 43 FE CB 75 02 88 D3 38 D3 77 F2 B0 A0 F6
E7 97 88 F1 3E 30 2B AF FE C9 75 F8 38 DF 88 DF
75 EB B4 00 CD 16 D5 13 7B D9 78 D5 04 D2 74 01
93 B4 4C CD 21 55 73 61 67 65 20 69 73 3A 20 6D
62 61 72 20 53 74 61 72 74 52 6F 77 20 53 74 61
72 74 43 6F 6C 20 42 61 72 57 69 64 74 68 20 4E
75 6D 52 6F 77 73 20 42 61 72 43 6C 72 0D 0A 0A
20 20 35 20 70 61 72 6D 73 3A 20 64 65 63 69 6D
61 6C 20 6F 72 20 27 30 78 48 48 27 0D 0A 24
example:
@echo off
cls
echo.
echo Choose Network Card
echo.
echo 1. E100B (Compaqs,Tosh portege)
echo 2. EL90X (Dell 400)
echo 3. EL556 (Dell 800)
echo 4. XirCom (Tecra 8000, etc)
echo 5. elpc3x (other laptops)
echo 6. elnk3 (older PCs)
echo 7. NE2000 (other PCs)
echo 8. RTL8029
echo.
rem choice /c:12345678X
mbar 4 7 30 8 0x38
::if not errorlevel 1 echo No NIC chosen &goto exit
if errorlevel 1 if not errorlevel 2 set netc=E100B
if errorlevel 2 if not errorlevel 3 set netc=EL90X
if errorlevel 3 if not errorlevel 4 set netc=EL556
if errorlevel 4 if not errorlevel 5 set netc=CE3NDIS
if errorlevel 5 if not errorlevel 6 set netc=ELPC3X
if errorlevel 6 if not errorlevel 7 set netc=ELNK3
if errorlevel 7 if not errorlevel 8 set netc=KEND
if errorlevel 8 if not errorlevel 9 set netc=PCIND
:havenic
echo Card chosen is %errorlevel% %netc%
--
Bah, and indeed Humbug.
--
Bah, and indeed Humbug.
Bah, and indeed Humbug.
--
Bah, and indeed Humbug.