Index of /src/clusterFix

[ICO]NameLast modifiedSizeDescription

[DIR]Parent Directory  -  
[   ]Makefile13-Jun-2010 01:14 6.7K 
[   ]Okad2.dsm13-Dec-2011 16:17 636K 
[   ]Okad2.nasm14-Dec-2011 02:42 83K 
[TXT]README.html03-Feb-2012 04:16 5.4K 
[   ]a2w18-Aug-2011 00:18 160  
[TXT]addlabel.py05-Aug-2011 00:15 2.1K 
[   ]cf.asm03-Feb-2012 04:13 136K 
[TXT]cf2f.py08-Jan-2012 23:34 19K 
[   ]cf2010.cf07-Jan-2012 17:14 256K 
[TXT]cf2010.f13-Dec-2011 01:33 174K 
[   ]cf2010kern.blk20-Dec-2011 00:58 12K 
[   ]cf2010kern.dsm13-Dec-2011 23:40 200K 
[TXT]cf2012.f06-Jan-2012 02:15 169K 
[TXT]cf2012.f.cf06-Jan-2012 01:51 256K 
[TXT]cfword.py04-Jan-2012 03:04 4.6K 
[   ]cfworks.asm12-Jun-2010 10:56 136K 
[   ]chs13-Jun-2010 01:14 1.2K 
[   ]chs.gdbinit13-Dec-2011 16:17 452  
[   ]chs.nasm14-Dec-2011 02:42 3.7K 
[   ]chs.obj09-Dec-2011 23:17 1.2K 
[   ]clusterFix.zip04-Jan-2016 20:01 3.7M 
[TXT]clusterfix.f11-Jan-2012 02:08 214K 
[TXT]conray.f03-Feb-2012 04:13 2.0K 
[TXT]conway.f10-Jan-2012 19:00 1.9K 
[TXT]f2cf.py08-Jan-2012 23:34 19K 
[   ]floppy.bxrc13-Dec-2011 01:33 487  
[   ]gdb.ini13-Dec-2011 16:16 524  
[   ]gmode20-Dec-2011 00:58 512  
[   ]gmode.nasm13-Dec-2011 23:40 3.2K 
[   ]hda.bxrc21-Dec-2011 05:32 701  
[   ]int13ah4220-Aug-2011 16:06 512  
[   ]int13ah42.nasm13-Dec-2011 23:40 1.0K 
[TXT]jcmandelbrot.f10-Jan-2012 22:42 355  
[   ]liloboot.asm13-Jun-2010 01:35 9.3K 
[   ]liloboot.dat13-Jun-2010 01:14 512  
[   ]macros.nasm09-Oct-2011 23:21 99  
[TXT]mandelbrot.f08-Jan-2012 23:37 1.9K 
[   ]mbr.dsm26-Jul-2011 15:51 9.4K 
[   ]mbrboot22-Aug-2011 00:27 512  
[   ]mbrboot.dsm22-Aug-2011 00:27 9.4K 
[   ]mbrboot.nasm13-Dec-2011 23:40 5.6K 
[   ]newboot26-Jan-2012 05:56 512  
[   ]newboot.cf26-Jan-2012 05:56 156K 
[   ]newboot.dsm10-Jan-2012 15:19 9.1K 
[TXT]newboot.f06-Jan-2012 01:13 261K 
[   ]newboot.nasm26-Jan-2012 05:56 8.6K 
[   ]okad.dat27-Jul-2011 16:56 512  
[   ]okad.dsm28-Jul-2011 01:05 9.1K 
[TXT]okad2.py08-Jan-2012 19:55 387  
[   ]okadboot14-Dec-2011 21:14 512  
[   ]okadboot.cf02-Sep-2011 21:52 156K 
[   ]okadboot.dsm09-Oct-2011 23:21 9.3K 
[   ]okadboot.nasm26-Jan-2012 05:31 14K 
[   ]okadfull.cf26-Jan-2012 05:48 156K 
[   ]okadfull.dat16-Dec-2011 00:05 12K 
[   ]okadfull.dat.dsm10-Jan-2012 22:27 186K 
[   ]okadfull.dsm26-Jan-2012 05:52 183K 
[   ]okadfull.nasm26-Jan-2012 05:53 58K 
[   ]okadfull.ref21-Dec-2011 01:01 12K 
[   ]okadkern10-Jan-2012 15:19 12K 
[   ]okadkern.dsm10-Jan-2012 22:26 187K 
[   ]okadtest28-Jul-2011 01:42 512  
[   ]okadtest.cf11-Aug-2011 18:31 156K 
[   ]okadtest.dsm28-Jul-2011 01:05 9.3K 
[   ]okadtest.nasm03-Feb-2012 04:13 4.1K 
[   ]okadwork.dsm03-Feb-2012 04:18 2.6M 
[   ]osdev02-Sep-2011 21:52 512  
[   ]osdev.nasm13-Dec-2011 23:40 1.4K 
[   ]pmode26-Jan-2012 05:31 512  
[   ]pmode.nasm26-Jan-2012 05:48 4.4K 
[   ]readwrite16-Dec-2011 00:05 36K 
[   ]readwrite.nasm21-Dec-2011 05:32 6.4K 
[TXT]relative.py08-Jan-2012 20:43 375  
[   ]setup_serial.nasm14-Dec-2011 12:22 962  
[   ]showboot21-Dec-2011 01:01 512  
[   ]showboot.nasm21-Dec-2011 05:32 3.3K 
[   ]test1611-Jun-2010 22:22 119  
[   ]test16.cul09-Jun-2010 15:07 74  
[   ]test16.dsm11-Jun-2010 22:22 2.5K 
[   ]test16.nasm13-Dec-2011 23:40 1.1K 
[   ]uncompressed.cf03-Feb-2012 04:13 1.4M 
[TXT]uncompressed.f03-Feb-2012 04:18 258K 
[   ]w2a17-Aug-2011 00:06 149  

