FS CHS, fdisk fix.

kernel/ata.s:
	add ata_get_hs_geometry: returns the heads/sectors in BIOS compatible
	mode, where more than 1024 cylinders results in using 255 heads.
	The ATA device uses words and thus may report more than 1023 cylinders.

kernel/partition.s:
	use ata_get_hs_geometry instead of ata_get_geometry.

	fix the usage message for fdisk.

	support providing 'list' as an fdisk command, and fix printing the
	illegal command if detected.

	in fdisk, print the used CHS geometry if it differs from the drive's
	reported geometry.

kernel/sfs.s:
	fix mounting sfs by setting the fs_obj_class.

	add minimal implementation of sfs_open and sfs_nextentry so that
	ls does not loop infinitely.
Refactor filesystem to OO.

Some debug present.

Also contains a hack for fs_api_mount, which 'instantiates' an object
so that the method pointers are filled in, as it is actually a factory
method.

Contains work on static methods, as yet unused.

Refactored the class definition to use more data subsections, where
the declarations, overrides, and static data are all separated and
have their own pointers.
Unfortunately GAS by itself does not have enough flexibility to allow
for custom data structures to be pipelined. The class definition
could be made more compact, first by declaring all method pointers
in the class definition itself as it allows for this by using a
size field.
The upside of the current approach is that method declarations of different
types (declare, override, static) can be mixed.

Note that the work done on static class methods is not quite how it is
commonly defined in OO. In this case the meaning of static is that
the method is given the class definitino itself as the object.
Also, the static method is envisioned to also be allowed to be overridden.
As such it is a copy of the normal declaration/override system, except
the object it applies to is the class's static data.

The intended use for this is for factory methods, such as fs_api_mount,
which contain a few checks to see whether the partition type matches the
filesystem implementation, and if so, it will instantiate and mount
the partition.
In this way, mount expects all classes extending from fs to support
this static method.

This commit however uses a temporary object instantiation, calling
fs_api_mount in ojbect context, which then proceeds to class_newinstance
an object, initializing it, and returning it. The temporary object is
then freed. This workaround was done so as to gradually change the
implementation of the various filesystems, which used to do a malloc
themselves, but now call class_newinstance.

There is rather a lot of debug output in this commit, but, it is the
first attempt at using git branches, so more commits are expected
before a merge.
FS OO: add generic iteration.

kernel/oo.s:
	add class_iterate_classes, using the stack to preserve all registers.
	The purpose of this abstraction is to at one point be able to merge
	dynamically registered classes, and provide a clean interface to
	iterate through classes without having to expose the array structure.

	Disable the class_dyn_definitions ptr_array and class_register.

kernel/fs.s:
	rework fs_list_filesystems and fs_load$ (mounting) using the iteration.

	disable calling class_register in fs_init.
Fix GDT_GET_BASE call in mem_handles.

A bug in the macro's for GDT_GET_BASE did not report that 'edi'
cannot be used as a 8 bit register (like eax,ebx,ecx,edx).
This resulted in ax being modified, then edi, which caused a bug
in mem_handles, where eax changed unexpectedly.

DOC/GAS.txt:
	document a compiler oddity: mov al, byte [0] results in
	mov al, [1].

kernel/gdt.s:
	GDT_GET_BASE: set _R16 to -1 before determining it.
	Also, make the size of the memory references explicit.

kernel/macros.s:
	check for suitability of the given register, and error otherwise.

kernel/mem_handle.s:
	use ecx instead of edi for GDT_GET_BASE.
Minor TCP tweak.

kernel/net/tcp.s:
	optimize copy using rep stosd.

	add tcp_conn_..._seq_base and print seq/ack relative to it.
Add basic debugging condition mechanism.

kernel/idt.s:
	on a debug interrupt (1), call a debugger_handle_int, yielding
	CF = 1 to ignore the interrupt, i.e., to not print anything and
	continue execution.

kernel/hwdebug.s:
	add debugger_handle_int, which checks the debug registers for a match,
	and tests for a condition - in this case, whether the memory address
	that triggered the interrupt contains a certain value.
	This allows to monitor a memory address and only halt execution
	when a condition is met.

	At current the condition is hardcoded, but it required some
	research and provides a good basis for a more generalized method.
HTTPD: print referer header.
oo: register caller of class_newinstance in malloc.
Add qemu-nonet alias.
Implement Graphics Mode Console [VMWare SVGAII].

kernel/console.s:
	call	[screen_update] in scroll

kernel/gfx.s:
	fix palette_16.

	deprecate cmd_gfx to cmd_gfx_VBE.

	add new gfx_txt_screen_update handler using the VIRTUAL_CONSOLE
	and buffer, which is a speed improvement. Also implement
	scrolling.

	implement background color in gfx_txt_screen_update and
	gfx_printchar8x16.

	include the standard.fnt, which looks nicest.

kernel/print.s:
	move calling [screen_update] to screen_buf_flush.

kernel/vmware/svga2.s:
	record FIFO capabilites and add some new ones.

	do not use SVGA_CAP_TRACES.

	Fix svga_fifo_cmd_update.

	rename svga_fifo_cmd_update to svga_fifo_cmd_update_full,
	and add svga_fifo_cmd_update taking 4 stackargs denoting a rectangle.

	add cmd_gfx which toggles between text and graphics mode.
	It adds a new handler for [screen_update], calling
	gfx_txt_screen_update followed by a FIFO screen update command.
Optimize buffer data moves.

kernel/buffer.s:
	remove jz's on ecx 0 for rep movs.
Add begin of XML parser.

kernel/Makefile:
	register lib/xml.s

kernel/shell.s:
	add commands:
		"ph" - ping host: 192.168.1.10
		"svga" - kernel/vmware/svga2.s cmd_svga, debug FIFO
		"xml" - lib/xml.s cmd_xml.

lib/xml.s:
	simple xml parser: open, close, singular tags, attributes.
xml: pi, comment, attr, serializer

lib/xml.s:
	parse and store processing instructions and comments.
	parse and print attributes - not stored yet.
	add serializer to process the parser output and print indented.
print fix: long text.

kernel/print.s:
	fix printing long text by limiting it to chunks of 80 chars
	before flushing. The code itself is a bit hacky and inefficient,
	but still faster than a lodsb/printchar loop.
xml: parse and store text

lib/xml.s:
	minor refactoring to have clearer parser-position remembrance,
	and remaining length is re-calculated after every tag.
xml: parse and store attributes
xml: minor cmd fix

lib/xml.s:
	fix bootdrive letter in path.
	use mallocz instead of buf_new, and free the buf when done.
xml: implement stringtable step 1

lib/xml.s:
	allocate a second buffer to store the strings, and store the tag
	names there (also for processing instructions).
	in the xml handler method, print the attributes in the tag.
xml: comments in strtab, preserve attr quote

lib/xml.s:
	implement storing/retrieving comments from the stringtable.
	[also fixes a bug where the comments were stored but overwritten].

	check and preserve the quote character used in attributes.
xml: store text in stringtable