Warning: this is a htmlized version!
The original is across this link.
#######
#
# E-scripts on DOS stuff.
#
# Note 1: use the eev command (defined in eev.el) and the
# ee alias (in my .zshrc) to execute parts of this file.
# Executing this file as a whole makes no sense.
#
# Note 2: be VERY careful and make sure you understand what
# you're doing.
#
# Note 3: If you use a shell other than zsh things like |&
# and the for loops may not work.
#
# Note 4: I always run as root.
#
# Note 5: some parts are too old and don't work anymore. Some
# never worked.
#
# Note 6: the definitions for the find-xxxfile commands are on my
# .emacs.
#
# Note 7: if you see a strange command check my .zshrc -- it may
# be defined there as a function or an alias.
#
# Note 8: the sections without dates are always older than the
# sections with dates.
#
# This file is at <http://angg.twu.net/a/e/dos.e>
#           or at <http://angg.twu.net/e/dos.e.html>.
#        See also <http://angg.twu.net/emacs.html>,
#                 <http://angg.twu.net/a/.emacs[.html]>,
#                 <http://angg.twu.net/a/.zshrc[.html]>,
#                 <http://angg.twu.net/escripts.html>,
#             and <http://angg.twu.net/>.
#
#######



#######
#
# dosemu (potato)
#
#######

# pdsc $SDEBIAN/dists/potato/main/source/otherosfs/dosemu_0.98.2-1.dsc
# debian/rules binary	|& tee odrb

dpkg -i $SDEBIAN/dists/potato/main/binary-i386/otherosfs/dosemu_0.98.2-1.deb
# (find-fline "/usr/doc/dosemu/")
# (find-vldifile "dosemu.list")
# (find-fline "/usr/lib/dosemu/setup-hdimage")
# (find-fline "/usr/lib/dosemu/dexe/mkdexe")

# (find-fline "/usr/lib/dosemu/commands/autoexec.bat")

# (find-fline "~/.mtoolsrc")
# drive g: file="/var/lib/dosemu/hdimage.first" offset=8832


###
### msdos622/4dos hdimage:
###

insmod $MODULES/loop.o
umount /A
losetup -d /dev/loop0
#
losetup /dev/loop0 /big/nonfree/dos622-1.cqmi
mount -t msdos -o ro /dev/loop0 /A

cd /usr/lib/dosemu/dexe/
./mkdexe hdimage.first -b /dev/loop0 -i io.sys -m msdos.sys -C command.com \
  -o noapp

cd /big/home/4dos/
mmd g:/4dos
mcopy [4klpqv]* g:/4dos/

# (find-fline "/usr/lib/dosemu/commands/config.sys")
mcopy -ot - g:/config.sys <<'---'
device=c:\emufs.sys /D
device=c:\ems.sys
shell=c:\4dos\4dos.com /p @c:\4dos\4dos.ini
---
#
mcopy -ot - g:/autoexec.bat <<'---'
set four=c:\4dos
set dos=d:\dos
%four%\4start0.btm
---

# (find-fline "/usr/lib/dosemu/global.conf")
# (find-fline "/etc/dosemu/conf")
# (find-fline "/home/root/.dosemurc")

# (find-fline "/big/home/4dos/")


dos -ckV



mkdir /D/dos/
tar -xvzf /big/nonfree/dos622-1.tgz -C /D/dos/




#######
#
# F21 simulator
#
#######