Simplest instructions for booting arrayforth from a USB key (jumpdrive, flashdrive): make newboot.cf.usb, with the USB key inserted as /dev/sdb, to overwrite the MBR and the first 312 sectors of the device with the arrayforth. The contents of this directory should probably be in /usr/src/clusterFix and the latest arrayforth in /usr/src/af-35f-g144a12-PD, to match my system, for the fewest problems.

For booting from a USB partition (partition 1), make newboot.cf.part. This assumes a bootloader like mbrboot which leaves the partition data pointed to by BP and SI, the disk as known to the BIOS in DL, and the booted partition number in DH.

Known problems: QEMU will boot arrayforth (make okadboot.cf.boot), but video mode 4144 only shows about the top 1/3 of the screen. It seems to be a bug in QEMU.

By loading showboot onto MBR of USB key, you can see what the BIOS provides to the bootloader: in the case of this eMachines E625, some interesting items are: DX = 0x0080, meaning first hard drive (not floppy!), and DS = 0x0040, pointing to BIOS data area.

/usr/src/af-* are the newest colorForth releases (af=arrayForth).

To do, in no particular order:

Get rid of in-line args and the subroutines that use them and then mess with the stack. It throws off disassembly and is totally unnecessary. (Done[?])

Get rid of dead code. At least some of the aforementioned in-line arg routines are dead. (Done[?])

Save boot device and partition info from BIOS and/or prior bootloader, so that load/save routines can use it whether booted from MBR of USB key or a partition of it. (Done)

Consolidate data as much as possible to avoid breaking disassembly.

Jump back and forth into real mode so as to be able to use the BIOS for read and write onto known boot device. (Done)

Determine video mode by scanning modes for 1024x768x32. (Done)

Save video and load video mode from variable, not forcing in-line code to be on word boundary as it is now. (Done)

Headers for all storage, particularly that used in high-level code (hex table pointed to by address currently).

Look into text-mode cF.

Look into getting rid of Huffman coding, instead using symbol table and string table like ELF files.

Move some of the debugging bootcode into mbrboot.nasm, verify its presence with some particular value pointed to by a register.

Licensing

I'd really like to GPL this, but since Chuck made it Public Domain it doesn't seem ethically correct to put a more restrictive license on it. Unless someone convinces me otherwise, all my code is Public Domain. And actually, "my" code is mostly cribbed from other online sources, most of which are cited in the comments.

Sources

colorforth and arrayforth are from Chuck Moore and the GreenArrays company, websites colorforth.com and greenarrays.com respectively.

mandelbrot.f is Charley Shattuck's, I found on StrangeGizmo.com.

cf2010 is an older-kernel colorForth with lots of extra features accumulated by the cf hacker community over the years and put together by Howerd Oakford at http://www.inventio.co.uk/.

ciasdis and .cul files are from Albert van der Horst and are available from his website http://home.hccnet.nl/a.w.m.van.der.horst. These provide another way to disassemble and reassemble colorforth binaries.

Notes on individual files

Hints

Update 2011-12-31: to make a more hackable image, by removing the LZ77 compression, do this after booting up the USB key:
2880 nsec !
2880 ns !
80 nc !
0 block 0 80 writes
It might also be a good idea to redefine save to that last line, 0 block 0 80 writes, otherwise you'll have a compressed image again if you inadvertently type save. nsec above is the kernel-defined variable header I gave to 0 block 1 +. What the above does, of course, is to set the number of sectors and number of cylinders to the size of a floppy, 1.44 megabytes. The first time I did this I forgot to set nsec, and as a result only loaded the first 312 sectors on reboot, with predictably disastrous results. I also had a bad boot in there due to the problem mentioned on c.l.f. as possibly being due to an interrupt, where the boot process goes out to lunch before completing. Loading this larger image would be more susceptible to such a problem.

Update 2012-01-12: it turns out that the command above, 0 block 0 80 writes, can be abbreviated to 0 !work, with the added advantage that it also works under Windows or Wine (running from Okad2.exe), whereas Windows does not have the writes word defined.