<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>GilesBathgate &#187; Computers</title>
	<atom:link href="http://www.gilesbathgate.com/tag/computers/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gilesbathgate.com</link>
	<description>Things I want to tell the world</description>
	<lastBuildDate>Wed, 14 Dec 2011 08:23:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>How to write an operating system</title>
		<link>http://www.gilesbathgate.com/2008/04/how-to-write-an-operating-system/</link>
		<comments>http://www.gilesbathgate.com/2008/04/how-to-write-an-operating-system/#comments</comments>
		<pubDate>Tue, 01 Apr 2008 17:52:03 +0000</pubDate>
		<dc:creator>Giles Bathgate</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.gilesbathgate.com/?p=46</guid>
		<description><![CDATA[This is a quick guide to creating a &#8216;Hello World&#8217; Operating system that can be booted by Grub First of all you will need to create the assembly file the contains the entry point for grub. Call this &#8216;start.S&#8216; /* * initial stack */ .data .globl _os_stack .align 4, 0x90 .space 0x100 _os_stack: .long 0 [...]]]></description>
			<content:encoded><![CDATA[<p>This is a quick guide to creating a &#8216;Hello World&#8217; Operating system that can be booted by <a href="http://www.gnu.org/software/grub">Grub</a> First of all you will need to create the assembly file the contains the entry point for grub. Call this &#8216;<strong><a href="/wordpress/wp-content/uploads/2008/04/start.S">start.S</a></strong>&#8216;</p>
<p><span id="more-46"></span></p>
<pre>/*
* initial stack
*/
.data

.globl	_os_stack
.align 	4, 0x90
.space 	0x100
_os_stack:
.long 0

/*
* let's roll
*/
.text

.globl 	_start
.align 	4, 0x90
_start:
jmp	boot_entry

/*
* multiboot compliant header
* the layout of this thing depends on image format
*/

.align 4, 0x90
boot_hdr:

.long	0x1BADB002		/* magic */
.long   0x00000000		/* no flags if ELF */
.long	0-0x1BADB002-0x00000000	/* checksum */

/* the actual code starts here ... */
boot_entry:
/*
* clear NT, learned the hard way...
*/
pushl 	$0
popfl

/*
* setup our stack
*/
lea   	_os_stack, %edx
movl  	%edx, %esp

/*
* mulitboot compliant loader (read: grub)
* should put magic value in %eax
*/
pushl	%eax

/*
* clear bss
*/
xorl  	%eax, %eax
movl  	$edata, %edi
movl  	$end, %ecx
subl  	%edi, %ecx
cld
rep
stosb

/*
* call our C code initialization ...
*/
pushl 	%ebx
call  	main

/*
* NOTREACHED
*/
darn:
incw	(0xb8000)
jmp	darn</pre>
<p>Now you will need to create your &#8216;<strong><a href="/wordpress/wp-content/uploads/2008/04/main.c">main.c</a></strong>&#8216; program</p>
<pre>
int main(){
	char * vidmem = (char*)0xB8000;
	vidmem[0]  = 'H';
	vidmem[1]  = 0x7;
	vidmem[2]  = 'e';
	vidmem[3]  = 0x7;
	vidmem[4]  = 'l';
	vidmem[5]  = 0x7;
	vidmem[6]  = 'l';
	vidmem[7]  = 0x7;
	vidmem[8]  = 'o';
	vidmem[9]  = 0x7;
	vidmem[10] = ' ';
	vidmem[11] = 0x7;
	vidmem[12] = 'W';
	vidmem[13] = 0x7;
	vidmem[14] = 'o';
	vidmem[15] = 0x7;
	vidmem[16] = 'r';
	vidmem[17] = 0x7;
	vidmem[18] = 'l';
	vidmem[19] = 0x7;
	vidmem[20] = 'd';
	vidmem[21] = 0x7;
	vidmem[22] = '!';
	vidmem[23] = 0x7;
}</pre>
<p>Now we need to compile our program</p>
<pre>gcc -nostdinc -c main.c -o main.o
gcc -nostdinc -c start.S -o start.o
ld -nostdinc -Ttext 0x100000 main.o start.o -o kernel</pre>
<p>&#8230;And thats it, you add an entry to your grub &#8216;<strong>menu.lst</strong>&#8216;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gilesbathgate.com/2008/04/how-to-write-an-operating-system/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Mplayer on Tom Tom</title>
		<link>http://www.gilesbathgate.com/2008/02/mplayer-on-tom-tom/</link>
		<comments>http://www.gilesbathgate.com/2008/02/mplayer-on-tom-tom/#comments</comments>
		<pubDate>Fri, 08 Feb 2008 18:55:28 +0000</pubDate>
		<dc:creator>Giles Bathgate</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[Movies]]></category>
		<category><![CDATA[TomTom]]></category>

		<guid isPermaLink="false">http://www.gilesbathgate.com/?p=34</guid>
		<description><![CDATA[I am now trying to run Mplayer on Tom Tom so that I can watch videos and drive anyone reading this to drink. I found however that Mplayer requires a lot of system resources that are being used by the Navigation application (ttn) So I needed a way to free up the memory and resources [...]]]></description>
			<content:encoded><![CDATA[<p>I am now trying to run <a href="http://www.tomtomheaven.com/index.php?option=com_content&amp;task=view&amp;id=40&amp;Itemid=29">Mplayer on Tom Tom</a> so that I can watch videos and drive anyone reading this to drink. I found however that Mplayer requires a lot of system resources that are being used by the Navigation application (ttn) So I needed a way to free up the memory and resources being used by the application. This should be as simple as just killing the application using</p>
<pre>
killall ttn</pre>
<p>But the problem is that the ttn application is responsible for petting the dog. That is to say that there is a <a href="http://en.wikipedia.org/wiki/Watchdog_timer">WatchDog Timer</a> which resets the device after 15 seconds unless something continuously resets the timer.<br />
All that was needed was a script to reset the timer instead, So here is my solution:</p>
<pre>
#!/bin/sh
killall ttn &amp;&amp;
while(true) do
echo '\0' &gt; /dev/watchdog
sleep 10
done</pre>
<p>The trick is to kill the ttn but also keep the <a href="http://www.opentom.org/Watchdog" title="Watchdog">Watchdog</a> from reseting the device. The script also has to be invoked as a background job, so I used an &#8216;&amp;&#8217; after the command.</p>
<pre>./free.sh &amp;</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.gilesbathgate.com/2008/02/mplayer-on-tom-tom/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Password recovery</title>
		<link>http://www.gilesbathgate.com/2007/11/password-recovery/</link>
		<comments>http://www.gilesbathgate.com/2007/11/password-recovery/#comments</comments>
		<pubDate>Tue, 13 Nov 2007 19:07:16 +0000</pubDate>
		<dc:creator>Giles Bathgate</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.gilesbathgate.com/?p=6</guid>
		<description><![CDATA[This morning one of my colleague&#8217;s phoned me telling me that he had forgotten his password. I advised him to download and use the Offline NT Password &#38; Registry Editor I recalled the last time I used it being incredibly non user friendly and also because of the bad NTFS write support. The experience of [...]]]></description>
			<content:encoded><![CDATA[<p>This morning one of my colleague&#8217;s phoned me telling me that he had forgotten his password. I advised him to download and use the <a href="http://home.eunet.no/pnordahl/ntpasswd/">Offline NT Password &amp; Registry Editor</a> I recalled the last time I used it being incredibly non user friendly and also because of the bad NTFS write support. The experience of having to run chkdsk on reboot made me feel very uneasy. When I get time I would like to make a <a href="http://slax.hosting4p.com/">Slax</a> based LiveCD that uses the new <a href="http://www.linux-ntfs.org/" title="NTFS">NTFS</a> user mode mount tool which has better write support, and perhaps a nice curses based menu system that steps you through the process.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gilesbathgate.com/2007/11/password-recovery/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

