0707010516232C000041ED000000000000000000000002640A348F00000000000000080000000200000000000000000000000200000000. 07070105162348000081A4000000000000000000000001640A348F00000036000000080000000200000000000000000000000B00000000files.list /usr/bin/runcom
/usr/bin/debug.com
/usr/bin/debug.bin
07070105162346000081A4000000000000000000000001640A348E000005C7000000080000000200000000000000000000001000000000description.txt Runcom support DOS .com binary files and boot sector files.
1- The DOS .com support
Runcom provides few BIOS and DOS (int 21H) interrupt handlers. Many .com files
may not work. DOS .exe are also supported.
You can test it with the file /usr/bin/debug.com, with the command line :
$ debug.com
2- The boot sector image support
A boot sector image is a 512 bytes file ending with the 0xAA and 0x55 bytes
with the .bin extension.
Bios disk (int 13H) are emulated (CHS or LBA) with an image file :
- hard disk are image ./hd0, ./hd1, ... for disk 0x80, 0x81...
- floppy disk are image ./fd0, ./fd1 ... or /dev/fd0, /dev/fd1 if not found.
You can test it with the file /usr/bin/debug.bin, with the command line :
$ debug.bin
3- The 512 bytes boot sector debugger /usr/bin/debug.bin
Usage:
f DX:CX load one CHS sector to 0000:7C00
t trace one step
g
go to adrs
d display 16 bytes, CR for next 16 bytes...
e ... enter memory byte/word/dword
m self move
+ default segment offset
seqment and offset are hexadecimal values in 0..FFFF range
address is linear hexadecimal value in 0..FFFFF range or seqment:offset
words are bytes in 0..FF range or words in 000..FFFF range or double words
CX and DX are used by INT13H/AL=01 BIOS interrupt.
Example:
m 0FC0 move debugger to 0FC0:0000 0FC0:01FF
f 1 read floppy boot sector to 0000:7C00
f 80:1 read hard disk master boot sector to 0000:7C00
g 7C0E ...
0707010516233D000081A4000000000000000000000001640A348F00000625000000080000000200000000000000000000000800000000receipt # SliTaz package receipt.
PACKED_SIZE="44.0K"
UNPACKED_SIZE="76.0K"
PACKAGE="runcom"
VERSION="1.0"
CATEGORY="system-tools"
SHORT_DESC="DOS .com binary format support"
MAINTAINER="devel@slitaz.org"
LICENSE="GPL"
WEB_SITE="https://bellard.org/jslinux"
TAGS="virtual 8086 vm86"
# Rules to configure and make the package.
compile_rules()
{
mkdir -p $src
cd $src
#tarball=$(wget -O - $WEB_SITE/tech.html | \
# sed '/linuxstart/!d;s/.*href="\([^"]*\)".*/\1/')
#wget $WEB_SITE/$tarball
#tar xzf $tarball
mkdir -p $DESTDIR/usr/bin
cc -o $DESTDIR/usr/bin/runcom $stuff/runcom.c
cc -o $src/debug.o -Wa,-a=$src/debug.lst -c $stuff/debug.S
objcopy --only-section=.text -O binary $src/debug.o $DESTDIR/usr/bin/debug.bin
cp $stuff/debug.com $DESTDIR/usr/bin
chmod +x $DESTDIR/usr/bin/debug.*
}
# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
cp -a $install/* $fs
}
# Post install command for Tazpkg.
post_install()
{
fmt="binfmt_misc"
proc="/proc/sys/fs/binfmt_misc"
bin=":BOOTBIN:E::bin::/usr/bin/runcom:"
com=":DOSCOM:E::com::/usr/bin/runcom:"
cat > /tmp/runcom$$ <$proc/register
echo "$com" >$proc/register
EOT
rc="$1/etc/init.d/local.sh"
grep -q "$com" $rc || cat /tmp/runcom$$ >> $rc
[ -n "$1" ] || . /tmp/runcom$$
rm -f /tmp/runcom$$
}
# Pre remove command for Tazpkg.
pre_remove()
{
echo -1 > /proc/sys/fs/binfmt_misc/BOOTBIN
echo -1 > /proc/sys/fs/binfmt_misc/DOSCOM
sed -i '/binfmt_misc/{NN;/DOSCOM:E::com/d}' "$1/etc/init.d/local.sh"
}
07070105162349000081A4000000000000000000000001640A348F000061D5000000080000000200000000000000000000000D00000000fs.cpio.lzma ]
c}$eId)t2E!$ Lu]eahj9Q/V&ep ?BsEj5z#'v/L 1-})UO^RM\Pz\I$%08!=B{#VlC!qt7*;Q&;</fjKbK5".'֟匬eN56<'9P2o:XwPM@ph%
##֛[DܲBC*Tr,~?0OHᔫKY76!lWӆndm/J~Y'B.Z";-PbM7ly&It,sF.>Njzr%^>rݬ6I^ qN㦠(_FʧkO79DSU(7iN~a/'?}cMgy֤?,'Em?>
|ujMeV^tp- mw˜MŴ5*N
;WZ\Bn!%a2c1
/G 4 M;K:Ʀ|Ğ7mgf~GԒ|efhlbSo%Ӝd&xאK
d0DyFq- LG#{s\EՎ?:^Ib!H7+MIKHˆ|f|lꑅ3