E. MISC
0. Can I develop GUI apps for DOS ?
YES. Use VGA:
http://board.flatassembler.net/topic.php?t=6858 (VGA 640x480x4bpp)
http://board.flatassembler.net/topic.php?t=6839 (VGA 640x480x4bpp)
http://board.flatassembler.net/topic.php?t=2187 "Hey, i'm back, 320X200 MODE STUFF, use them with care!" by
Matrix
http://board.flatassembler.net/topic.php?t=2062 "0x12 graphics" 2004-Aug (banked VESA, planed VGA)
http://board.flatassembler.net/topic.php?t=1487 (link inside broken)
or VESA:
http://board.flatassembler.net/topic.php?t=16925 "VESA beginner (maybe ASM maybe C ...)" 2014-Jul
http://board.flatassembler.net/topic.php?t=10857 "gui methods in real mode" 2009-Nov (same as t=6032 below)
http://board.flatassembler.net/topic.php?t=9738 "[BUG] Ultimate VESA & INT $15 / AH=$87 test" (LFB access using INT $15, strange way to do, but works also) 2009-Nov
http://board.flatassembler.net/topic.php?t=7208 (VESA Info utility by DJ Mauretto)
http://board.flatassembler.net/topic.php?t=6514
http://board.flatassembler.net/topic.php?t=6032 "vesa problem (background, box, write text)" 2006-Oct (banked VESA)
5 VESA threads in
OS construction:
http://board.flatassembler.net/topic.php?t=8160
http://board.flatassembler.net/topic.php?t=8043
http://board.flatassembler.net/topic.php?t=8028
http://board.flatassembler.net/topic.php?t=7866
http://board.flatassembler.net/topic.php?t=3559
http://brand107.home.comcast.net/pc-gpe/ (Some info on (not only) VGA & VESA)
Download:
http://board.flatassembler.net/download.php?id=3915 (46 KiB, source in "C" (but "anticryptic" syntax) + DOS executable)
Download:
http://board.flatassembler.net/download.php?id=3913 (580 KiB, VESA specs)
DUGL library:
http://board.flatassembler.net/topic.php?t=7133
1. How to / What is Double/Triple/Quad buffering ?
See
PCTIM003.TXT text from FAQ [5.] below, it also explains this.
2. How to use the PC speaker ?
t=15339 2013-Apr to 2013-Jun "DOS Sound Effects" phone tone
t=14049 2012-Mar "PC Speaker"
t=9635 (WAV playing hints, ISA SB + PC speaker)
t=7965 (Siren sound)
http://board.flatassembler.net/topic.php?t=2432 (in
Main) "PC speaker issue + code" (has PC speaker note player by
Matrix)
http://board.flatassembler.net/topic.php?t=1813 "dos beeps? How do you do dos beeps? - PC speaker issue." (2004-Jul to 2004-Oct)
3. How to access ISA "soundblaster" ?
t=9635 (WAV playing hints, mostly ISA SB)
4. How to access PCI "soundblaster" / AC97 / ICH / HDA ?
See MPXPLAY source (but it's in C)

and
BTTR forum id=6510 "AC97 sound driver for DOS"
BTTR forum id=10911 "SOUND support in DOS | Piotr | HDA"
SoundCardChip and
"wstunjud.zip" (3 MiO)
http://board.flatassembler.net/topic.php?t=15512 "ICH4 AC97 WAV Player for DOS?"
5. How to use timers / cause a delay ?
t=15339 2013-Apr to 2013-Jun "DOS Sound Effects" phone tone , also about delaying
http://board.flatassembler.net/topic.php?t=10908 "Good alternative for high-resolution timing?" (2009-Dec)
http://board.flatassembler.net/topic.php?t=1425 "Delay" (2004-Apr)
http://www.contactor.se/~daniel/links/Pctim003.txt (<- very good)
http://www.sat.dundee.ac.uk/~psc/pctim003.txt (<- same text, alternative location)
http://www.qzx.com/pc-gpe/pit.txt
http://www.compuphase.com/int70.txt
6. Sector access to HD
http://board.flatassembler.net/topic.php?t=6841 (In
OS Construction)
http://board.flatassembler.net/topic.php?t=6689 (In
Main, port ATA access, mixed with file I/O and API)
http://board.flatassembler.net/topic.php?t=4305
http://board.flatassembler.net/topic.php?t=3343
7. Sector access to HD does not work !!!
Mostprobably you are inside NTVDM, not in DOS at all
http://board.flatassembler.net/topic.php?t=5626 (in
Main)
8. Can I use SATA or AHCI disks in DOS ?
Sure, BIOS usually supports them (you might also check BIOS settings for "legacy IDE vs AHCI mode" or similar) through INT $13. Also, nothings prevents from using it "the low level way" in a driver or application.
http://www.bttr-software.de/forum/board_entry.php?id=7412 AHCI thread at BTTR forum from 2009-Dec
9. Can I use USB in DOS ?
Sure, use some driver or write your own, check out "USBDOS" open source driver
http://bretjohnson.us/ by
Bret Johnson , nice source done with A386
10. Low level keyboard detection
http://board.flatassembler.net/topic.php?t=6614 (In OS Construction)
11. Low level mouse detection / how to write a mouse driver ?
http://board.flatassembler.net/topic.php?t=15240
http://board.flatassembler.net/topic.php?t=6720 (In OS Construction)
12. Where do I find a PORT list ?
http://bochs.sourceforge.net/techspec/PORTS.LST (BOCHS emulated ports)
http://www.cs.cmu.edu/~ralf/files.html PART D of RBIL
Note that many ports are hardware specific, for example ISA sound blaster ports are completely useless for PCI sound cards, see FAQ 3 and 4 above. OTOH for example VGA (not VESA), PC speaker and PS/2 keyboard ports are pretty generic.
13. Can I develop 32-bit apps for a 16-bit DOS ?
YES.
General
use16 vs
use32 problems:
http://board.flatassembler.net/topic.php?t=15656 "[16/32/64] Hello, I have a couple of newbie question"
http://board.flatassembler.net/topic.php?t=6633 ( In
Windows )
http://board.flatassembler.net/topic.php?t=5145 | 32-bit commands in DOS |
http://board.flatassembler.net/topic.php?t=5157 | 32 bit instructions | No need to enable in FASM ?
Use DPMI. Check the USEDPMI example and:
http://www.ludd.ltu.se/~ams/djgpp/cvs/djgpp/src/stub/stub.asm (DJASM, not FASM)
http://board.flatassembler.net/topic.php?t=8670 HX/LOADPEX and DOS/32A usage
http://board.flatassembler.net/topic.php?t=7593 Japheth's FASMHX - built-in HDPMI32
http://board.flatassembler.net/topic.php?t=6460
http://board.flatassembler.net/topic.php?t=6384
http://board.flatassembler.net/topic.php?t=6311 | Starting devel for DOS with FASM (DPMI32) | 2006-Dec
Unreal mode (see also FAQ [17.] below)
14. How to use all my RAM in DOS?
XMS or DPMI (better). Deprecated: EMS, unreal mode.
15. What DPMI / DOS extenders should/can I use ?
- HX / HDPMI32 (see links above)
- DOS/32A (needs LE-executables, no "format LE" in FASM, but
http://board.flatassembler.net/topic.php?t=8670 ( Speeeeeed thingie ... DOS/32A and LOADPEX)
http://board.flatassembler.net/topic.php?t=7122 ( Format binary as "LE" - Hello world program )
Some more:
- D3X & WDOSX (both multi-standard: raw, COFF & LE, WDOSX also PE)
Dead link D3X :
http://www.geocities.com/dborca
*
http://jafile.com/uploads/dos386/d3x.zip
*
D3X.ZIP (dead)
*
http://jafile.com/uploads/dos386/wdosx.zi7
*
WDOSX.ZI7 (dead)
t=14416 New Dos Extender D3XX (derivative of D.B.'s D3X) 2012-Jul
- Causeway (Public Domain, supports DOS-specific DLL's (probably obsoleted by HX) )
Obsolete: DOS\4GW, PMODE:Orig/W/DJ, EMX/RSX, RTM:16/32, PharaoLab, ...
Unfortunately none of existing DOS extenders or DPMI hosts is written in FASM, they all have old roots, and most of them use MASM. 2 FASM-friendly exceptions are:
Tomasz's no-longer-non-public experimental
HDOS written in FASM:
http://board.flatassembler.net/topic.php?t=13794 HDOS released 2011-Dec-19
http://board.flatassembler.net/topic.php?t=7988 About HDOS Extender 2007-May-19
and
Daniel Borca's
D3X extender written in NASM, see above
16. Are there / will there be 64-bit extenders ?
Probably no. Many problems, very little benefit.
http://www.codecomments.com/archive258-2004-10-288963.html (dead link)
17. Unreal / Flat real / Big real / Huge real / Irreal mode ?
The real mode brings some limitations, most notably:
1. 64 KiB limit in DS
2. 16-bit code width in CS
3. 64 KiB limit in CS
According to Intel, the only way to get around is to switch to PM. However "one" found out that when switching back to RM, the CPU will forgive "forgetting" to set the DS limit back to 64 KiB, so all 4 GiB RAM and address space (including the VESA LFB) are accessible from "real" mode. This is the "standard" unreal mode used by many games, but also HIMEM, fixing just problem
(1.) . But in FASM
Tomasz goes one step further and also leaves 32-bit code width enabled, thus fixing additionally the problem
(2.) . This currently works on most (all ?) Intel and AMD CPU's, but is more risky and might not on other models. Fixing the problem
(3.) however seems definitely impossible from RM. There are opinions around that the unreal mode is deprecated, FASM continues using it nevertheless
http://board.flatassembler.net/topic.php?t=8115 ( Problem
(3.) in FASM DOS (drop unreal ?) , from 2008 January )
http://board.flatassembler.net/topic.php?t=1881 ( In DOS , about FASM's unreal mode, from 2004 Jul )
http://board.flatassembler.net/topic.php?t=135 ( In OS Construction , from 2003 )
See also the
KELVAR example, and
MODES.INC in FASM source.
18. Integer output / garbage ???
Unlike in QBASIC, you have to convert them yourself, FASM won't do it for you.

This problem is NOT DOS-specific, please look into the
Main FAQ Group "E. MATH"
19. Where to find good / up-to-date info on DexOS ?
The docs on DexOS are indeed lacking.

Some info here:
http://board.flatassembler.net/topic.php?t=7191
http://board.flatassembler.net/topic.php?t=7152
http://board.flatassembler.net/topic.php?t=6328
20. BUGged BUGgy BUGging ... What debugger ? How to debug ?
Japheth's
deb debuggers, FreeDOS DEBUG/DEBUGX (recently also maintained by Japheth), Insight 16-bit RM debugger, GRDB, D86 and D386 (also MMX & Co) by Eric Isaacson (shareware), DOS/32A debugger, ...
http://board.flatassembler.net/topic.php?t=13973 2012-Mar "Suggested debugger for 16 bit mode"
http://board.flatassembler.net/topic.php?t=13957 2012-Feb to 2012-Mar "Suggestion: Debugger"
http://board.flatassembler.net/topic.php?t=12591 2011-Mar to 2011-Nov "Open Watcom Debugger 1.5(an excerpt) // ??????? ?? FreeDos"
http://board.flatassembler.net/topic.php?t=9792 2009-Feb to 2010-Jul "Symbolic/debug information"
http://board.flatassembler.net/topic.php?t=6203 2006-Nov to 2007-May "new version of DEBUG.COM"
http://flatassembler.net/docs/fas.zip (4 KiB -> 20 KiB TXT, last update 2012-Mar or later)
http://eji.com/a86/#OverviewD86
http://ladsoft.tripod.com/grdb.htm
http://japheth.de/debxxf.html
21. How to save DEBUG's disassembly ? Any good DOS disassemblers ?
NDISASM (from NASM)
http://nasm.us
Lack:
CMP EAX, BYTE 0x02
DISTORM (semi-official disassembler of YASM)
http://www.ragestorm.net/distorm/ (was BSD, now only GPL)
Lack:
MOV GS:[EAX],0x0
See
Main FAQ for more disassemblers.
22. How to link FASM code with C code for DOS ?
Depends. For 32-bit DPMI code, you need a COFF linker and have to use the COFF format. For 16-bit code, there is no way to use a linker, since FASM can't output 16-bit OMF objects.
http://board.flatassembler.net/topic.php?t=10939 "16bit .obj files?"
http://board.flatassembler.net/topic.php?t=10641 "mixing fasm and pascal"
http://board.flatassembler.net/topic.php?t=8474 "Can any1 please explain how to combine Turbo C with Fasm?"
http://board.flatassembler.net/topic.php?t=8162
t=7449
t=4652 2006-Jan "MZ OBJ"
t=1659 2004-Jun "can i make obj in fasm?????"
23. 8086 compatible code, please
http://board.flatassembler.net/topic.php?t=6921 "Macros to choose target CPU" by
revolution 2007-Apr in
Macroinstructions
http://board.flatassembler.net/topic.php?t=6667 "is there any directive like the [cpu 8086]?" 2007-Feb in
Main
24. Multitasking
http://board.flatassembler.net/topic.php?t=13430 "Quasi-multitasking in DOS"
http://board.flatassembler.net/topic.php?t=9256 "7-ZIP encryption | password in commandline | ISR & TSR !" (7-ZIP hack, cheap, no uninstall)
t=8468 2008-Mar "Multithreading in DOS : the truth is out : - ( "
t=7105 2007-May "simple multitasking in DOS via MT.COM" Note: "(c) Shamrock Software GmbH, D-85238 Petershausen, Web:
http://www.shamrock.de " (
MT.COM from 1'999 has just 2'319 Byte's)