This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
operating_systems:freedos [2021/03/30 00:53] nanodano ↷ Page moved from operating_systems:dos:freedos to operating_systems:freedos |
operating_systems:freedos [2022/03/21 23:53] (current) nanodano [Dealing with JemmEx out of memory error] |
||
---|---|---|---|
Line 15: | Line 15: | ||
- To learn more about operating systems, history, programming, | - To learn more about operating systems, history, programming, | ||
- For fun of retro computing | - For fun of retro computing | ||
- | - Portable - anyone can run it, low system requirements. Run it on a 40 year old computer up to a modern 2021 computer. The x86 chips we have in all of our desktops are backwards compatible to the 16-bit 8086. They will mimic it. It will run on anything running current era hardware with x86 instructions! Really cool! People with powerful hardware can run the DosBox emulator | + | - Portable - anyone can run it, low system requirements. Run it on a 40 year old computer up to a modern 2021 computer. The x86 chips we have in all of our desktops are backwards compatible to the 16-bit 8086. They will mimic it. It will run on anything running current era hardware with x86 instructions! Really cool! |
+ | |||
+ | ===== DosBox | ||
+ | |||
+ | DosBox vs FreeDOS (One is an emulator | ||
- | DosBox vs FreeDOS (One is an emulator, one is a true OS) | ||
- | DOS is single user/no user. Always root access to everything. | ||
Line 26: | Line 28: | ||
===== Installing ===== | ===== Installing ===== | ||
- | Download and installed. | ||
- | Run it | ||
- | https:// | ||
- | `mount c ~` will mount your home directory to C:\ | ||
- | ## Installing FreeDOS | ||
- | Video on installing manually: https:// | + | |
+ | ==== Minimal manual installation ==== | ||
+ | |||
+ | Video on installing manually: | ||
+ | |||
+ | |||
+ | Steps: | ||
+ | |||
+ | - Partition the disk with '' | ||
+ | - Create a file system on the partition | ||
+ | - Make the disk bootable and copy kernel with '' | ||
+ | - Optionally, install any desired packages by unzipping and copying them over | ||
+ | |||
+ | < | ||
+ | # Partition the disk, create file system, make bootable | ||
+ | # and install the kernel.sys + command.com | ||
+ | fdisk | ||
+ | # Reboot after this doing fdisk! | ||
+ | format | ||
+ | sys d: | ||
+ | |||
+ | ## Example of how to " | ||
+ | C: | ||
+ | cd \PACKAGES\BASE | ||
+ | # `-x SOURCE/*` will exclude files in source directories | ||
+ | # `-d sets the destination directory, where unzipped files go | ||
+ | for %f in (*.ZIP) do unzip %f -x SOURCE/* -d d: | ||
+ | </ | ||
+ | |||
+ | By performing those steps, you have a minimal bootable system. There will only be two files on the drive: | ||
+ | |||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | If you boot up and get a prompt, excellent. Type ''?'' | ||
+ | |||
+ | Example steps: | ||
+ | |||
+ | * Boot into the Live mode from the install disk | ||
+ | * Run '' | ||
+ | * Run '' | ||
+ | * Run '' | ||
+ | * At this point the system should be bootable and you will load into the typical '' | ||
+ | * To install additional application, unzip programs | ||
+ | * The '' | ||
+ | * To see what is in a zip file, '' | ||
+ | * To install everything in a directory (omit -x if you do not want to exclude sources): '' | ||
+ | * | ||
+ | |||
+ | |||
+ | ==== Use installer ==== | ||
Recommended FULL install with source. The FULL install will give you the package manage `fdimples`. | Recommended FULL install with source. The FULL install will give you the package manage `fdimples`. | ||
Line 47: | Line 95: | ||
- | - | ||
- | ## How kernel boot works and fdconfig.sys | + | |
+ | |||
+ | ==== Dealing with JemmEx out of memory error ==== | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | Edit '' | ||
+ | |||
+ | Also refer to [[http:// | ||
+ | |||
+ | < | ||
+ | # Change from this | ||
+ | 1? | ||
+ | # to this | ||
+ | 1? | ||
+ | </ | ||
+ | |||
+ | ==== Dealing with unable to read hard disk error ==== | ||
+ | |||
+ | When you use '' | ||
+ | |||
+ | You can create one primary DOS partition | ||
+ | |||
+ | ===== How kernel boot works and fdconfig.sys | ||
https:// | https:// | ||
Line 63: | Line 134: | ||
- | ## Explanation of files | + | ===== Explanation of files ===== |
Here are the files. That's it. That's the whole operating system. | Here are the files. That's it. That's the whole operating system. | ||
- | - `AUTOEXEC.BAT` - Put all your stuff here. Like your init scripts and bash profile in one | + | * '' |
- | - `COMMAND.COM` | + | * '' |
- | - `FDCONFIG.SYS` - Boot configuration, | + | * '' |
- | - `KERNEL.SYS` - The kernel binary itself. 48 KB! | + | * '' |
- | - `FDOS\` | + | * '' |
- | - `FDOS\BIN\` - Executables | + | * '' |
- | ===== Basic commands ===== | ||
- | - `?`, `help`, Adding ` /?` | + | ===== Getting help ===== |
+ | |||
+ | You can always type ''?'' | ||
+ | |||
+ | < | ||
+ | ? | ||
+ | </ | ||
+ | |||
+ | - ''?'' | ||
+ | |||
+ | Adding ` /?` | ||
+ | |||
+ | < | ||
+ | |||
+ | dir /? | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== Built-in commands ===== | ||
+ | |||
+ | Built-in commands that come with '' | ||
+ | |||
+ | Enter: ''?'' | ||
+ | |||
+ | Built-in commands: | ||
+ | |||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | There are also built-in features like: | ||
+ | |||
+ | * Directory stack ('' | ||
+ | * Last directory ('' | ||
+ | * History ('' | ||
+ | * Tab completion | ||
+ | * Aliases ('' | ||
+ | * Enhanced input | ||
- `ver`, `vol`, `mem`, `cls`, `which`, `path` | - `ver`, `vol`, `mem`, `cls`, `which`, `path` | ||
- `cd`, `dir`, `dir /w`, `tree`, `| more`, `mkdir`, `echo hi > test.txt`, `rmdir`, `deltree` | - `cd`, `dir`, `dir /w`, `tree`, `| more`, `mkdir`, `echo hi > test.txt`, `rmdir`, `deltree` | ||
Line 96: | Line 211: | ||
Vim can be installed in 1.3! | Vim can be installed in 1.3! | ||
- | ``` | + | < |
EDIT | EDIT | ||
C: | C: | ||
C: | C: | ||
- | ``` | + | </ |
+ | |||
+ | ===== Batch scripting ===== | ||
+ | |||
+ | Even in the most minimal install, you have '' | ||
+ | |||
+ | <code batch> | ||
+ | REM Add comments with REM. It stands for REMARK | ||
+ | for %f in (*.ZIP) do unzip %f -x SOURCE/* -d d: | ||
+ | |||
+ | REM Turn off echo with: | ||
+ | @echo off | ||
+ | |||
+ | REM Set environment variables with set | ||
+ | set | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== Mounting USB & CD drives ===== | ||
===== Get software ===== | ===== Get software ===== | ||
- | https:// | + | * [[https:// |
- | https:// | + | * [[https:// |
- | https://www.freedos.org/ | + | * [[https:// |
+ | * [[https:// | ||
+ | * [[http://dosprograms.info.tt/]] | ||
- | ==== Using fdimples | + | ==== Using fdimples |
Insert the FreeDOS CD-ROM, then run `fdimples` to get the software repository screen. | Insert the FreeDOS CD-ROM, then run `fdimples` to get the software repository screen. | ||
Line 129: | Line 265: | ||
- Dialog | - Dialog | ||
- sqlite | - sqlite | ||
+ | - FDTUI (better than FDSHELL which runs at 100% cpu) - '' | ||
+ | - IMGEDIT '' | ||
+ | - pmge '' | ||
==== Installing manually in FreeDOS ==== | ==== Installing manually in FreeDOS ==== | ||
Line 177: | Line 316: | ||
Text Browser: Links C: | Text Browser: Links C: | ||
GUI Browser: Dillo C: | GUI Browser: Dillo C: | ||
+ | GUI Browser: Arachnae | ||
===== Programming ===== | ===== Programming ===== | ||
Line 183: | Line 322: | ||
=== Languages === | === Languages === | ||
- | - Lua: `C: | + | * Lua: '' |
- | - Assembly: | + | |
- | - BASIC: | + | |
- | - C: `bcc` (Bruce' | + | |
- | - Pascal: | + | |
- | == NASM == | + | == NASM hello world == |
- | Similar to the Linux hello world program except | + | Similar to the Linux hello world program except |
+ | |||
+ | == VGA programming == | ||
+ | |||
+ | Screen 13! How to do it in assembly with interrupt, and how to do it in BASIC with SCREEN 13. Where is the VGA memory location. It's as easy as writing to the memory location. | ||
== Lua == | == Lua == | ||
Line 198: | Line 341: | ||
== BASIC == | == BASIC == | ||
+ | |||
+ | = BWBASIC = | ||
+ | |||
+ | Bytewater must be run with a 32-bit protected mode DOS extender like '' | ||
+ | |||
+ | < | ||
+ | dos32a bwbasic.exe | ||
+ | </ | ||
+ | |||
+ | = FreeBASIC = | ||
https:// | https:// | ||
Line 213: | Line 366: | ||
``` | ``` | ||
- | == C == | + | == C/C++ == |
+ | |||
+ | |||
+ | |||
+ | = OpenWatcom = | ||
+ | |||
+ | * There is '' | ||
+ | * and '' | ||
+ | |||
+ | < | ||
+ | REM Without this env var, linker fails | ||
+ | set WATCOM=C: | ||
+ | |||
+ | REM wcc, wpp, wlink - compilers & linker | ||
+ | REM wcl - compile and link in one | ||
+ | wcl hello.cpp / | ||
+ | |||
+ | REM TO allow the omission of /I flag set INCLUDE | ||
+ | set INCLUDE=C: | ||
+ | |||
+ | REM Now you can simply compile & link with: | ||
+ | wcl hello.cpp | ||
+ | </ | ||
+ | |||
+ | = DJGPP = | ||
Make sure DJGPP is installed from the FreeDOS CD-ROM using `fdimples`. | Make sure DJGPP is installed from the FreeDOS CD-ROM using `fdimples`. |