mkdir /D/zip/
cp -iv /snarf/http/www.dnai.com/~jfox/*.zip /D/zip
cp -iv /snarf/http/www.ultratechnology.com/f21emu/f21emu12.zip /D/zip

mkdir \4th_1970 ^ cd \4th_1970 ^ pu \zip\4th_1970.zip
mkdir \emubmp1  ^ cd \emubmp1  ^ pu \zip\emubmp1.zip
mkdir \emudemo1 ^ cd \emudemo1 ^ pu \zip\emudemo1.zip
mkdir \emudemo2 ^ cd \emudemo2 ^ pu \zip\emudemo2.zip
mkdir \emudemo4 ^ cd \emudemo4 ^ pu \zip\emudemo4.zip
mkdir \f21emu12 ^ cd \f21emu12 ^ pu \zip\f21emu12.zip
mkdir \ok101    ^ cd \ok101    ^ pu \zip\ok101.zip
mkdir \s21      ^ cd \s21      ^ pu \zip\s21.zip
mkdir \usersman ^ cd \usersman ^ pu \zip\usersman.zip

cp 

# (find-fline "/D/")
# (find-fline "/D/f21emu12/f21emu.htm" "V key")
# (find-fline "/D/f21emu12/f21emu.htm" "F21.ROM")
# (find-fline "/D/ok101/ok16a.seq")

cd /D/f21emu12/
agrep LOAD * | l

# (find-fline "/D/f21emu12/sim-f21.seq" "No file to LOAD!")

cd /D/usersman/
for i in apendix1 apendix2 apendix3 intro intro2 p21forth suplemnt; do
  catdoc $i.doc > $i.txt
done
# (find-fline "/D/usersman/")



cd /snarf/http/www.dnai.com/~jfox/
for i in *.zip; do unzip -L -d /D $i; done

/snarf/http/www.ultratechnology.com/f21emu/f21emu12.zip








#######
#
# dosemu (hamm)
#
#######

cd ~/HASH/
dpkg -iE ~/HASH/dosemu

# (find-fline "/usr/doc/dosemu/")
# (find-fline "/etc/dosemu/conf")

pdsc /debian/main/source/otherosfs/dosemu_0.66.7-13.dsc
cd /usr/src/dosemu-0.66.7/
debian/rules binary |& tee odrb

cd /usr/src/dosemu-0.66.7/
debian/rules binary |& tee odrb2

# (find-fline "/usr/src/dosemu-0.66.7/odrb")




#######
#
# Wine (hamm)
#
#######

cd ~/HASH/
dpkg -i libwine0.0.9711 wine
# dpkg -i wine-doc

mkdir -p /dos/windows/system

/big/nonfree/zip/
unzip -l /snarf/ftp/jpsoft.com/4dos/4dos601.zip




#######
#
# ?
#
#######

cd /usr/lib/dosemu/dexe/
mycat * | sort | uniq

# (hexl-find-file "/var/lib/dosemu/hdimage.first")

rm -Rv /usr/src/dos-c
cd /usr/src/
unzip -L /snarf/ftp/ftp.iop.com/pub/freedos/dos-c.zip
cd /usr/src/dos-c

http://www.freedos.org/files.html





######
#
# wine
#
######

cd ~/HASH
dpkg -iE libwine0.0.971116 wine

# (find-fline "/usr/doc/wine/")
lynx /usr/doc/wine/wine-FAQ/wine-content.html
lynx /usr/doc/wine/wine-FAQ/wine-content.html#ques4.6

# (find-fline "/etc/wine.conf")

cd /
ar p ~/HASH/wine-doc data.tar.gz | tar -xvzf - usr/doc/wine'*'



#######
#
# dosemu (hamm)
#
#######

# (find-esfile "dos.e" "dosemu (hamm)")
# (find-fline "/etc/dosemu/conf")

dos -c -k -V

video { vga  console  graphics  chipset trident  memsize 1024 }




#######
#
# Loop device partitions
#
#######

# (find-k2file "Documentation/devices.txt")
# (find-k2file "Documentation/Configure.help")
# (find-k2file "drivers/block/loop.c")
# (find-k2file "fs/vfat/namei.c")

# This is a message I found via dejanews, with keywords "mkdosfs" and
# "loop".
# (find-fline "~/makeboot")

# (find-fline "/snarf/ftp/ftp.mi.us.debian.org/debian/ls-lR")

export LOOPF=/home/LOOP
export LOOPDEV=/dev/loop0
losetup -d $LOOPDEV
dd if=/dev/zero of=$LOOPF bs=1024 count=1440
losetup $LOOPDEV $LOOPF
mke2fs $LOOPDEV

# mke2fs is ok, but mkdosfs doesn't run, as it is addicted to disk
# geometry parameters and loop devices don't seem to have geometry. As
# for vfat, I don't even know if there is a "mkvfatfs".

# How can I create a loopback file with "holes" corresponding to bad
# sectors and write it to the floppy avoiding the holes?

# It would be nice to have some gzipped images of formated floppies.

# (find-fline "/usr/src/boot-floppies/rescue.sh" "-t msdos")
# (find-node "(Yard_doc)Using a Loopback Device")





#######
#
# umsdos
#
#######

# (find-k2file "Documentation/Configure.help" "umsdos:")
# (find-k2file "Documentation/filesystems/umsdos.txt")
# (find-fline "/usr/doc/umsdos_progs-0.9-2/README")
# (find-fline "/usr/doc/HOWTO/UMSDOS-HOWTO")

rpm -qpl $RP/umsdos_progs-0.9-2.i386.rpm
rpm -iv  $RP/umsdos_progs-0.9-2.i386.rpm





#######
#
# Formatting a loop partition via dosemu
#
#######

C=306
H=4
S=17
( /usr/src/dosemu-0.97.5/src/tools/periph/mkhdimage \
    -c $C -h $H -s $S
  dd if=/dev/zero bs=512 count=$[$C*$H*$S]
) > /home/hd.$C.$H.$S
#
# Now enter dos to fdisk and format the loop device (currently D:),
# then pack a clean version of it for later use.
# (find-fline    "~/98jun26.pucmail" "Subject: images")
# (find-fline "~/DOSEMU/config.edrx")
# disk { cylinders 306 heads 4 sectors 17 image "/home/hd.306.4.17" }
# A floppy has CHS=80/2/18.
#
gzip -c /home/hd.306.4.17 > ~/DOSEMU/hd.306.4.17.gz
gzip -cd ~/DOSEMU/hd.306.4.17.gz > /home/hd.306.4.17

# Mounting as /dev/loop0:
#
C=306
H=4
S=17
insmod $MODULES/loop.o
umount /L
losetup -d /dev/loop0
losetup -o 8832 /dev/loop0 /home/hd.$C.$H.$S
mount -t umsdos /dev/loop0 /L
#
# Copy the yard disk contents:
umssync /L
cp -dipvR /mnt/* /L/
#
# Go to msdos mode to zip the files:
umount /L
mount -t msdos /dev/loop0 /L

# Use the small swap partition as a dos partition:
#
# (find-fline "/etc/fstab")
free
swapoff /dev/hdd2
free
# mkdosfs -c /dev/hdd2
mkdosfs /dev/hdd2
mkdir /S
mount -t umsdos /dev/hdd2 /S
mkdir /S/linux
umssync /S/linux
cp -dipvR /mnt/* /S/linux
umount /S

# O próximo passo é pôr tudo dentro do diretório "/linux".

# (find-demufile "QuickStart" "generate a bootable")
# (find-demufile "doc/README.txt" "$_vbootfloppy = \"f")
# http://std.world.com/~bochs/
# (find-demufile "src/tools/periph/mkhdimage.c")
# (find-fline "/usr/doc/HOWTO/UMSDOS-HOWTO")

#
# Why 8832? 8832 = 128 + 8192 + 512 (=2280h), but?
# Using dd and hexl-mode, we see this "signature":
#
# 00002280: eb3c 904d 5344 4f53 352e 3000 0208 0100  .<.MSDOS5.0.....
#
# (find-k2tag "msdos_boot_sector")
# (find-k2file "fs/fat/inode.c")
# (find-k2tag "fat_read_super")
# (find-k2tag "msdos_read_super")
# (find-k2tag "UMSDOS_read_super")
# (find-k2file "fs/umsdos/inode.c" "install its linux stuff in c:\\linux")
# (find-k2file "fs/umsdos/dir.c"   "directory /DOS which points to")
# (find-enode "Display Vars" "tab-width")
# (setq tab-width 4)
#
# (find-k2file "Documentation/filesystems/umsdos.txt")
# (find-fline "/usr/doc/umsdos_progs-0.9-2/README")


cd
dd if=/home/hd.306.4.17	of=/home/root/o bs=1024 count=64
dd if=/dev/hdc		of=/home/root/o bs=1024 count=64
dd if=/dev/hdc1		of=/home/root/o bs=1024 count=64
dd if=/dev/loop0	of=/home/root/o bs=1024 count=64
# (hexl-find-file "~/o")
# (hexl-find-file "/home/hdcini")
# (find-k2file "include/






#########
#
# dosemu 0.97.5
#
#########

#  «dosemu-0.97.5»

###
### Compiling and installing
###

rm -Rv /usr/src/dosemu-0.97.5/
cd /usr/src/
tar -xvzf /snarf/ftp/ftp.suse.com/pub/dosemu/Development/dosemu-0.97.5.tgz
cd /usr/src/dosemu-0.97.5/
#
etags $(find -name '*.[ch]')
./default-configure |& tee odc
make WAIT=no |& tee om
#
cd /usr/src/dosemu-0.97.5/
make install |& tee omi
#
cp -v /usr/src/dosemu-0.97.5/etc/dosemu.users.secure /etc/dosemu.users

# (find-demufile "etc/dosemu.users.secure")
# (find-fline "/home/4dos/config.sys")
# (find-node "(zsh)Concept Index" "array")
# (find-demufile "om" "mkfatimage16 -b")
# (find-demufile "src/tools/periph/")
# (find-demufile "doc/README.txt")
# (find-demufile "doc/dosemu-HOWTO.txt")
# (find-demufile "QuickStart")

###
### Tiny bootable hdimage
###
# (find-demufile "doc/README.txt" "device=c:\\emufs.sys /dosc")
# (find-demufile "doc/README.txt" "vbootfloppy")
# (find-fline "~/DOSEMU/floppy.config")
# (find-fline "~/DOSEMU/floppy.config.sys")
# (find-fline "~/DOSEMU/floppy.4dos.ini")
# (find-fline "~/DOSEMU/floppy.files")
#
cd /usr/src/dosemu-0.97.5/
cat > config.sys <<'EOF'
device=emufs.sys /C
shell=4dos.com /p @4dos.ini
EOF

cd /usr/src/dosemu-0.97.5/
/usr/src/dosemu-0.97.5/src/tools/periph/mkfatimage16	\
  $(grep '^/' ~/DOSEMU/floppy.files)
  > /usr/src/dosemu-0.97.5/myhdimage

dos -F ~/DOSEMU/config.floppy

# (find-fline "~/DOSEMU/622.config")
dos -F ~/DOSEMU/622.config

/bin/kill dos

dd if=/dev/zero of=/home/floppy bs=1024 count=1440




###
### Preparing a (decent) bootable hdimage
###

cd /usr/src/dosemu-0.97.5/
cat > config.sys <<'EOF'
device=emufs.sys /home/root/DOS
shell=4dos.com /p @4dos.ini
EOF

A=(/big/home/root/DOS622/1/io.sys
   /big/home/root/DOS622/1/msdos.sys
   /usr/src/dosemu-0.97.5/config.sys
   /home/4dos/4alias
   /home/4dos/4dos.com
   /home/4dos/4dos.hlp
   /home/4dos/4help.exe
   /home/4dos/EMU/4dos.ini
   /home/4dos/EMU/4start.btm
   /home/4dos/l.com
   /home/4dos/pu.exe
   /home/4dos/pz.exe
   /home/4dos/q.exe
   /home/4dos/v25.com
   /home/4dos/v50.com
   /usr/src/dosemu-0.97.5/commands/[b-x]*
   /big/home/root/DOS622/1/fdisk.exe
   /big/home/root/DOS622/1/format.com
)
cd /usr/src/dosemu-0.97.5/
/usr/src/dosemu-0.97.5/src/tools/periph/mkfatimage16	\
  -b /home/root/DOS622/bootsector.622.b	$A	\
  > /usr/src/dosemu-0.97.5/myhdimage

# (find-fline "~/DOSEMU/config.edrx")
# (find-fline "/var/lib/dosemu/global.conf")
# (find-fline "/etc/dosemu.conf")
# (find-demufile "first-test")
#
dos -F ~/DOSEMU/config.edrx

# install=c:\lredir.exe e: LINUX\FS\home/root/DOS
# (find-demufile "src/commands/")
# (find-demufile "src/commands/lredir.c")
# (find-demufile "src/commands/lredir.readme")

##
## Mtools configuration
##
#
# Insert these lines manually.
# (find-demufile "doc/dosemu-HOWTO.txt" "drive g:  file=")
# (find-fline "/etc/mtools.conf")
# (find-fline "~/.mtoolsrc")
# Edrx:
drive g: file="/usr/src/dosemu-0.97.5/etc/hdimage.dist" offset=8832
drive h: file="/usr/src/dosemu-0.97.5/etc/hdimage.test" offset=8832
drive i: file="/usr/src/dosemu-0.97.5/myhdimage" offset=8832

# (find-demufile "setup-hdimage")

# (find-demufile "etc/xinstallvgafont")
# (find-demufile "etc/vga.bdf")

# (find-demufile "src/base/init/parser.y")
# (find-demufile "src/base/init/lexer.l" "keywords")
# (find-demufile "src/dosext/mfs/mfs.c")
# (find-demufile "src/dosext/mfs/mfs.h")
# (find-demufile "src/commands/emufs.S")
# (find-demufile "contrib/dosC/readme.dosemu")
# (find-demufile "dexe/")

# floppy-device bootA bootB device






#######
#
# Packing large files for dos with dosemu
#
#######

e:
arj -? > o
arj a -v1000K -m0 -y traba.arj trab.zip

cd /home/root/DOS/
mcopy traba.arj arj.exe a:
mcopy traba.a01 /home/4dos/pu.exe a:

# (find-fline "~/DOS/o")





#######
#
# making dos floppies
#
#######

mkdosfs -c /dev/fd0

mcopy \
 /D/games/acao/beast.zip	\
 /D/games/acao/blockade.zip	\
 /D/games/acao/cat.zip	\
 /D/games/acao/hhm.zip	\
 /D/games/acao/pango.zip	\
 /D/games/acao/rampage.zip	\
 /D/games/amaze/\$electro.zip	\
 /D/games/amaze/_1agent_.zip	\
 /D/games/amaze/trsisteg.zip	\
 /D/games/fbc-pboy.zip	\
 a:

cd /home/4dos/
zip ../4.zip *
mcopy ../4.zip pu.exe a:
rm ../4.zip

# How to make them bootable?

# Acho que eu guardei uma cópia de um boot sector adequado em algum
# lugar.




#######
#
# 4.zip
#
#######

cd /b1/0home/4dos
zip ~/4.zip [4adklpqv]*
mcopy pu.exe ~/4.zip a:

mkdir /home/4dos6/
cd /home/4dos6/
unzip -L /snarf/ftp/jpsoft.com/4dos/4dos601.zip

cd /home/4dos6/
zip ~/46.zip \
  4dos.com	\
  4dos.hlp	\
  4dos.ico	\
  4dos.pif	\
  4dos.txt	\
  4help.exe	\
  _4inst.btm	\
  batcomp.exe	\
  examples.btm	\
  helpcfg.exe	\
  insthelp.exe	\
  internat.txt	\
  kstack.com	\
  option.exe





########
#
# dos622 from .cqms
#
########

# Falta: count=1, silent, algo assim, e falta dar ao DOS o acesso ao
# floppy

copyqm a: playback=dos622-1.cqm
copyqm a: playback=dos622-2.cqm
copyqm a: playback=dos622-3.cqm

dd if=/dev/fd0 of=dos622-1.cqmi bs=1024 count=1440
dd if=/dev/fd0 of=dos622-2.cqmi bs=1024 count=1440

# (find-fline "/etc/mtools.conf")
# (find-fline "~/.mtoolsrc")
# drive a: file="/big/nonfree/dos622-1.cqmi"
# drive a: file="/big/nonfree/dos622-2.cqmi"

insmod $MODULES/loop.o
umount /A
losetup -d /dev/loop0

losetup /dev/loop0 /big/nonfree/dos622-1.cqmi
mount -t msdos -o ro /dev/loop0 /A


mountloop0L /big/nonfree/dos622-1.cqmi
laf --full-time /L
# (find-fline "/L/packing.lst")



mountloop0L /big/nonfree/dos622-1.cqmi
rm -Rv /D/dos/
mkdir  /D/dos/
cp -dipv /L/* /D/dos/

mountloop0L /big/nonfree/dos622-2.cqmi
rm -Rv /D/dos2/
mkdir  /D/dos2/
cp -dipv /L/* /D/dos2/

d:\dos\
rem    Setup Disk #1
rem    -------------
expand COUNTRY.TX_  COUNTRY.TXT		^ del COUNTRY.TX_ 
expand DEFRAG.HL_   DEFRAG.HLP		^ del DEFRAG.HL_  
expand DELOLDOS.EX_ DELOLDOS.EXE	^ del DELOLDOS.EX_
expand DOSHELP.HL_  DOSHELP.HLP		^ del DOSHELP.HL_ 
expand EGA.CP_      EGA.CPI		^ del EGA.CP_     
expand EGA2.CP_     EGA2.CPI		^ del EGA2.CP_    
expand EGA3.CP_     EGA3.CPI		^ del EGA3.CP_    
expand EMM386.EX_   EMM386.EXE		^ del EMM386.EX_  
expand KEYBRD2.SY_  KEYBRD2.SYS		^ del KEYBRD2.SY_ 
expand MEM.EX_      MEM.EXE		^ del MEM.EX_     
expand XCOPY.EX_    XCOPY.EXE		^ del XCOPY.EX_   
 ren   DBLSPACE.BI# DBLSPACE.BIN
rem    ATTRIB.EXE   ATTRIB.EXE
rem    AUTOEXEC.BAT AUTOEXEC.BAT
rem    BUSETUP.EXE  BUSETUP.EXE
rem    CHKDSK.EXE   CHKDSK.EXE
rem    CHOICE.COM   CHOICE.COM
rem    COMMAND.COM  COMMAND.COM
rem    CONFIG.SYS   CONFIG.SYS
rem    COUNTRY.SYS  COUNTRY.SYS
rem    DEBUG.EXE    DEBUG.EXE
rem    DEFRAG.EXE   DEFRAG.EXE
rem    DOSSETUP.INI DOSSETUP.INI
rem    DRVSPACE.BIN DRVSPACE.BIN
rem    EDIT.COM     EDIT.COM
rem    EXPAND.EXE   EXPAND.EXE
rem    FDISK.EXE    FDISK.EXE
rem    FORMAT.COM   FORMAT.COM
rem    IO.SYS       IO.SYS
rem    KEYB.COM     KEYB.COM
rem    KEYBOARD.SYS KEYBOARD.SYS
rem    MSCDEX.EXE   MSCDEX.EXE
rem    MSDOS.SYS    MSDOS.SYS
rem    NETWORKS.TXT NETWORKS.TXT
rem    NLSFUNC.EXE  NLSFUNC.EXE
rem    OS2.TXT      OS2.TXT
rem    PACKING.LST  PACKING.LST
rem    QBASIC.EXE   QBASIC.EXE
rem    README.TXT   README.TXT
rem    SCANDISK.EXE SCANDISK.EXE
rem    SCANDISK.INI SCANDISK.INI
rem    SETUP.EXE    SETUP.EXE
rem    SETUP.MSG    SETUP.MSG
rem    SYS.COM      SYS.COM
rem    UNINSTAL.EXE UNINSTAL.EXE

d:\dos2\
rem    Setup Disk #2
rem    -------------
expand ANSI.SY_     ANSI.SYS		^ del ANSI.SY_
expand APPEND.EX_   APPEND.EXE		^ del APPEND.EX_
expand CHKSTATE.SY_ CHKSTATE.SYS	^ del CHKSTATE.SY_
expand DBLWIN.HL_   DBLWIN.HLP		^ del DBLWIN.HL_
expand DELTREE.EX_  DELTREE.EXE		^ del DELTREE.EX_
expand DISKCOMP.CO_ DISKCOMP.COM	^ del DISKCOMP.CO_
expand DISKCOPY.CO_ DISKCOPY.COM	^ del DISKCOPY.CO_
expand DISPLAY.SY_  DISPLAY.SYS		^ del DISPLAY.SY_
expand DMDRVR.BI_   DMDRVR.BIN		^ del DMDRVR.BI_
expand DOSKEY.CO_   DOSKEY.COM		^ del DOSKEY.CO_
expand DRIVER.SY_   DRIVER.SYS		^ del DRIVER.SY_
expand DRVSPACE.HL_ DRVSPACE.HLP	^ del DRVSPACE.HL_
expand DRVSPACE.IN_ DRVSPACE.INF	^ del DRVSPACE.IN_
expand DRVSPACE.SY_ DRVSPACE.SYS	^ del DRVSPACE.SY_
expand EDIT.HL_     EDIT.HLP		^ del EDIT.HL_
expand FASTHELP.EX_ FASTHELP.EXE	^ del FASTHELP.EX_
expand FASTOPEN.EX_ FASTOPEN.EXE	^ del FASTOPEN.EX_
expand FC.EX_       FC.EXE		^ del FC.EX_
expand FIND.EX_     FIND.EXE		^ del FIND.EX_
expand GRAPHICS.CO_ GRAPHICS.COM	^ del GRAPHICS.CO_
expand GRAPHICS.PR_ GRAPHICS.PRO	^ del GRAPHICS.PR_
expand HELP.HL_     HELP.HLP		^ del HELP.HL_
expand HIMEM.SY_    HIMEM.SYS		^ del HIMEM.SY_
expand INTERLNK.EX_ INTERLNK.EXE	^ del INTERLNK.EX_
expand INTERSVR.EX_ INTERSVR.EXE	^ del INTERSVR.EX_
expand LABEL.EX_    LABEL.EXE		^ del LABEL.EX_
expand LOADFIX.CO_  LOADFIX.COM		^ del LOADFIX.CO_
expand MEMMAKER.HL_ MEMMAKER.HLP	^ del MEMMAKER.HL_
expand MEMMAKER.IN_ MEMMAKER.INF	^ del MEMMAKER.IN_
expand MODE.CO_     MODE.COM		^ del MODE.CO_
expand MONOUMB.38_  MONOUMB.386		^ del MONOUMB.38_
expand MOUSE.CO_    MOUSE.COM		^ del MOUSE.CO_
expand MOVE.EX_     MOVE.EXE		^ del MOVE.EX_
expand MSBACKUP.EX_ MSBACKUP.EXE	^ del MSBACKUP.EX_
expand MSBCONFG.HL_ MSBCONFG.HLP	^ del MSBCONFG.HL_
expand MSTOOLS.DL_  MSTOOLS.DLL		^ del MSTOOLS.DL_
expand MWBACKR.DL_  MWBACKR.DLL		^ del MWBACKR.DL_
expand POWER.EX_    POWER.EXE		^ del POWER.EX_
expand QBASIC.HL_   QBASIC.HLP		^ del QBASIC.HL_
expand RAMDRIVE.SY_ RAMDRIVE.SYS	^ del RAMDRIVE.SY_
expand REPLACE.EX_  REPLACE.EXE		^ del REPLACE.EX_
expand RESTORE.EX_  RESTORE.EXE		^ del RESTORE.EX_
expand SETVER.EX_   SETVER.EXE		^ del SETVER.EX_
expand SHARE.EX_    SHARE.EXE		^ del SHARE.EX_
expand SIZER.EX_    SIZER.EXE		^ del SIZER.EX_
expand SMARTDRV.EX_ SMARTDRV.EXE	^ del SMARTDRV.EX_
expand SMARTMON.EX_ SMARTMON.EXE	^ del SMARTMON.EX_
expand SMARTMON.HL_ SMARTMON.HLP	^ del SMARTMON.HL_
expand SORT.EX_     SORT.EXE		^ del SORT.EX_
expand SSTOR.SY_    SSTOR.SYS		^ del SSTOR.SY_
expand SUBST.EX_    SUBST.EXE		^ del SUBST.EX_
expand TREE.CO_     TREE.COM		^ del TREE.CO_
expand VFINTD.38_   VFINTD.386		^ del VFINTD.38_
expand WINA20.38_   WINA20.386		^ del WINA20.38_
expand XBIOS.OV_    XBIOS.OVL		^ del XBIOS.OV_
rem    DRVSPACE.EXE DRVSPACE.EXE
rem    HELP.COM     HELP.COM
rem    MEMMAKER.EXE MEMMAKER.EXE
rem    MORE.COM     MORE.COM
rem    MSBCONFG.OVL MSBCONFG.OVL
rem    MSD.EXE      MSD.EXE
rem    SPATCH.BAT   SPATCH.BAT
rem    UNFORMAT.COM UNFORMAT.COM

rem rem    Setup Disk #3
rem rem    -------------
rem expand AV.GR_       AV.GRP
rem expand BK.GR_       BK.GRP
rem expand BKAV.GR_     BKAV.GRP
rem expand BKUD.GR_     BKUD.GRP
rem expand BKUDAV.GR_   BKUDAV.GRP
rem rem    MSAV.EXE     MSAV.EXE
rem expand MSAV.HL_     MSAV.HLP
rem expand MSAVHELP.OV_ MSAVHELP.OVL
rem expand MSAVIRUS.LS_ MSAVIRUS.LST
rem rem    MSBACKDB.OVL MSBACKDB.OVL
rem rem    MSBACKDR.OVL MSBACKDR.OVL
rem rem    MSBACKFB.OVL MSBACKFB.OVL
rem rem    MSBACKFR.OVL MSBACKFR.OVL
rem expand MSBACKUP.HL_ MSBACKUP.HLP
rem rem    MSBACKUP.OVL MSBACKUP.OVL
rem expand MWAV.EX_     MWAV.EXE
rem expand MWAV.HL_     MWAV.HLP
rem expand MWAVABSI.DL_ MWAVABSI.DLL
rem expand MWAVDLG.DL_  MWAVDLG.DLL
rem expand MWAVDOSL.DL_ MWAVDOSL.DLL
rem expand MWAVDRVL.DL_ MWAVDRVL.DLL
rem expand MWAVMGR.DL_  MWAVMGR.DLL
rem expand MWAVSCAN.DL_ MWAVSCAN.DLL
rem expand MWAVSOS.DL_  MWAVSOS.DLL
rem expand MWAVTSR.EX_  MWAVTSR.EXE
rem expand MWBACKF.DL_  MWBACKF.DLL
rem expand MWBACKUP.EX_ MWBACKUP.EXE
rem expand MWBACKUP.HL_ MWBACKUP.HLP
rem expand MWGRAFIC.DL_ MWGRAFIC.DLL
rem expand MWUNDEL.EX_  MWUNDEL.EXE
rem expand MWUNDEL.HL_  MWUNDEL.HLP
rem expand PRINT.EX_    PRINT.EXE
rem expand UD.GR_       UD.GRP
rem expand UDAV.GR_     UDAV.GRP
rem rem    UNDELETE.EXE UNDELETE.EXE
rem expand VSAFE.CO_    VSAFE.COM
rem expand WNTOOLS.GR_  WNTOOLS.GRP

mount /big -o rw,remount
cd /D/dos/
tar -cvzf /big/nonfree/dos622-1.tgz *
cd /D/dos2/
tar -cvzf /big/nonfree/dos622-2.tgz *
mount /big -o ro,remount




#########
#
# fips20
#
#########

rm -Rv /usr/src/fips20/
mkdir  /usr/src/fips20/
cd     /usr/src/fips20/
unzip /snarf/http/www.igd.fhg.de/~aschaefe/fips/fips20.zip





#######
#
# baixando coisas de windows e zipando-as
#
#######

#  «receita_zip»

edrxnetscape http://www.receita.fazenda.gov.br/ &
lynx $S/http/www.receita.fazenda.gov.br/PessoaJuridica/dctf/programa.htm

psne http://www.receita.fazenda.gov.br/publico/programas/DCTF/Dctf10.exe
psne http://www.receita.fazenda.gov.br/publico/programas/DCTF/Dctf10.w02
psne http://www.receita.fazenda.gov.br/publico/programas/DCTF/Dctf10.w03
psne http://www.receita.fazenda.gov.br/publico/programas/DCTF/Dctf10.w04

cd $S/http/www.receita.fazenda.gov.br/publico/programas/DCTF/
zip /tmp/d.zip Dctf*
cd /tmp/
laf
splzip d.zip 1400 00 01 02 03 04 05 06 07 08
rm <00-08>
laf

mcopy 00.zip 01.zip a:
mcopy 02.zip 03.zip a:
mcopy 04.zip 05.zip a:
mcopy 06.zip 07.zip a:
mcopy 08.zip gruda.bat a:




######
#
# formating floppies
#
######

#  «format»

# (find-fline "/usr/doc/dosfstools/")
# (eeman "mkdosfs")

mkdosfs -c -v /dev/fd0

# (find-fline "/usr/doc/fdutils/")
lynx /usr/doc/fdutils/FAQ.html





######
#
# dosemu on slink: preparing a 4dos hdimage
# 99nov??
#
######

#  «dosemu_slink_4dos»
# (find-es "dos" "dosemu_slink_long")

apti dosemu

DEB=/big/slinkb1/dists/slink/main/binary-i386/otherosfs/dosemu_0.98.1-3.deb
ar p $DEB data.tar.gz \
  | tar -xvzOf - var/lib/dosemu/hdimage.first \
  > /tmp/hdimage.test

# (find-fline "~/.mtoolsrc")
# drive t: file="/tmp/hdimage.test" partition=1 offset=128

rm -Rv /tmp/dosemuprogs/
mkdir  /tmp/dosemuprogs/
cd     /tmp/dosemuprogs/
mcopy t:'*' .
for i in *; do mv -v $i $(echo $i | tr A-Z a-z); done

rm -Rv /tmp/dos622-1/
mkdir  /tmp/dos622-1/
cd     /tmp/dos622-1/
tar -xvzf /big/nonfree/dos622-1.tgz

rm -Rv /tmp/4dos601/
mkdir  /tmp/4dos601/
cd     /tmp/4dos601/
unzip -L $S/ftp/jpsoft.com/4dos/4dos601.zip

rm -Rv /tmp/dos/
mkdir  /tmp/dos/
cd     /tmp/dos/
ln -s ../4dos601 4dos
ln -s ../dos622-1 dos
ln -s ../dosemuprogs dosemu

crlf > /tmp/config.sys <<'---'
shell=d:\4dos\4dos.com d:\4dos\ /P
device=c:\emufs.sys /tmp/dos
device=c:\ems.sys
---
cd /tmp/dos/4dos/
crlf > 4dos.ini <<'---'
[4DOS]
InstallPath = D:\4DOS\
---
mv -v _4inst.btm _4inst0.btm
#
mkfatimage16 -b /big/home/root/DOS622/bootsector.622 \
  /tmp/dos622-1/{io.sys,msdos.sys,command.com}	\
  /tmp/config.sys		\
  /tmp/dosemuprogs/{exitemu.com,emufs.sys,ems.sys}	\
  > /var/lib/dosemu/hdimage.first



# (find-fline "/etc/dosemu/conf" "$_term_char_set")
# (find-fline "/usr/lib/dosemu/global.conf")
# (eeman "dos" "  -I")
# Seems that the $_ variables are changing nothing...

dos -c
dos -c -I '$_term_char_set = "ibm"'
dos -c -I '$_term_char_set = "latin"'

dos -I '$_term_char_set = "ibm"'
dos -I '$_term_char_set = "latin"'
dos -I '$_term_color = (off)'

dos -c -e 4096
dos -c -e 8192 -I '$_ems = (4096)' 
dos -c -h -M 8192 -I '$_ems = (4096)'	|& l





# Older version, simpler and works to a certain extent

crlf > /tmp/config.sys <<'---'
rem shell=c:\command.com
shell=c:\4dos.com /P
---
#
cd /tmp/dos622-1/
mkfatimage16 -b /big/home/root/DOS622/bootsector.622 \
  io.sys msdos.sys command.com	\
  /tmp/config.sys		\
  /tmp/dosemuprogs/{exitemu.com}	\
  /tmp/4dos601/*.{com,exe}	\
  > /var/lib/dosemu/hdimage.first

laf /var/lib/dosemu/hdimage.first

 /tmp/config.sys


# (find-fline "/big/home/root/DOS622/")
# (find-fline "/big/junhome/dosboot/")
# (find-fline "/big/junhome/dosboot/config.sys")



# (find-vldifile "dosemu.list")
# (find-fline "/usr/doc/dosemu/")


unzip -l $S/ftp/jpsoft.com/4dos/4dos601.zip



cd /usr/src/dosemu-0.98.1/
DOSC=contrib/dosC/dist
mkfatimage16 -b $DOSC/boot.bin -l DOSEMU \
	$DOSC/ipl.sys $DOSC/kernel.exe $DOSC/command.com \
	0.98.1.0/commands/* >/tmp/hdimage.test








# (find-demufile "src/tools/periph/bootsect.S")









######
#
# dosemu on slink; lots of notes
# 99nov27
#
######

#  «dosemu_slink_long»
# (find-es "dos" "dosemu_slink_4dos")

apti dosemu

# (find-vldifile "dosemu.list")
# (find-fline "/usr/doc/dosemu/")
# (find-fline "/usr/doc/dosemu/README.Debian")
# (find-fline "/usr/doc/dosemu/QuickStart.gz")
# (find-fline "/usr/doc/dosemu/QuickStart.gz" "drive g:")
# (find-fline "/usr/doc/dosemu/README-tech.txt.gz")
# (find-fline "/usr/doc/dosemu/README.txt.gz")
# (find-fline "/etc/dosemu/")
# (find-fline "/etc/dosemu/conf")
# (find-fline "/etc/mtools.conf" "hdimage.first")
# (find-fline "/var/lib/dosemu/")
# (eeman "5 mtools")
# (eeman "dos")
# (eeman "dos" "OPTIONS")



# (find-es "dos" "dosemu-0.97.5")

strace-to ~/s dos
getstrings < ~/s | sort | uniq | tee ~/o
# (find-fline "~/o")

pdsc /big/slinks2/dists/slink/main/source/otherosfs/dosemu_0.98.1-3.dsc
cd /usr/src/dosemu-0.98.1/
find * -type f | glimpseindex -H . -F

cd /usr/src/dosemu-0.98.1/
debian/rules binary	|& tee odrb
# (find-demufile "odrb")
# (find-demufile "odrb" "lib_hdd5")
# (find-demufile "src/env/video/Makefile")
# (find-demufile "src/env/video/")

alias dosglimpse='cd /usr/src/dosemu-0.98.1/; glimpse -y -H .'
dosglimpse -il hdimage
dosglimpse -il hdimage.first
dosglimpse -il hdimage.test	| tee ~/o


# (find-demufile "ChangeLog"			"hdimage.test")
# (find-demufile "contrib/dosC/readme.dosemu"	"hdimage.test")
# (find-demufile "etc/config.test"		"hdimage.test")
# (find-demufile "first-test"			"hdimage.test")
# (find-demufile "src/tools/periph/Makefile"	"hdimage.test")
# (find-demufile "src/tools/mkbindist"		"hdimage.test")


# (find-demufile "debian/rules"			"hdimage.test")
# (find-demufile "src/tools/periph/Makefile"	"hdimage.test:")
# (eeman "mkfatimage16")

cd /usr/src/dosemu-0.98.1/
DOSC=contrib/dosC/dist
mkfatimage16 -b $DOSC/boot.bin -l DOSEMU \
	$DOSC/ipl.sys $DOSC/kernel.exe $DOSC/command.com \
	0.98.1.0/commands/* >/tmp/hdimage.test


ar p dosemu data.tar.gz | tar -tvzf -

# (find-fline "/etc/mtools.conf")
# edrx:
drive t: file="/tmp/hdimage.test" partition=1 offset=128


DEB=/big/slinkb1/dists/slink/main/binary-i386/otherosfs/dosemu_0.98.1-3.deb
ar p $DEB data.tar.gz \
  | tar -xvzOf - var/lib/dosemu/hdimage.first \
  > /tmp/hdimage.test

rm -Rv /tmp/dosemuprogs/
mkdir  /tmp/dosemuprogs/


# (find-demufile "src/tools/periph/bootsect.S")



# (find-demufile "src/doc/README/")
# (find-demufile "src/doc/")
sort ~/s | uniq | getstrings | sort | uniq | l


apti dosfstools
# (find-vldifile "dosfstools.list")
# (find-fline "/usr/doc/dosfstools/")