for windows :
supose to use a real floppy disk.
0 - Make a script in you boch.exe directory : script.bxrc. this is the bochs config file to run your
image.
1- copy your test.exe program to your floppy disk.
the floppy must be bootable. you can use a
win98 bootable disk or one of row images in
http://www.osdever.net/downloads.php
2- In dosbox goto bochs dir and execute
bochs -q -f script.bxrc
Script file to boot a real floppy disk in your drive A
#minimal sript
# how much memory the emulated machine will have
megs: 8
# filename of ROM images
romimage: file=$BXSHARE/BIOS-bochs-latest, address=0xf0000
vgaromimage: $BXSHARE/VGABIOS-elpin-2.40
# what disk images will be used
floppya: 1_44=a:, status=inserted
# choose the boot disk.
boot: floppy
# default config interface is textconfig.
config_interface: textconfig
display_library: win32
# where do we send log messages?
log: bochsout.txt
# enable key mapping, using US layout as default.
keyboard_mapping: enabled=1, map=$BXSHARE/keymaps/x11-pc-us.map
ips: 500000