<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://gunkies.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Lexthehex</id>
		<title>Computer History Wiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://gunkies.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Lexthehex"/>
		<link rel="alternate" type="text/html" href="https://gunkies.org/wiki/Special:Contributions/Lexthehex"/>
		<updated>2026-04-23T19:28:19Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.30.1</generator>

	<entry>
		<id>https://gunkies.org/w/index.php?title=User:Lexthehex&amp;diff=10757</id>
		<title>User:Lexthehex</title>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=User:Lexthehex&amp;diff=10757"/>
				<updated>2012-02-26T23:13:21Z</updated>
		
		<summary type="html">&lt;p&gt;Lexthehex: /* Described British Summer Time as a 'horrible kludge' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi there...&lt;br /&gt;
&lt;br /&gt;
Username: '''Lexthehex'''&lt;br /&gt;
&lt;br /&gt;
Real name: '''Lex'''&lt;br /&gt;
&lt;br /&gt;
Location: '''Devon, United Kingdom'''&lt;br /&gt;
&lt;br /&gt;
Timezone: '''GMT''' (I choose to ignore this horrible kludge that they call 'British Summer Time')&lt;br /&gt;
&lt;br /&gt;
My untidy, seldom-maintained website is at brooknet.no-ip.com [http://brooknet.no-ip.com].&lt;br /&gt;
&lt;br /&gt;
Interests: Computing (especially ancient computing history), electronics, and I used to be interested in parapsychology, but not so much now.&lt;br /&gt;
I like walking - the further the better, and the more random the route, the better.&lt;br /&gt;
&lt;br /&gt;
My life's ambition is to finish something, and to be able to learn how to concentrate.  I mean, look how many tabs this window has open: 10, with several PDF documents open, a couple of XTerms with GNU Screen running in one of them - and I have no idea how many sessions are in that.&lt;br /&gt;
&lt;br /&gt;
(26-Feb-12): I'm currently writing this page - my first (apart from this one): [[Compiling KLH10]]&lt;/div&gt;</summary>
		<author><name>Lexthehex</name></author>	</entry>

	<entry>
		<id>https://gunkies.org/w/index.php?title=VAX-11/780&amp;diff=10756</id>
		<title>VAX-11/780</title>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=VAX-11/780&amp;diff=10756"/>
				<updated>2012-02-26T23:10:44Z</updated>
		
		<summary type="html">&lt;p&gt;Lexthehex: /* Spelling corrections */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The first [[VAX]] Introduced in 1977.&lt;br /&gt;
&lt;br /&gt;
{{Infobox VAX&lt;br /&gt;
| name = VAX-11/780&lt;br /&gt;
| codename = Star&lt;br /&gt;
| year introduced = October 1977&lt;br /&gt;
| vups = 1.0&lt;br /&gt;
| cpu = KA780&lt;br /&gt;
| clock speed = 200 ns&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Image:Vax11-780_2.png|thumb|A 'typical' Vax-11/780 setup.]]&lt;br /&gt;
[[Image:DEC-VAX-11-780.jpg|thumb|A real VAX-11/780 install]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This was the first VAX from [[Digital Equipment Corporation]].  The VAX was the successor to the PDP-11, and in order to make the VAX seem more PDP-11 friendly, they retained the -11 moniker for the first VAXen, hence the 11/780 designation.  The 11/780 didn't have normal firmware, instead it loaded its microcode from floppy.  &lt;br /&gt;
&lt;br /&gt;
== Emulation ==&lt;br /&gt;
&lt;br /&gt;
[[SIMH]] is the only known emulator for the 11/780.  SIMH can address up to 128MB of RAM emulating an 11/780.  Also the following peripherals are emulated:&lt;br /&gt;
&lt;br /&gt;
*CPU VAX-11/780 CPU&lt;br /&gt;
*TLB translation buffer&lt;br /&gt;
*SBI system bus controller&lt;br /&gt;
*MCTL0,MTCL1 memory controllers, MS780C with 4MB memory each, or MS780E with 8MB-64MB each&lt;br /&gt;
*UBA DW780 Unibus adapter&lt;br /&gt;
*MBA0,MBA1 RH780 Massbus adapters&lt;br /&gt;
*TODR time-of-day clock&lt;br /&gt;
*TMR interval timer&lt;br /&gt;
*TTI,TTO console terminal&lt;br /&gt;
*RX console RX01 floppy disk&lt;br /&gt;
*DZ [[DZ11]] 8-line terminal multiplexer (up to 4)&lt;br /&gt;
*CR [[CR11]] card reader&lt;br /&gt;
*LPT [[LP11]] line printer&lt;br /&gt;
*RP [[RP04]]/05/06/07, RM02/03/05/80 Massbus disks, up to eight drives&lt;br /&gt;
*HK [[RK611]]/RK06(7) cartridge disk controller with eight drives&lt;br /&gt;
*RL [[RL11]]/RL01(2) cartridge disk controller with four drives&lt;br /&gt;
*RQ [[UDA50]] MSCP controller with four drives&lt;br /&gt;
*RQB second UDA50 MSCP controller with four drives&lt;br /&gt;
*RQC third UDA50 MSCP controller with four drives&lt;br /&gt;
*RQD fourth UDA50 MSCP controller with four drives&lt;br /&gt;
*RY [[RX211]] floppy disk controller with two drives&lt;br /&gt;
*TS [[TS11]] magnetic tape controller with one drive&lt;br /&gt;
*TQ [[TUK50]] TMSCP magnetic tape controller with four drives&lt;br /&gt;
*TU [[TM03]] tape formatter with eight TE16/TU45/TU77 drives&lt;br /&gt;
*XU [[DEUNA]]/[[DELUA]] Ethernet controller&lt;br /&gt;
*XUB second [[DEUNA]]/[[DELUA]] Ethernet controller&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
More information about SIMH's VAX 11/780 emulation can be found [http://simh.trailing-edge.com/pdf/vax780_doc.pdf here].&lt;br /&gt;
&lt;br /&gt;
== Operating Systems ==&lt;br /&gt;
&lt;br /&gt;
The 11/780 was to ship with VMS 1.0.&lt;br /&gt;
&lt;br /&gt;
* [[VMS]] 1.0 - ?.0&lt;br /&gt;
* [[32v]]&lt;br /&gt;
* [[Ultrix]]&lt;br /&gt;
* [[BSD]] (CSRG flavor) version 3.0 - 4.3&lt;br /&gt;
* [[NetBSD]]&lt;br /&gt;
* [[OpenBSD]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There was also the [[VAX-11/785]], which was an upgraded version.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Nav VAX}}&lt;/div&gt;</summary>
		<author><name>Lexthehex</name></author>	</entry>

	<entry>
		<id>https://gunkies.org/w/index.php?title=Talk:Compiling_KLH10&amp;diff=10755</id>
		<title>Talk:Compiling KLH10</title>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=Talk:Compiling_KLH10&amp;diff=10755"/>
				<updated>2012-02-26T20:14:52Z</updated>
		
		<summary type="html">&lt;p&gt;Lexthehex: I've already got dates - don't need two lots of date (sorry, Wiki!)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Saturday 25-Feb-12 ([[User:Lexthehex|Lexthehex]]): The first version of the 'Compiling KLH10' document was written, followed by some corrections and improvements.&lt;br /&gt;
&lt;br /&gt;
Sunday 26-Feb-12 ([[User:Lexthehex|Lexthehex]]): Verified the things that need verifying, added a script to make building the binaries easier.  I'm not going to add any major stuff today because I feel too grim.  My cold is a little better, but I lack the energy to be able to concentrate properly.&lt;/div&gt;</summary>
		<author><name>Lexthehex</name></author>	</entry>

	<entry>
		<id>https://gunkies.org/w/index.php?title=Talk:Compiling_KLH10&amp;diff=10754</id>
		<title>Talk:Compiling KLH10</title>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=Talk:Compiling_KLH10&amp;diff=10754"/>
				<updated>2012-02-26T20:13:39Z</updated>
		
		<summary type="html">&lt;p&gt;Lexthehex: Created the page.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Saturday 25-Feb-12 ([[User:Lexthehex|Lexthehex]] 12:13, 26 February 2012 (PST)): The first version of the 'Compiling KLH10' document was written, followed by some corrections and improvements.&lt;br /&gt;
&lt;br /&gt;
Sunday 26-Feb-12 ([[User:Lexthehex|Lexthehex]] 12:13, 26 February 2012 (PST)): Verified the things that need verifying, added a script to make building the binaries easier.  I'm not going to add any major stuff today because I feel too grim.  My cold is a little better, but I lack the energy to be able to concentrate properly.&lt;/div&gt;</summary>
		<author><name>Lexthehex</name></author>	</entry>

	<entry>
		<id>https://gunkies.org/w/index.php?title=Compiling_KLH10&amp;diff=10753</id>
		<title>Compiling KLH10</title>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=Compiling_KLH10&amp;diff=10753"/>
				<updated>2012-02-26T20:01:18Z</updated>
		
		<summary type="html">&lt;p&gt;Lexthehex: /* Diff files (output of 'patch -u') */ -- Removed information about the binaries being in the build dir (obvious!).&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a brief guide to compiling Ken Harrenstien's KLH10 PDP-10 emulator.  It was written on an AMD64 Gentoo machine with 2GB RAM and gcc 4.5.3-r1.  The author currently has a bad cold, so please excuse any mistakes/foolishness caused by light-headedness.&lt;br /&gt;
&lt;br /&gt;
I was satisfied with using [[SIMH]] to run MIT's [[ITS]] operating system, but there was an annoying bug: the reported time of the system looped endlessly over three hours, and did not seem to keep proper time.  Was the clock running too fast?  It seemed to be okay, but something was amiss with the way that ITS reads the clock.  In an effort to narrow down the cause, I decided to get [[KLH10]] running and see if it exhibited the same problem.  I have not found an answer yet.&lt;br /&gt;
&lt;br /&gt;
== Useful links ==&lt;br /&gt;
&lt;br /&gt;
# Viktor Björn's tutorial [http://victor.se/bjorn/its/ 'Some notes on setting up an ITS system']&lt;br /&gt;
# [http://www.normalesup.org/~zoghaib/comp/pdp10/ITS/setup.html.en 'Setting up an ITS system today']&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
This tutorial assumes that you are running a Linux system with a modern version of gcc.  Some of these instructions will not apply to your system, or may differ.  I am using a current Gentoo system, as of February 2012.  The system has been configured as a 'multilib' configuration, with a mixture of 32- and 64-bit.  By default, gcc compiles for 64-bit.&lt;br /&gt;
&lt;br /&gt;
== Compilation ==&lt;br /&gt;
&lt;br /&gt;
Step 1: obtaining the KLH-10 source.  There are two places that you can get the source, but I recommend using the Panda source, which you can download at [http://panda.trailing-edge.com/].  As mentioned in Mr. Björn's tutorial, if you are using gcc 4.x or later (I am!) you need to apply [http://victor.se/bjorn/its/kn10def-patch.txt this patch].  I needed to apply some additional patches of my own - see later.&lt;br /&gt;
&lt;br /&gt;
Step 2: unpack the source - easy: 'tar -xzf panda-dist.tar.gz'&lt;br /&gt;
&lt;br /&gt;
Step 3: compile the source.  I admit that here was where I got lost!  The instructions (panda-dist/klh10-2.0h/doc/install.txt) tell you to:&lt;br /&gt;
&lt;br /&gt;
# Unpack the main distribution, and the auxiliary distribution (I didn't, as I don't need it yet).&lt;br /&gt;
# Configure for the native platform.  Again, I didn't do anything here.  Perhaps I should have.&lt;br /&gt;
# 'Build a KN10 from sources'.  Here, I was stumped.  Which sources?  Where?  How? (Remember, I have a cold and my brain is a bit woolly.)&lt;br /&gt;
&lt;br /&gt;
The example shows:&lt;br /&gt;
&lt;br /&gt;
        $ cd &amp;lt;distrib&amp;gt;/bld/&amp;lt;platform&amp;gt;&lt;br /&gt;
        $ make base-kl          ;;; or base-ks or base-ks-its&lt;br /&gt;
&lt;br /&gt;
On my system, '&amp;lt;distrib&amp;gt;' is 'klh10-2.0h' and '&amp;lt;platform&amp;gt;' is 'lnx86' (Linux, x86) - so, I did:&lt;br /&gt;
&lt;br /&gt;
        $ cd klh10-2.0h/bld/lnx86&lt;br /&gt;
&lt;br /&gt;
.. but was dismayed to find a solitary file in this directory:&lt;br /&gt;
&lt;br /&gt;
        -rwxr-xr-x 1 lex root 70 Feb 21  2005 00build&lt;br /&gt;
&lt;br /&gt;
This contains a 'make' command:&lt;br /&gt;
&lt;br /&gt;
        #!/bin/sh&lt;br /&gt;
        make base-kl CONFFLAGS_AUX=-DKLH10_I_CIRC=1 LDFLAGS=-static&lt;br /&gt;
&lt;br /&gt;
Predictably, executing it causes make to output an error, because there is no Makefile.&lt;br /&gt;
&lt;br /&gt;
        make: *** No rule to make target `base-kl'.  Stop.&lt;br /&gt;
&lt;br /&gt;
Eventually, I decided to copy the command from the '00build' file, but source the Makefile.mk in the 'src' directory, two levels up (../../src/).  This gave me this command:&lt;br /&gt;
&lt;br /&gt;
        make -f ../../src/Makefile.mk base-kl CONFFLAGS_AUX=-DKLH10_I_CIRC=1 LDFLAGS=-static&lt;br /&gt;
&lt;br /&gt;
I was happy that at this point, gcc compiled some code before aborting with a syntax error in ../../cenv.h.  This was easily-fixed: edit cenv.h and find line 270.&lt;br /&gt;
&lt;br /&gt;
        #   define _FILE_OFFSET_BITS=64 /* Use 64-bit file ops */&lt;br /&gt;
&lt;br /&gt;
Change that to:&lt;br /&gt;
&lt;br /&gt;
        #   define _FILE_OFFSET_BITS 64 /* Use 64-bit file ops */&lt;br /&gt;
&lt;br /&gt;
I.e. change the '=' to a space.&lt;br /&gt;
&lt;br /&gt;
Repeating the 'make base-kl ...' command should cause compilation to progress a bit further, before it aborts with an undefined reference to 'lites_init'.  That function is in src/dvlites.c, and is an addition that the Panda team added: it sends the processor status over the parallel port, where it is displayed by a custom bit of hardware (a microcontroller, as designed by [http://www.sparetimegizmos.com Spare Time Gizmos]).  I have almost all of the parts for this device, but alas!  My computer doesn't have a parallel port, and no serial port either.  I'll have to think of another way to display the CPU status, and I have thought of a few:&lt;br /&gt;
&lt;br /&gt;
# Display the CPU status as a window on the screen.&lt;br /&gt;
# Send it to a file, or a pipe (to be interpreted by another application).&lt;br /&gt;
# Send it over the network, to be displayed by other hardware.&lt;br /&gt;
# Display it on standard PC hardware - e.g. the keyboard LEDs.  Problem: there aren't many LEDs, and XKB might not take too kindly to my app stealing its control.&lt;br /&gt;
&lt;br /&gt;
I've decided on '2' at present, but might do the window thing first, as I am trying to learn to program with SDL.&lt;br /&gt;
&lt;br /&gt;
Back to the patching of the KLH10 code.  My next edit was to add an 'extern int' declaration to src/klh10.c, edit src/dvlites.c and change '#include &amp;lt;asm/io.h&amp;gt;' to '#include &amp;lt;sys/io.h&amp;gt;', having determined that it's using the functions ioperm() and outb() to write to the parallel port.&lt;br /&gt;
&lt;br /&gt;
The addition to klh10.c is at the top: find the section marked '/* Imported functions */' and add this line after the final 'extern int' of the block:&lt;br /&gt;
&lt;br /&gt;
        extern int lites_init(unsigned int prt);&lt;br /&gt;
&lt;br /&gt;
After one more command, the klh10 executable should compile.&lt;br /&gt;
&lt;br /&gt;
        make -f ../../src/Makefile.mk base-kl CONFFLAGS_AUX=&amp;quot;-DKLH10_I_CIRC=1 -DKLH10_DEV_LITES=1&amp;quot; LDFLAGS=&amp;quot;-static&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The '-DKLH10_DEV_LITES=1' definition is required, and is also needed for other targets ('base-ks' and 'base-ks-its').&lt;br /&gt;
&lt;br /&gt;
To compile all of the binaries, I used a loop that cycled through the build/clean process and at the end of the pass, copied the executables to a temporary dir ('/dev/shm/klh10_bins/').  I'm sure that there's a more-elegant way of doing this.&lt;br /&gt;
&lt;br /&gt;
        for BUILD in base-{kl,ks,ks-its}; do&lt;br /&gt;
            make -f ../../src/Makefile.mk clean ${BUILD} CONFFLAGS_AUX=&amp;quot;-DKLH10_I_CIRC=1 -DKLH10_DEV_LITES=1&amp;quot; LDFLAGS=&amp;quot;-static&amp;quot;&lt;br /&gt;
            for a in *; do&lt;br /&gt;
                 file &amp;quot;${a}&amp;quot; | grep -q &amp;quot;executable&amp;quot; &amp;amp;&amp;amp; [ &amp;quot;${a}&amp;quot; != &amp;quot;00build&amp;quot; ] &amp;amp;&amp;amp; mv ${a} /dev/shm/klh10_bins/&lt;br /&gt;
            done&lt;br /&gt;
            echo &amp;quot;Finished building ${BUILD}.  Press Enter to continue.&amp;quot;&lt;br /&gt;
            read a&lt;br /&gt;
        done&lt;br /&gt;
        rm -f *.o&lt;br /&gt;
&lt;br /&gt;
=== Diff files (output of 'patch -u') ===&lt;br /&gt;
&lt;br /&gt;
The Wiki may edit these if I paste them verbatim, so I have made [[http://brooknet.imap.cc/klh10_diffs_260212_0617.txt them]] available on my webserver (I was not able to upload them due to browser difficulties).  There are four patches to files cenv.h, dvlites.c, klh10.c and kn10def.h.  These include the kn10def.c patch. ''[Please verify]''&lt;br /&gt;
&lt;br /&gt;
The next stage is to create a klh10 configuration file, which the install.txt file describes as 'semi-optional'.  The remaining steps are quite straightforward, so I will not list them here.  The binaries are copied to $KLH10_HOME and kn10-kl (or kn10-ks) are started up, with the config file as an optional argument.  If you wish to use the networking facilities of KL and KS-ITS, making dpni20 and dpimp 'setuid root' is required - see the 'INSTALLING BINARIES' section of install.txt.&lt;br /&gt;
&lt;br /&gt;
[[User:Lexthehex|Lexthehex]] 22:41, 25 February 2012 (PST)&lt;/div&gt;</summary>
		<author><name>Lexthehex</name></author>	</entry>

	<entry>
		<id>https://gunkies.org/w/index.php?title=Compiling_KLH10&amp;diff=10752</id>
		<title>Compiling KLH10</title>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=Compiling_KLH10&amp;diff=10752"/>
				<updated>2012-02-26T19:59:16Z</updated>
		
		<summary type="html">&lt;p&gt;Lexthehex: /* Compilation */ -- Edited the build script&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a brief guide to compiling Ken Harrenstien's KLH10 PDP-10 emulator.  It was written on an AMD64 Gentoo machine with 2GB RAM and gcc 4.5.3-r1.  The author currently has a bad cold, so please excuse any mistakes/foolishness caused by light-headedness.&lt;br /&gt;
&lt;br /&gt;
I was satisfied with using [[SIMH]] to run MIT's [[ITS]] operating system, but there was an annoying bug: the reported time of the system looped endlessly over three hours, and did not seem to keep proper time.  Was the clock running too fast?  It seemed to be okay, but something was amiss with the way that ITS reads the clock.  In an effort to narrow down the cause, I decided to get [[KLH10]] running and see if it exhibited the same problem.  I have not found an answer yet.&lt;br /&gt;
&lt;br /&gt;
== Useful links ==&lt;br /&gt;
&lt;br /&gt;
# Viktor Björn's tutorial [http://victor.se/bjorn/its/ 'Some notes on setting up an ITS system']&lt;br /&gt;
# [http://www.normalesup.org/~zoghaib/comp/pdp10/ITS/setup.html.en 'Setting up an ITS system today']&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
This tutorial assumes that you are running a Linux system with a modern version of gcc.  Some of these instructions will not apply to your system, or may differ.  I am using a current Gentoo system, as of February 2012.  The system has been configured as a 'multilib' configuration, with a mixture of 32- and 64-bit.  By default, gcc compiles for 64-bit.&lt;br /&gt;
&lt;br /&gt;
== Compilation ==&lt;br /&gt;
&lt;br /&gt;
Step 1: obtaining the KLH-10 source.  There are two places that you can get the source, but I recommend using the Panda source, which you can download at [http://panda.trailing-edge.com/].  As mentioned in Mr. Björn's tutorial, if you are using gcc 4.x or later (I am!) you need to apply [http://victor.se/bjorn/its/kn10def-patch.txt this patch].  I needed to apply some additional patches of my own - see later.&lt;br /&gt;
&lt;br /&gt;
Step 2: unpack the source - easy: 'tar -xzf panda-dist.tar.gz'&lt;br /&gt;
&lt;br /&gt;
Step 3: compile the source.  I admit that here was where I got lost!  The instructions (panda-dist/klh10-2.0h/doc/install.txt) tell you to:&lt;br /&gt;
&lt;br /&gt;
# Unpack the main distribution, and the auxiliary distribution (I didn't, as I don't need it yet).&lt;br /&gt;
# Configure for the native platform.  Again, I didn't do anything here.  Perhaps I should have.&lt;br /&gt;
# 'Build a KN10 from sources'.  Here, I was stumped.  Which sources?  Where?  How? (Remember, I have a cold and my brain is a bit woolly.)&lt;br /&gt;
&lt;br /&gt;
The example shows:&lt;br /&gt;
&lt;br /&gt;
        $ cd &amp;lt;distrib&amp;gt;/bld/&amp;lt;platform&amp;gt;&lt;br /&gt;
        $ make base-kl          ;;; or base-ks or base-ks-its&lt;br /&gt;
&lt;br /&gt;
On my system, '&amp;lt;distrib&amp;gt;' is 'klh10-2.0h' and '&amp;lt;platform&amp;gt;' is 'lnx86' (Linux, x86) - so, I did:&lt;br /&gt;
&lt;br /&gt;
        $ cd klh10-2.0h/bld/lnx86&lt;br /&gt;
&lt;br /&gt;
.. but was dismayed to find a solitary file in this directory:&lt;br /&gt;
&lt;br /&gt;
        -rwxr-xr-x 1 lex root 70 Feb 21  2005 00build&lt;br /&gt;
&lt;br /&gt;
This contains a 'make' command:&lt;br /&gt;
&lt;br /&gt;
        #!/bin/sh&lt;br /&gt;
        make base-kl CONFFLAGS_AUX=-DKLH10_I_CIRC=1 LDFLAGS=-static&lt;br /&gt;
&lt;br /&gt;
Predictably, executing it causes make to output an error, because there is no Makefile.&lt;br /&gt;
&lt;br /&gt;
        make: *** No rule to make target `base-kl'.  Stop.&lt;br /&gt;
&lt;br /&gt;
Eventually, I decided to copy the command from the '00build' file, but source the Makefile.mk in the 'src' directory, two levels up (../../src/).  This gave me this command:&lt;br /&gt;
&lt;br /&gt;
        make -f ../../src/Makefile.mk base-kl CONFFLAGS_AUX=-DKLH10_I_CIRC=1 LDFLAGS=-static&lt;br /&gt;
&lt;br /&gt;
I was happy that at this point, gcc compiled some code before aborting with a syntax error in ../../cenv.h.  This was easily-fixed: edit cenv.h and find line 270.&lt;br /&gt;
&lt;br /&gt;
        #   define _FILE_OFFSET_BITS=64 /* Use 64-bit file ops */&lt;br /&gt;
&lt;br /&gt;
Change that to:&lt;br /&gt;
&lt;br /&gt;
        #   define _FILE_OFFSET_BITS 64 /* Use 64-bit file ops */&lt;br /&gt;
&lt;br /&gt;
I.e. change the '=' to a space.&lt;br /&gt;
&lt;br /&gt;
Repeating the 'make base-kl ...' command should cause compilation to progress a bit further, before it aborts with an undefined reference to 'lites_init'.  That function is in src/dvlites.c, and is an addition that the Panda team added: it sends the processor status over the parallel port, where it is displayed by a custom bit of hardware (a microcontroller, as designed by [http://www.sparetimegizmos.com Spare Time Gizmos]).  I have almost all of the parts for this device, but alas!  My computer doesn't have a parallel port, and no serial port either.  I'll have to think of another way to display the CPU status, and I have thought of a few:&lt;br /&gt;
&lt;br /&gt;
# Display the CPU status as a window on the screen.&lt;br /&gt;
# Send it to a file, or a pipe (to be interpreted by another application).&lt;br /&gt;
# Send it over the network, to be displayed by other hardware.&lt;br /&gt;
# Display it on standard PC hardware - e.g. the keyboard LEDs.  Problem: there aren't many LEDs, and XKB might not take too kindly to my app stealing its control.&lt;br /&gt;
&lt;br /&gt;
I've decided on '2' at present, but might do the window thing first, as I am trying to learn to program with SDL.&lt;br /&gt;
&lt;br /&gt;
Back to the patching of the KLH10 code.  My next edit was to add an 'extern int' declaration to src/klh10.c, edit src/dvlites.c and change '#include &amp;lt;asm/io.h&amp;gt;' to '#include &amp;lt;sys/io.h&amp;gt;', having determined that it's using the functions ioperm() and outb() to write to the parallel port.&lt;br /&gt;
&lt;br /&gt;
The addition to klh10.c is at the top: find the section marked '/* Imported functions */' and add this line after the final 'extern int' of the block:&lt;br /&gt;
&lt;br /&gt;
        extern int lites_init(unsigned int prt);&lt;br /&gt;
&lt;br /&gt;
After one more command, the klh10 executable should compile.&lt;br /&gt;
&lt;br /&gt;
        make -f ../../src/Makefile.mk base-kl CONFFLAGS_AUX=&amp;quot;-DKLH10_I_CIRC=1 -DKLH10_DEV_LITES=1&amp;quot; LDFLAGS=&amp;quot;-static&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The '-DKLH10_DEV_LITES=1' definition is required, and is also needed for other targets ('base-ks' and 'base-ks-its').&lt;br /&gt;
&lt;br /&gt;
To compile all of the binaries, I used a loop that cycled through the build/clean process and at the end of the pass, copied the executables to a temporary dir ('/dev/shm/klh10_bins/').  I'm sure that there's a more-elegant way of doing this.&lt;br /&gt;
&lt;br /&gt;
        for BUILD in base-{kl,ks,ks-its}; do&lt;br /&gt;
            make -f ../../src/Makefile.mk clean ${BUILD} CONFFLAGS_AUX=&amp;quot;-DKLH10_I_CIRC=1 -DKLH10_DEV_LITES=1&amp;quot; LDFLAGS=&amp;quot;-static&amp;quot;&lt;br /&gt;
            for a in *; do&lt;br /&gt;
                 file &amp;quot;${a}&amp;quot; | grep -q &amp;quot;executable&amp;quot; &amp;amp;&amp;amp; [ &amp;quot;${a}&amp;quot; != &amp;quot;00build&amp;quot; ] &amp;amp;&amp;amp; mv ${a} /dev/shm/klh10_bins/&lt;br /&gt;
            done&lt;br /&gt;
            echo &amp;quot;Finished building ${BUILD}.  Press Enter to continue.&amp;quot;&lt;br /&gt;
            read a&lt;br /&gt;
        done&lt;br /&gt;
        rm -f *.o&lt;br /&gt;
&lt;br /&gt;
=== Diff files (output of 'patch -u') ===&lt;br /&gt;
&lt;br /&gt;
The Wiki may edit these if I paste them verbatim, so I have made [[http://brooknet.imap.cc/klh10_diffs_260212_0617.txt them]] available on my webserver (I was not able to upload them due to browser difficulties).  There are four patches to files cenv.h, dvlites.c, klh10.c and kn10def.h.  These include the kn10def.c patch. ''[Please verify]''&lt;br /&gt;
&lt;br /&gt;
After compilation, you should find that the platform build directory ('klh10-2.0h/bld/lnx86/') contains executables for dpni20, dprpxx, dptm03, kn10-kl, tapedd, uexbconv, vdkfmt, wfconv and wxtest.&lt;br /&gt;
&lt;br /&gt;
Other issues: 'make ks' and 'make ks-its' abort with undefined references.  Oh.. do a 'make clean' and try again, and they should compile. ''(much embarrassment)''&lt;br /&gt;
&lt;br /&gt;
The next stage is to create a klh10 configuration file, which the install.txt file describes as 'semi-optional'.  The remaining steps are quite straightforward, so I will not list them here.  The binaries are copied to $KLH10_HOME and kn10-kl (or kn10-ks) are started up, with the config file as an optional argument.  If you wish to use the networking facilities of KL and KS-ITS, making dpni20 and dpimp 'setuid root' is required - see the 'INSTALLING BINARIES' section of install.txt.&lt;br /&gt;
&lt;br /&gt;
[[User:Lexthehex|Lexthehex]] 22:41, 25 February 2012 (PST)&lt;/div&gt;</summary>
		<author><name>Lexthehex</name></author>	</entry>

	<entry>
		<id>https://gunkies.org/w/index.php?title=Compiling_KLH10&amp;diff=10751</id>
		<title>Compiling KLH10</title>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=Compiling_KLH10&amp;diff=10751"/>
				<updated>2012-02-26T19:47:30Z</updated>
		
		<summary type="html">&lt;p&gt;Lexthehex: /* Compilation */ -- Added a helper script&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a brief guide to compiling Ken Harrenstien's KLH10 PDP-10 emulator.  It was written on an AMD64 Gentoo machine with 2GB RAM and gcc 4.5.3-r1.  The author currently has a bad cold, so please excuse any mistakes/foolishness caused by light-headedness.&lt;br /&gt;
&lt;br /&gt;
I was satisfied with using [[SIMH]] to run MIT's [[ITS]] operating system, but there was an annoying bug: the reported time of the system looped endlessly over three hours, and did not seem to keep proper time.  Was the clock running too fast?  It seemed to be okay, but something was amiss with the way that ITS reads the clock.  In an effort to narrow down the cause, I decided to get [[KLH10]] running and see if it exhibited the same problem.  I have not found an answer yet.&lt;br /&gt;
&lt;br /&gt;
== Useful links ==&lt;br /&gt;
&lt;br /&gt;
# Viktor Björn's tutorial [http://victor.se/bjorn/its/ 'Some notes on setting up an ITS system']&lt;br /&gt;
# [http://www.normalesup.org/~zoghaib/comp/pdp10/ITS/setup.html.en 'Setting up an ITS system today']&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
This tutorial assumes that you are running a Linux system with a modern version of gcc.  Some of these instructions will not apply to your system, or may differ.  I am using a current Gentoo system, as of February 2012.  The system has been configured as a 'multilib' configuration, with a mixture of 32- and 64-bit.  By default, gcc compiles for 64-bit.&lt;br /&gt;
&lt;br /&gt;
== Compilation ==&lt;br /&gt;
&lt;br /&gt;
Step 1: obtaining the KLH-10 source.  There are two places that you can get the source, but I recommend using the Panda source, which you can download at [http://panda.trailing-edge.com/].  As mentioned in Mr. Björn's tutorial, if you are using gcc 4.x or later (I am!) you need to apply [http://victor.se/bjorn/its/kn10def-patch.txt this patch].  I needed to apply some additional patches of my own - see later.&lt;br /&gt;
&lt;br /&gt;
Step 2: unpack the source - easy: 'tar -xzf panda-dist.tar.gz'&lt;br /&gt;
&lt;br /&gt;
Step 3: compile the source.  I admit that here was where I got lost!  The instructions (panda-dist/klh10-2.0h/doc/install.txt) tell you to:&lt;br /&gt;
&lt;br /&gt;
# Unpack the main distribution, and the auxiliary distribution (I didn't, as I don't need it yet).&lt;br /&gt;
# Configure for the native platform.  Again, I didn't do anything here.  Perhaps I should have.&lt;br /&gt;
# 'Build a KN10 from sources'.  Here, I was stumped.  Which sources?  Where?  How? (Remember, I have a cold and my brain is a bit woolly.)&lt;br /&gt;
&lt;br /&gt;
The example shows:&lt;br /&gt;
&lt;br /&gt;
        $ cd &amp;lt;distrib&amp;gt;/bld/&amp;lt;platform&amp;gt;&lt;br /&gt;
        $ make base-kl          ;;; or base-ks or base-ks-its&lt;br /&gt;
&lt;br /&gt;
On my system, '&amp;lt;distrib&amp;gt;' is 'klh10-2.0h' and '&amp;lt;platform&amp;gt;' is 'lnx86' (Linux, x86) - so, I did:&lt;br /&gt;
&lt;br /&gt;
        $ cd klh10-2.0h/bld/lnx86&lt;br /&gt;
&lt;br /&gt;
.. but was dismayed to find a solitary file in this directory:&lt;br /&gt;
&lt;br /&gt;
        -rwxr-xr-x 1 lex root 70 Feb 21  2005 00build&lt;br /&gt;
&lt;br /&gt;
This contains a 'make' command:&lt;br /&gt;
&lt;br /&gt;
        #!/bin/sh&lt;br /&gt;
        make base-kl CONFFLAGS_AUX=-DKLH10_I_CIRC=1 LDFLAGS=-static&lt;br /&gt;
&lt;br /&gt;
Predictably, executing it causes make to output an error, because there is no Makefile.&lt;br /&gt;
&lt;br /&gt;
        make: *** No rule to make target `base-kl'.  Stop.&lt;br /&gt;
&lt;br /&gt;
Eventually, I decided to copy the command from the '00build' file, but source the Makefile.mk in the 'src' directory, two levels up (../../src/).  This gave me this command:&lt;br /&gt;
&lt;br /&gt;
        make -f ../../src/Makefile.mk base-kl CONFFLAGS_AUX=-DKLH10_I_CIRC=1 LDFLAGS=-static&lt;br /&gt;
&lt;br /&gt;
I was happy that at this point, gcc compiled some code before aborting with a syntax error in ../../cenv.h.  This was easily-fixed: edit cenv.h and find line 270.&lt;br /&gt;
&lt;br /&gt;
        #   define _FILE_OFFSET_BITS=64 /* Use 64-bit file ops */&lt;br /&gt;
&lt;br /&gt;
Change that to:&lt;br /&gt;
&lt;br /&gt;
        #   define _FILE_OFFSET_BITS 64 /* Use 64-bit file ops */&lt;br /&gt;
&lt;br /&gt;
I.e. change the '=' to a space.&lt;br /&gt;
&lt;br /&gt;
Repeating the 'make base-kl ...' command should cause compilation to progress a bit further, before it aborts with an undefined reference to 'lites_init'.  That function is in src/dvlites.c, and is an addition that the Panda team added: it sends the processor status over the parallel port, where it is displayed by a custom bit of hardware (a microcontroller, as designed by [http://www.sparetimegizmos.com Spare Time Gizmos]).  I have almost all of the parts for this device, but alas!  My computer doesn't have a parallel port, and no serial port either.  I'll have to think of another way to display the CPU status, and I have thought of a few:&lt;br /&gt;
&lt;br /&gt;
# Display the CPU status as a window on the screen.&lt;br /&gt;
# Send it to a file, or a pipe (to be interpreted by another application).&lt;br /&gt;
# Send it over the network, to be displayed by other hardware.&lt;br /&gt;
# Display it on standard PC hardware - e.g. the keyboard LEDs.  Problem: there aren't many LEDs, and XKB might not take too kindly to my app stealing its control.&lt;br /&gt;
&lt;br /&gt;
I've decided on '2' at present, but might do the window thing first, as I am trying to learn to program with SDL.&lt;br /&gt;
&lt;br /&gt;
Back to the patching of the KLH10 code.  My next edit was to add an 'extern int' declaration to src/klh10.c, edit src/dvlites.c and change '#include &amp;lt;asm/io.h&amp;gt;' to '#include &amp;lt;sys/io.h&amp;gt;', having determined that it's using the functions ioperm() and outb() to write to the parallel port.&lt;br /&gt;
&lt;br /&gt;
The addition to klh10.c is at the top: find the section marked '/* Imported functions */' and add this line after the final 'extern int' of the block:&lt;br /&gt;
&lt;br /&gt;
        extern int lites_init(unsigned int prt);&lt;br /&gt;
&lt;br /&gt;
After one more command, the klh10 executable should compile.&lt;br /&gt;
&lt;br /&gt;
        make -f ../../src/Makefile.mk base-kl CONFFLAGS_AUX=&amp;quot;-DKLH10_I_CIRC=1 -DKLH10_DEV_LITES=1&amp;quot; LDFLAGS=&amp;quot;-static&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The '-DKLH10_DEV_LITES=1' definition is required, and is also needed for other targets ('base-ks' and 'base-ks-its').&lt;br /&gt;
&lt;br /&gt;
To compile all of the binaries, I used a loop that cycled through the build/clean process and at the end of the pass, copied the executables to a temporary dir ('/dev/shm/klh10_bins/').  I'm sure that there's a more-elegant way of doing this.&lt;br /&gt;
&lt;br /&gt;
        for BUILD in base-{kl,ks,ks-its}; do&lt;br /&gt;
            make -f ../../src/Makefile.mk clean ${BUILD} CONFFLAGS_AUX=&amp;quot;-DKLH10_I_CIRC=1 -DKLH10_DEV_LITES=1&amp;quot; LDFLAGS=&amp;quot;-static&amp;quot;&lt;br /&gt;
            for a in *; do&lt;br /&gt;
                 file &amp;quot;${a}&amp;quot; | grep -q &amp;quot;executable&amp;quot; &amp;amp;&amp;amp; mv ${a} /dev/shm/klh10_bins/&lt;br /&gt;
            done&lt;br /&gt;
            echo &amp;quot;Finished building ${BUILD}.  Press Enter to continue.&amp;quot;&lt;br /&gt;
            read a&lt;br /&gt;
        done&lt;br /&gt;
&lt;br /&gt;
=== Diff files (output of 'patch -u') ===&lt;br /&gt;
&lt;br /&gt;
The Wiki may edit these if I paste them verbatim, so I have made [[http://brooknet.imap.cc/klh10_diffs_260212_0617.txt them]] available on my webserver (I was not able to upload them due to browser difficulties).  There are four patches to files cenv.h, dvlites.c, klh10.c and kn10def.h.  These include the kn10def.c patch. ''[Please verify]''&lt;br /&gt;
&lt;br /&gt;
After compilation, you should find that the platform build directory ('klh10-2.0h/bld/lnx86/') contains executables for dpni20, dprpxx, dptm03, kn10-kl, tapedd, uexbconv, vdkfmt, wfconv and wxtest.&lt;br /&gt;
&lt;br /&gt;
Other issues: 'make ks' and 'make ks-its' abort with undefined references.  Oh.. do a 'make clean' and try again, and they should compile. ''(much embarrassment)''&lt;br /&gt;
&lt;br /&gt;
The next stage is to create a klh10 configuration file, which the install.txt file describes as 'semi-optional'.  The remaining steps are quite straightforward, so I will not list them here.  The binaries are copied to $KLH10_HOME and kn10-kl (or kn10-ks) are started up, with the config file as an optional argument.  If you wish to use the networking facilities of KL and KS-ITS, making dpni20 and dpimp 'setuid root' is required - see the 'INSTALLING BINARIES' section of install.txt.&lt;br /&gt;
&lt;br /&gt;
[[User:Lexthehex|Lexthehex]] 22:41, 25 February 2012 (PST)&lt;/div&gt;</summary>
		<author><name>Lexthehex</name></author>	</entry>

	<entry>
		<id>https://gunkies.org/w/index.php?title=Compiling_KLH10&amp;diff=10750</id>
		<title>Compiling KLH10</title>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=Compiling_KLH10&amp;diff=10750"/>
				<updated>2012-02-26T19:31:19Z</updated>
		
		<summary type="html">&lt;p&gt;Lexthehex: /* Compilation */ -- Verified that -DKLH10_DEV_LITES=1 is necessary.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a brief guide to compiling Ken Harrenstien's KLH10 PDP-10 emulator.  It was written on an AMD64 Gentoo machine with 2GB RAM and gcc 4.5.3-r1.  The author currently has a bad cold, so please excuse any mistakes/foolishness caused by light-headedness.&lt;br /&gt;
&lt;br /&gt;
I was satisfied with using [[SIMH]] to run MIT's [[ITS]] operating system, but there was an annoying bug: the reported time of the system looped endlessly over three hours, and did not seem to keep proper time.  Was the clock running too fast?  It seemed to be okay, but something was amiss with the way that ITS reads the clock.  In an effort to narrow down the cause, I decided to get [[KLH10]] running and see if it exhibited the same problem.  I have not found an answer yet.&lt;br /&gt;
&lt;br /&gt;
== Useful links ==&lt;br /&gt;
&lt;br /&gt;
# Viktor Björn's tutorial [http://victor.se/bjorn/its/ 'Some notes on setting up an ITS system']&lt;br /&gt;
# [http://www.normalesup.org/~zoghaib/comp/pdp10/ITS/setup.html.en 'Setting up an ITS system today']&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
This tutorial assumes that you are running a Linux system with a modern version of gcc.  Some of these instructions will not apply to your system, or may differ.  I am using a current Gentoo system, as of February 2012.  The system has been configured as a 'multilib' configuration, with a mixture of 32- and 64-bit.  By default, gcc compiles for 64-bit.&lt;br /&gt;
&lt;br /&gt;
== Compilation ==&lt;br /&gt;
&lt;br /&gt;
Step 1: obtaining the KLH-10 source.  There are two places that you can get the source, but I recommend using the Panda source, which you can download at [http://panda.trailing-edge.com/].  As mentioned in Mr. Björn's tutorial, if you are using gcc 4.x or later (I am!) you need to apply [http://victor.se/bjorn/its/kn10def-patch.txt this patch].  I needed to apply some additional patches of my own - see later.&lt;br /&gt;
&lt;br /&gt;
Step 2: unpack the source - easy: 'tar -xzf panda-dist.tar.gz'&lt;br /&gt;
&lt;br /&gt;
Step 3: compile the source.  I admit that here was where I got lost!  The instructions (panda-dist/klh10-2.0h/doc/install.txt) tell you to:&lt;br /&gt;
&lt;br /&gt;
# Unpack the main distribution, and the auxiliary distribution (I didn't, as I don't need it yet).&lt;br /&gt;
# Configure for the native platform.  Again, I didn't do anything here.  Perhaps I should have.&lt;br /&gt;
# 'Build a KN10 from sources'.  Here, I was stumped.  Which sources?  Where?  How? (Remember, I have a cold and my brain is a bit woolly.)&lt;br /&gt;
&lt;br /&gt;
The example shows:&lt;br /&gt;
&lt;br /&gt;
        $ cd &amp;lt;distrib&amp;gt;/bld/&amp;lt;platform&amp;gt;&lt;br /&gt;
        $ make base-kl          ;;; or base-ks or base-ks-its&lt;br /&gt;
&lt;br /&gt;
On my system, '&amp;lt;distrib&amp;gt;' is 'klh10-2.0h' and '&amp;lt;platform&amp;gt;' is 'lnx86' (Linux, x86) - so, I did:&lt;br /&gt;
&lt;br /&gt;
        $ cd klh10-2.0h/bld/lnx86&lt;br /&gt;
&lt;br /&gt;
.. but was dismayed to find a solitary file in this directory:&lt;br /&gt;
&lt;br /&gt;
        -rwxr-xr-x 1 lex root 70 Feb 21  2005 00build&lt;br /&gt;
&lt;br /&gt;
This contains a 'make' command:&lt;br /&gt;
&lt;br /&gt;
        #!/bin/sh&lt;br /&gt;
        make base-kl CONFFLAGS_AUX=-DKLH10_I_CIRC=1 LDFLAGS=-static&lt;br /&gt;
&lt;br /&gt;
Predictably, executing it causes make to output an error, because there is no Makefile.&lt;br /&gt;
&lt;br /&gt;
        make: *** No rule to make target `base-kl'.  Stop.&lt;br /&gt;
&lt;br /&gt;
Eventually, I decided to copy the command from the '00build' file, but source the Makefile.mk in the 'src' directory, two levels up (../../src/).  This gave me this command:&lt;br /&gt;
&lt;br /&gt;
        make -f ../../src/Makefile.mk base-kl CONFFLAGS_AUX=-DKLH10_I_CIRC=1 LDFLAGS=-static&lt;br /&gt;
&lt;br /&gt;
I was happy that at this point, gcc compiled some code before aborting with a syntax error in ../../cenv.h.  This was easily-fixed: edit cenv.h and find line 270.&lt;br /&gt;
&lt;br /&gt;
        #   define _FILE_OFFSET_BITS=64 /* Use 64-bit file ops */&lt;br /&gt;
&lt;br /&gt;
Change that to:&lt;br /&gt;
&lt;br /&gt;
        #   define _FILE_OFFSET_BITS 64 /* Use 64-bit file ops */&lt;br /&gt;
&lt;br /&gt;
I.e. change the '=' to a space.&lt;br /&gt;
&lt;br /&gt;
Repeating the 'make base-kl ...' command should cause compilation to progress a bit further, before it aborts with an undefined reference to 'lites_init'.  That function is in src/dvlites.c, and is an addition that the Panda team added: it sends the processor status over the parallel port, where it is displayed by a custom bit of hardware (a microcontroller, as designed by [http://www.sparetimegizmos.com Spare Time Gizmos]).  I have almost all of the parts for this device, but alas!  My computer doesn't have a parallel port, and no serial port either.  I'll have to think of another way to display the CPU status, and I have thought of a few:&lt;br /&gt;
&lt;br /&gt;
# Display the CPU status as a window on the screen.&lt;br /&gt;
# Send it to a file, or a pipe (to be interpreted by another application).&lt;br /&gt;
# Send it over the network, to be displayed by other hardware.&lt;br /&gt;
# Display it on standard PC hardware - e.g. the keyboard LEDs.  Problem: there aren't many LEDs, and XKB might not take too kindly to my app stealing its control.&lt;br /&gt;
&lt;br /&gt;
I've decided on '2' at present, but might do the window thing first, as I am trying to learn to program with SDL.&lt;br /&gt;
&lt;br /&gt;
Back to the patching of the KLH10 code.  My next edit was to add an 'extern int' declaration to src/klh10.c, edit src/dvlites.c and change '#include &amp;lt;asm/io.h&amp;gt;' to '#include &amp;lt;sys/io.h&amp;gt;', having determined that it's using the functions ioperm() and outb() to write to the parallel port.&lt;br /&gt;
&lt;br /&gt;
The addition to klh10.c is at the top: find the section marked '/* Imported functions */' and add this line after the final 'extern int' of the block:&lt;br /&gt;
&lt;br /&gt;
        extern int lites_init(unsigned int prt);&lt;br /&gt;
&lt;br /&gt;
After one more command, the klh10 executable should compile.&lt;br /&gt;
&lt;br /&gt;
        make -f ../../src/Makefile.mk base-kl CONFFLAGS_AUX=&amp;quot;-DKLH10_I_CIRC=1 -DKLH10_DEV_LITES=1&amp;quot; LDFLAGS=&amp;quot;-static&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The '-DKLH10_DEV_LITES=1' definition is required, and is also needed for other targets ('base-ks' and 'base-ks-its').&lt;br /&gt;
&lt;br /&gt;
=== Diff files (output of 'patch -u') ===&lt;br /&gt;
&lt;br /&gt;
The Wiki may edit these if I paste them verbatim, so I have made [[http://brooknet.imap.cc/klh10_diffs_260212_0617.txt them]] available on my webserver (I was not able to upload them due to browser difficulties).  There are four patches to files cenv.h, dvlites.c, klh10.c and kn10def.h.  These include the kn10def.c patch. ''[Please verify]''&lt;br /&gt;
&lt;br /&gt;
After compilation, you should find that the platform build directory ('klh10-2.0h/bld/lnx86/') contains executables for dpni20, dprpxx, dptm03, kn10-kl, tapedd, uexbconv, vdkfmt, wfconv and wxtest.&lt;br /&gt;
&lt;br /&gt;
Other issues: 'make ks' and 'make ks-its' abort with undefined references.  Oh.. do a 'make clean' and try again, and they should compile. ''(much embarrassment)''&lt;br /&gt;
&lt;br /&gt;
The next stage is to create a klh10 configuration file, which the install.txt file describes as 'semi-optional'.  The remaining steps are quite straightforward, so I will not list them here.  The binaries are copied to $KLH10_HOME and kn10-kl (or kn10-ks) are started up, with the config file as an optional argument.  If you wish to use the networking facilities of KL and KS-ITS, making dpni20 and dpimp 'setuid root' is required - see the 'INSTALLING BINARIES' section of install.txt.&lt;br /&gt;
&lt;br /&gt;
[[User:Lexthehex|Lexthehex]] 22:41, 25 February 2012 (PST)&lt;/div&gt;</summary>
		<author><name>Lexthehex</name></author>	</entry>

	<entry>
		<id>https://gunkies.org/w/index.php?title=Compiling_KLH10&amp;diff=10749</id>
		<title>Compiling KLH10</title>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=Compiling_KLH10&amp;diff=10749"/>
				<updated>2012-02-26T18:11:08Z</updated>
		
		<summary type="html">&lt;p&gt;Lexthehex: /* Compilation */ -- Added some stuff at the end.  I'm not sure if it's really required.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a brief guide to compiling Ken Harrenstien's KLH10 PDP-10 emulator.  It was written on an AMD64 Gentoo machine with 2GB RAM and gcc 4.5.3-r1.  The author currently has a bad cold, so please excuse any mistakes/foolishness caused by light-headedness.&lt;br /&gt;
&lt;br /&gt;
I was satisfied with using [[SIMH]] to run MIT's [[ITS]] operating system, but there was an annoying bug: the reported time of the system looped endlessly over three hours, and did not seem to keep proper time.  Was the clock running too fast?  It seemed to be okay, but something was amiss with the way that ITS reads the clock.  In an effort to narrow down the cause, I decided to get [[KLH10]] running and see if it exhibited the same problem.  I have not found an answer yet.&lt;br /&gt;
&lt;br /&gt;
== Useful links ==&lt;br /&gt;
&lt;br /&gt;
# Viktor Björn's tutorial [http://victor.se/bjorn/its/ 'Some notes on setting up an ITS system']&lt;br /&gt;
# [http://www.normalesup.org/~zoghaib/comp/pdp10/ITS/setup.html.en 'Setting up an ITS system today']&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
This tutorial assumes that you are running a Linux system with a modern version of gcc.  Some of these instructions will not apply to your system, or may differ.  I am using a current Gentoo system, as of February 2012.  The system has been configured as a 'multilib' configuration, with a mixture of 32- and 64-bit.  By default, gcc compiles for 64-bit.&lt;br /&gt;
&lt;br /&gt;
== Compilation ==&lt;br /&gt;
&lt;br /&gt;
Step 1: obtaining the KLH-10 source.  There are two places that you can get the source, but I recommend using the Panda source, which you can download at [http://panda.trailing-edge.com/].  As mentioned in Mr. Björn's tutorial, if you are using gcc 4.x or later (I am!) you need to apply [http://victor.se/bjorn/its/kn10def-patch.txt this patch].  I needed to apply some additional patches of my own - see later.&lt;br /&gt;
&lt;br /&gt;
Step 2: unpack the source - easy: 'tar -xzf panda-dist.tar.gz'&lt;br /&gt;
&lt;br /&gt;
Step 3: compile the source.  I admit that here was where I got lost!  The instructions (panda-dist/klh10-2.0h/doc/install.txt) tell you to:&lt;br /&gt;
&lt;br /&gt;
# Unpack the main distribution, and the auxiliary distribution (I didn't, as I don't need it yet).&lt;br /&gt;
# Configure for the native platform.  Again, I didn't do anything here.  Perhaps I should have.&lt;br /&gt;
# 'Build a KN10 from sources'.  Here, I was stumped.  Which sources?  Where?  How? (Remember, I have a cold and my brain is a bit woolly.)&lt;br /&gt;
&lt;br /&gt;
The example shows:&lt;br /&gt;
&lt;br /&gt;
        $ cd &amp;lt;distrib&amp;gt;/bld/&amp;lt;platform&amp;gt;&lt;br /&gt;
        $ make base-kl          ;;; or base-ks or base-ks-its&lt;br /&gt;
&lt;br /&gt;
On my system, '&amp;lt;distrib&amp;gt;' is 'klh10-2.0h' and '&amp;lt;platform&amp;gt;' is 'lnx86' (Linux, x86) - so, I did:&lt;br /&gt;
&lt;br /&gt;
        $ cd klh10-2.0h/bld/lnx86&lt;br /&gt;
&lt;br /&gt;
.. but was dismayed to find a solitary file in this directory:&lt;br /&gt;
&lt;br /&gt;
        -rwxr-xr-x 1 lex root 70 Feb 21  2005 00build&lt;br /&gt;
&lt;br /&gt;
This contains a 'make' command:&lt;br /&gt;
&lt;br /&gt;
        #!/bin/sh&lt;br /&gt;
        make base-kl CONFFLAGS_AUX=-DKLH10_I_CIRC=1 LDFLAGS=-static&lt;br /&gt;
&lt;br /&gt;
Predictably, executing it causes make to output an error, because there is no Makefile.&lt;br /&gt;
&lt;br /&gt;
        make: *** No rule to make target `base-kl'.  Stop.&lt;br /&gt;
&lt;br /&gt;
Eventually, I decided to copy the command from the '00build' file, but source the Makefile.mk in the 'src' directory, two levels up (../../src/).  This gave me this command:&lt;br /&gt;
&lt;br /&gt;
        make -f ../../src/Makefile.mk base-kl CONFFLAGS_AUX=-DKLH10_I_CIRC=1 LDFLAGS=-static&lt;br /&gt;
&lt;br /&gt;
I was happy that at this point, gcc compiled some code before aborting with a syntax error in ../../cenv.h.  This was easily-fixed: edit cenv.h and find line 270.&lt;br /&gt;
&lt;br /&gt;
        #   define _FILE_OFFSET_BITS=64 /* Use 64-bit file ops */&lt;br /&gt;
&lt;br /&gt;
Change that to:&lt;br /&gt;
&lt;br /&gt;
        #   define _FILE_OFFSET_BITS 64 /* Use 64-bit file ops */&lt;br /&gt;
&lt;br /&gt;
I.e. change the '=' to a space.&lt;br /&gt;
&lt;br /&gt;
Repeating the 'make base-kl ...' command should cause compilation to progress a bit further, before it aborts with an undefined reference to 'lites_init'.  That function is in src/dvlites.c, and is an addition that the Panda team added: it sends the processor status over the parallel port, where it is displayed by a custom bit of hardware (a microcontroller, as designed by [http://www.sparetimegizmos.com Spare Time Gizmos]).  I have almost all of the parts for this device, but alas!  My computer doesn't have a parallel port, and no serial port either.  I'll have to think of another way to display the CPU status, and I have thought of a few:&lt;br /&gt;
&lt;br /&gt;
# Display the CPU status as a window on the screen.&lt;br /&gt;
# Send it to a file, or a pipe (to be interpreted by another application).&lt;br /&gt;
# Send it over the network, to be displayed by other hardware.&lt;br /&gt;
# Display it on standard PC hardware - e.g. the keyboard LEDs.  Problem: there aren't many LEDs, and XKB might not take too kindly to my app stealing its control.&lt;br /&gt;
&lt;br /&gt;
I've decided on '2' at present, but might do the window thing first, as I am trying to learn to program with SDL.&lt;br /&gt;
&lt;br /&gt;
Back to the patching of the KLH10 code.  My next edit was to add an 'extern int' declaration to src/klh10.c, edit src/dvlites.c and change '#include &amp;lt;asm/io.h&amp;gt;' to '#include &amp;lt;sys/io.h&amp;gt;', having determined that it's using the functions ioperm() and outb() to write to the parallel port.&lt;br /&gt;
&lt;br /&gt;
The addition to klh10.c is at the top: find the section marked '/* Imported functions */' and add this line after the final 'extern int' of the block:&lt;br /&gt;
&lt;br /&gt;
        extern int lites_init(unsigned int prt);&lt;br /&gt;
&lt;br /&gt;
After one more command, the klh10 executable should compile.&lt;br /&gt;
&lt;br /&gt;
        make -f ../../src/Makefile.mk base-kl CONFFLAGS_AUX=&amp;quot;-DKLH10_I_CIRC=1 -DKLH10_DEV_LITES=1&amp;quot; LDFLAGS=&amp;quot;-static&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You may not need the '-DKLH10_DEV_LITES=1' definition, as I added this while testing [note to self: tidy this document!].&lt;br /&gt;
&lt;br /&gt;
=== Diff files (output of 'patch -u') ===&lt;br /&gt;
&lt;br /&gt;
The Wiki may edit these if I paste them verbatim, so I have made [[http://brooknet.imap.cc/klh10_diffs_260212_0617.txt them]] available on my webserver (I was not able to upload them due to browser difficulties).  There are four patches to files cenv.h, dvlites.c, klh10.c and kn10def.h.  These include the kn10def.c patch. ''[Please verify]''&lt;br /&gt;
&lt;br /&gt;
After compilation, you should find that the platform build directory ('klh10-2.0h/bld/lnx86/') contains executables for dpni20, dprpxx, dptm03, kn10-kl, tapedd, uexbconv, vdkfmt, wfconv and wxtest.&lt;br /&gt;
&lt;br /&gt;
Other issues: 'make ks' and 'make ks-its' abort with undefined references.  Oh.. do a 'make clean' and try again, and they should compile. ''(much embarrassment)''&lt;br /&gt;
&lt;br /&gt;
The next stage is to create a klh10 configuration file, which the install.txt file describes as 'semi-optional'.  The remaining steps are quite straightforward, so I will not list them here.  The binaries are copied to $KLH10_HOME and kn10-kl (or kn10-ks) are started up, with the config file as an optional argument.  If you wish to use the networking facilities of KL and KS-ITS, making dpni20 and dpimp 'setuid root' is required - see the 'INSTALLING BINARIES' section of install.txt.&lt;br /&gt;
&lt;br /&gt;
[[User:Lexthehex|Lexthehex]] 22:41, 25 February 2012 (PST)&lt;/div&gt;</summary>
		<author><name>Lexthehex</name></author>	</entry>

	<entry>
		<id>https://gunkies.org/w/index.php?title=Compiling_KLH10&amp;diff=10748</id>
		<title>Compiling KLH10</title>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=Compiling_KLH10&amp;diff=10748"/>
				<updated>2012-02-26T17:58:31Z</updated>
		
		<summary type="html">&lt;p&gt;Lexthehex: /* Requirements */ -- (Verified: my gcc compiles for 64-bit by default.)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a brief guide to compiling Ken Harrenstien's KLH10 PDP-10 emulator.  It was written on an AMD64 Gentoo machine with 2GB RAM and gcc 4.5.3-r1.  The author currently has a bad cold, so please excuse any mistakes/foolishness caused by light-headedness.&lt;br /&gt;
&lt;br /&gt;
I was satisfied with using [[SIMH]] to run MIT's [[ITS]] operating system, but there was an annoying bug: the reported time of the system looped endlessly over three hours, and did not seem to keep proper time.  Was the clock running too fast?  It seemed to be okay, but something was amiss with the way that ITS reads the clock.  In an effort to narrow down the cause, I decided to get [[KLH10]] running and see if it exhibited the same problem.  I have not found an answer yet.&lt;br /&gt;
&lt;br /&gt;
== Useful links ==&lt;br /&gt;
&lt;br /&gt;
# Viktor Björn's tutorial [http://victor.se/bjorn/its/ 'Some notes on setting up an ITS system']&lt;br /&gt;
# [http://www.normalesup.org/~zoghaib/comp/pdp10/ITS/setup.html.en 'Setting up an ITS system today']&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
This tutorial assumes that you are running a Linux system with a modern version of gcc.  Some of these instructions will not apply to your system, or may differ.  I am using a current Gentoo system, as of February 2012.  The system has been configured as a 'multilib' configuration, with a mixture of 32- and 64-bit.  By default, gcc compiles for 64-bit.&lt;br /&gt;
&lt;br /&gt;
== Compilation ==&lt;br /&gt;
&lt;br /&gt;
Step 1: obtaining the KLH-10 source.  There are two places that you can get the source, but I recommend using the Panda source, which you can download at [http://panda.trailing-edge.com/].  As mentioned in Mr. Björn's tutorial, if you are using gcc 4.x or later (I am!) you need to apply [http://victor.se/bjorn/its/kn10def-patch.txt this patch].  I needed to apply some additional patches of my own - see later.&lt;br /&gt;
&lt;br /&gt;
Step 2: unpack the source - easy: 'tar -xzf panda-dist.tar.gz'&lt;br /&gt;
&lt;br /&gt;
Step 3: compile the source.  Here's where I got lost.  The instructions (panda-dist/klh10-2.0h/doc/install.txt) tell you to:&lt;br /&gt;
&lt;br /&gt;
# Unpack the main distribution, and the auxiliary distribution (I didn't, as I don't need it yet).&lt;br /&gt;
# Configure for the native platform.  Again, I didn't do anything here.  Perhaps I should have.&lt;br /&gt;
# 'Build a KN10 from sources'.  Here, I was stumped.  Which sources?  Where?  How? (Remember, I have a cold and my brain is a bit woolly.)&lt;br /&gt;
&lt;br /&gt;
The example shows:&lt;br /&gt;
&lt;br /&gt;
        $ cd &amp;lt;distrib&amp;gt;/bld/&amp;lt;platform&amp;gt;&lt;br /&gt;
        $ make base-kl          ;;; or base-ks or base-ks-its&lt;br /&gt;
&lt;br /&gt;
On my system, '&amp;lt;distrib&amp;gt;' is 'klh10-2.0h' and '&amp;lt;platform&amp;gt;' is 'lnx86' (Linux, x86) - so, I did:&lt;br /&gt;
&lt;br /&gt;
        $ cd klh10-2.0h/bld/lnx86&lt;br /&gt;
&lt;br /&gt;
.. but was dismayed to find a solitary file in this directory:&lt;br /&gt;
&lt;br /&gt;
        -rwxr-xr-x 1 lex root 70 Feb 21  2005 00build&lt;br /&gt;
&lt;br /&gt;
This contains a 'make' command:&lt;br /&gt;
&lt;br /&gt;
        #!/bin/sh&lt;br /&gt;
        make base-kl CONFFLAGS_AUX=-DKLH10_I_CIRC=1 LDFLAGS=-static&lt;br /&gt;
&lt;br /&gt;
Predictably, executing it causes make to output an error, because there is no Makefile.&lt;br /&gt;
&lt;br /&gt;
        make: *** No rule to make target `base-kl'.  Stop.&lt;br /&gt;
&lt;br /&gt;
Eventually, I decided to copy the command from the '00build' file, but source the Makefile.mk in the 'src' directory, two levels up (../../src/).  This gave me this command:&lt;br /&gt;
&lt;br /&gt;
        make -f ../../src/Makefile.mk base-kl CONFFLAGS_AUX=-DKLH10_I_CIRC=1 LDFLAGS=-static&lt;br /&gt;
&lt;br /&gt;
I was happy that at this point, gcc compiled some code before aborting with a syntax error in ../../cenv.h.  This was easily-fixed: edit cenv.h and find line 270.&lt;br /&gt;
&lt;br /&gt;
        #   define _FILE_OFFSET_BITS=64 /* Use 64-bit file ops */&lt;br /&gt;
&lt;br /&gt;
Change that to:&lt;br /&gt;
&lt;br /&gt;
        #   define _FILE_OFFSET_BITS 64 /* Use 64-bit file ops */&lt;br /&gt;
&lt;br /&gt;
I.e. change the '=' to a space.&lt;br /&gt;
&lt;br /&gt;
Repeating the 'make base-kl ...' command should cause compilation to progress a bit further, before it aborts with an undefined reference to 'lites_init'.  That function is in src/dvlites.c, and is an addition that the Panda team added: it sends the processor status over the parallel port, where it is displayed by a custom bit of hardware (a microcontroller, as designed by [http://www.sparetimegizmos.com Spare Time Gizmos]).  I have almost all of the parts for this device, but alas!  My computer doesn't have a parallel port, and no serial port either.  I'll have to think of another way to display the CPU status, and I have thought of a few:&lt;br /&gt;
&lt;br /&gt;
# Display the CPU status as a window on the screen.&lt;br /&gt;
# Send it to a file, or a pipe (to be interpreted by another application).&lt;br /&gt;
# Send it over the network, to be displayed by other hardware.&lt;br /&gt;
# Display it on standard PC hardware - e.g. the keyboard LEDs.  Problem: there aren't many LEDs, and XKB might not take too kindly to my app stealing its control.&lt;br /&gt;
&lt;br /&gt;
I've decided on '2' at present, but might do the window thing first, as I am trying to learn to program with SDL.&lt;br /&gt;
&lt;br /&gt;
Back to the patching of the KLH10 code.  My next edit was to add an 'extern int' declaration to src/klh10.c, edit src/dvlites.c and change '#include &amp;lt;asm/io.h&amp;gt;' to '#include &amp;lt;sys/io.h&amp;gt;', having determined that it's using the functions ioperm() and outb() to write to the parallel port.&lt;br /&gt;
&lt;br /&gt;
The addition to klh10.c is at the top: find the section marked '/* Imported functions */' and add this line after the final 'extern int' of the block:&lt;br /&gt;
&lt;br /&gt;
        extern int lites_init(unsigned int prt);&lt;br /&gt;
&lt;br /&gt;
After one more command, the klh10 executable should compile.&lt;br /&gt;
&lt;br /&gt;
        make -f ../../src/Makefile.mk base-kl CONFFLAGS_AUX=&amp;quot;-DKLH10_I_CIRC=1 -DKLH10_DEV_LITES=1&amp;quot; LDFLAGS=&amp;quot;-static&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You may not need the '-DKLH10_DEV_LITES=1' definition, as I added this while testing [note to self: tidy this document!].&lt;br /&gt;
&lt;br /&gt;
=== Diff files (output of 'patch -u') ===&lt;br /&gt;
&lt;br /&gt;
The Wiki may edit these if I paste them verbatim, so I have made [[http://brooknet.imap.cc/klh10_diffs_260212_0617.txt them]] available on my webserver (I was not able to upload them due to browser difficulties).  There are four patches to files cenv.h, dvlites.c, klh10.c and kn10def.h.  These include the kn10def.c patch. ''[Please verify]''&lt;br /&gt;
&lt;br /&gt;
After compilation, you should find that the platform build directory ('klh10-2.0h/bld/lnx86/') contains executables for dpni20, dprpxx, dptm03, kn10-kl, tapedd, uexbconv, vdkfmt, wfconv and wxtest.&lt;br /&gt;
&lt;br /&gt;
Other issues: 'make ks' and 'make ks-its' abort with undefined references.  Oh.. do a 'make clean' and try again, and they should compile. ''(much embarrassment)''&lt;br /&gt;
&lt;br /&gt;
[[User:Lexthehex|Lexthehex]] 22:41, 25 February 2012 (PST)&lt;/div&gt;</summary>
		<author><name>Lexthehex</name></author>	</entry>

	<entry>
		<id>https://gunkies.org/w/index.php?title=Compiling_KLH10&amp;diff=10747</id>
		<title>Compiling KLH10</title>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=Compiling_KLH10&amp;diff=10747"/>
				<updated>2012-02-26T17:56:32Z</updated>
		
		<summary type="html">&lt;p&gt;Lexthehex: /* Introduction */ -- corrected spelling of 'Ken Harrenstien'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a brief guide to compiling Ken Harrenstien's KLH10 PDP-10 emulator.  It was written on an AMD64 Gentoo machine with 2GB RAM and gcc 4.5.3-r1.  The author currently has a bad cold, so please excuse any mistakes/foolishness caused by light-headedness.&lt;br /&gt;
&lt;br /&gt;
I was satisfied with using [[SIMH]] to run MIT's [[ITS]] operating system, but there was an annoying bug: the reported time of the system looped endlessly over three hours, and did not seem to keep proper time.  Was the clock running too fast?  It seemed to be okay, but something was amiss with the way that ITS reads the clock.  In an effort to narrow down the cause, I decided to get [[KLH10]] running and see if it exhibited the same problem.  I have not found an answer yet.&lt;br /&gt;
&lt;br /&gt;
== Useful links ==&lt;br /&gt;
&lt;br /&gt;
# Viktor Björn's tutorial [http://victor.se/bjorn/its/ 'Some notes on setting up an ITS system']&lt;br /&gt;
# [http://www.normalesup.org/~zoghaib/comp/pdp10/ITS/setup.html.en 'Setting up an ITS system today']&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
This tutorial assumes that you are running a Linux system with a modern version of gcc.  Some of these instructions will not apply to your system, or may differ.  I am using a current Gentoo system, as of February 2012.  The system has been configured as a 'multilib' configuration, with a mixture of 32- and 64-bit.  By default, gcc compiles for 64-bit. ''(verify this)''&lt;br /&gt;
&lt;br /&gt;
== Compilation ==&lt;br /&gt;
&lt;br /&gt;
Step 1: obtaining the KLH-10 source.  There are two places that you can get the source, but I recommend using the Panda source, which you can download at [http://panda.trailing-edge.com/].  As mentioned in Mr. Björn's tutorial, if you are using gcc 4.x or later (I am!) you need to apply [http://victor.se/bjorn/its/kn10def-patch.txt this patch].  I needed to apply some additional patches of my own - see later.&lt;br /&gt;
&lt;br /&gt;
Step 2: unpack the source - easy: 'tar -xzf panda-dist.tar.gz'&lt;br /&gt;
&lt;br /&gt;
Step 3: compile the source.  Here's where I got lost.  The instructions (panda-dist/klh10-2.0h/doc/install.txt) tell you to:&lt;br /&gt;
&lt;br /&gt;
# Unpack the main distribution, and the auxiliary distribution (I didn't, as I don't need it yet).&lt;br /&gt;
# Configure for the native platform.  Again, I didn't do anything here.  Perhaps I should have.&lt;br /&gt;
# 'Build a KN10 from sources'.  Here, I was stumped.  Which sources?  Where?  How? (Remember, I have a cold and my brain is a bit woolly.)&lt;br /&gt;
&lt;br /&gt;
The example shows:&lt;br /&gt;
&lt;br /&gt;
        $ cd &amp;lt;distrib&amp;gt;/bld/&amp;lt;platform&amp;gt;&lt;br /&gt;
        $ make base-kl          ;;; or base-ks or base-ks-its&lt;br /&gt;
&lt;br /&gt;
On my system, '&amp;lt;distrib&amp;gt;' is 'klh10-2.0h' and '&amp;lt;platform&amp;gt;' is 'lnx86' (Linux, x86) - so, I did:&lt;br /&gt;
&lt;br /&gt;
        $ cd klh10-2.0h/bld/lnx86&lt;br /&gt;
&lt;br /&gt;
.. but was dismayed to find a solitary file in this directory:&lt;br /&gt;
&lt;br /&gt;
        -rwxr-xr-x 1 lex root 70 Feb 21  2005 00build&lt;br /&gt;
&lt;br /&gt;
This contains a 'make' command:&lt;br /&gt;
&lt;br /&gt;
        #!/bin/sh&lt;br /&gt;
        make base-kl CONFFLAGS_AUX=-DKLH10_I_CIRC=1 LDFLAGS=-static&lt;br /&gt;
&lt;br /&gt;
Predictably, executing it causes make to output an error, because there is no Makefile.&lt;br /&gt;
&lt;br /&gt;
        make: *** No rule to make target `base-kl'.  Stop.&lt;br /&gt;
&lt;br /&gt;
Eventually, I decided to copy the command from the '00build' file, but source the Makefile.mk in the 'src' directory, two levels up (../../src/).  This gave me this command:&lt;br /&gt;
&lt;br /&gt;
        make -f ../../src/Makefile.mk base-kl CONFFLAGS_AUX=-DKLH10_I_CIRC=1 LDFLAGS=-static&lt;br /&gt;
&lt;br /&gt;
I was happy that at this point, gcc compiled some code before aborting with a syntax error in ../../cenv.h.  This was easily-fixed: edit cenv.h and find line 270.&lt;br /&gt;
&lt;br /&gt;
        #   define _FILE_OFFSET_BITS=64 /* Use 64-bit file ops */&lt;br /&gt;
&lt;br /&gt;
Change that to:&lt;br /&gt;
&lt;br /&gt;
        #   define _FILE_OFFSET_BITS 64 /* Use 64-bit file ops */&lt;br /&gt;
&lt;br /&gt;
I.e. change the '=' to a space.&lt;br /&gt;
&lt;br /&gt;
Repeating the 'make base-kl ...' command should cause compilation to progress a bit further, before it aborts with an undefined reference to 'lites_init'.  That function is in src/dvlites.c, and is an addition that the Panda team added: it sends the processor status over the parallel port, where it is displayed by a custom bit of hardware (a microcontroller, as designed by [http://www.sparetimegizmos.com Spare Time Gizmos]).  I have almost all of the parts for this device, but alas!  My computer doesn't have a parallel port, and no serial port either.  I'll have to think of another way to display the CPU status, and I have thought of a few:&lt;br /&gt;
&lt;br /&gt;
# Display the CPU status as a window on the screen.&lt;br /&gt;
# Send it to a file, or a pipe (to be interpreted by another application).&lt;br /&gt;
# Send it over the network, to be displayed by other hardware.&lt;br /&gt;
# Display it on standard PC hardware - e.g. the keyboard LEDs.  Problem: there aren't many LEDs, and XKB might not take too kindly to my app stealing its control.&lt;br /&gt;
&lt;br /&gt;
I've decided on '2' at present, but might do the window thing first, as I am trying to learn to program with SDL.&lt;br /&gt;
&lt;br /&gt;
Back to the patching of the KLH10 code.  My next edit was to add an 'extern int' declaration to src/klh10.c, edit src/dvlites.c and change '#include &amp;lt;asm/io.h&amp;gt;' to '#include &amp;lt;sys/io.h&amp;gt;', having determined that it's using the functions ioperm() and outb() to write to the parallel port.&lt;br /&gt;
&lt;br /&gt;
The addition to klh10.c is at the top: find the section marked '/* Imported functions */' and add this line after the final 'extern int' of the block:&lt;br /&gt;
&lt;br /&gt;
        extern int lites_init(unsigned int prt);&lt;br /&gt;
&lt;br /&gt;
After one more command, the klh10 executable should compile.&lt;br /&gt;
&lt;br /&gt;
        make -f ../../src/Makefile.mk base-kl CONFFLAGS_AUX=&amp;quot;-DKLH10_I_CIRC=1 -DKLH10_DEV_LITES=1&amp;quot; LDFLAGS=&amp;quot;-static&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You may not need the '-DKLH10_DEV_LITES=1' definition, as I added this while testing [note to self: tidy this document!].&lt;br /&gt;
&lt;br /&gt;
=== Diff files (output of 'patch -u') ===&lt;br /&gt;
&lt;br /&gt;
The Wiki may edit these if I paste them verbatim, so I have made [[http://brooknet.imap.cc/klh10_diffs_260212_0617.txt them]] available on my webserver (I was not able to upload them due to browser difficulties).  There are four patches to files cenv.h, dvlites.c, klh10.c and kn10def.h.  These include the kn10def.c patch. ''[Please verify]''&lt;br /&gt;
&lt;br /&gt;
After compilation, you should find that the platform build directory ('klh10-2.0h/bld/lnx86/') contains executables for dpni20, dprpxx, dptm03, kn10-kl, tapedd, uexbconv, vdkfmt, wfconv and wxtest.&lt;br /&gt;
&lt;br /&gt;
Other issues: 'make ks' and 'make ks-its' abort with undefined references.  Oh.. do a 'make clean' and try again, and they should compile. ''(much embarrassment)''&lt;br /&gt;
&lt;br /&gt;
[[User:Lexthehex|Lexthehex]] 22:41, 25 February 2012 (PST)&lt;/div&gt;</summary>
		<author><name>Lexthehex</name></author>	</entry>

	<entry>
		<id>https://gunkies.org/w/index.php?title=Compiling_KLH10&amp;diff=10746</id>
		<title>Compiling KLH10</title>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=Compiling_KLH10&amp;diff=10746"/>
				<updated>2012-02-26T06:41:58Z</updated>
		
		<summary type="html">&lt;p&gt;Lexthehex: Compiling KLH10 on Gentoo x86_64 -- compilation for other targets&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a brief guide to compiling Ken Harrenstein's KLH10 PDP-10 emulator.  It was written on an AMD64 Gentoo machine with 2GB RAM and gcc 4.5.3-r1.  The author currently has a bad cold, so please excuse any mistakes/foolishness caused by light-headedness.&lt;br /&gt;
&lt;br /&gt;
I was satisfied with using [[SIMH]] to run MIT's [[ITS]] operating system, but there was an annoying bug: the reported time of the system looped endlessly over three hours, and did not seem to keep proper time.  Was the clock running too fast?  It seemed to be okay, but something was amiss with the way that ITS reads the clock.  In an effort to narrow down the cause, I decided to get [[KLH10]] running and see if it exhibited the same problem.  I have not found an answer yet.&lt;br /&gt;
&lt;br /&gt;
== Useful links ==&lt;br /&gt;
&lt;br /&gt;
# Viktor Björn's tutorial [http://victor.se/bjorn/its/ 'Some notes on setting up an ITS system']&lt;br /&gt;
# [http://www.normalesup.org/~zoghaib/comp/pdp10/ITS/setup.html.en 'Setting up an ITS system today']&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
This tutorial assumes that you are running a Linux system with a modern version of gcc.  Some of these instructions will not apply to your system, or may differ.  I am using a current Gentoo system, as of February 2012.  The system has been configured as a 'multilib' configuration, with a mixture of 32- and 64-bit.  By default, gcc compiles for 64-bit. ''(verify this)''&lt;br /&gt;
&lt;br /&gt;
== Compilation ==&lt;br /&gt;
&lt;br /&gt;
Step 1: obtaining the KLH-10 source.  There are two places that you can get the source, but I recommend using the Panda source, which you can download at [http://panda.trailing-edge.com/].  As mentioned in Mr. Björn's tutorial, if you are using gcc 4.x or later (I am!) you need to apply [http://victor.se/bjorn/its/kn10def-patch.txt this patch].  I needed to apply some additional patches of my own - see later.&lt;br /&gt;
&lt;br /&gt;
Step 2: unpack the source - easy: 'tar -xzf panda-dist.tar.gz'&lt;br /&gt;
&lt;br /&gt;
Step 3: compile the source.  Here's where I got lost.  The instructions (panda-dist/klh10-2.0h/doc/install.txt) tell you to:&lt;br /&gt;
&lt;br /&gt;
# Unpack the main distribution, and the auxiliary distribution (I didn't, as I don't need it yet).&lt;br /&gt;
# Configure for the native platform.  Again, I didn't do anything here.  Perhaps I should have.&lt;br /&gt;
# 'Build a KN10 from sources'.  Here, I was stumped.  Which sources?  Where?  How? (Remember, I have a cold and my brain is a bit woolly.)&lt;br /&gt;
&lt;br /&gt;
The example shows:&lt;br /&gt;
&lt;br /&gt;
        $ cd &amp;lt;distrib&amp;gt;/bld/&amp;lt;platform&amp;gt;&lt;br /&gt;
        $ make base-kl          ;;; or base-ks or base-ks-its&lt;br /&gt;
&lt;br /&gt;
On my system, '&amp;lt;distrib&amp;gt;' is 'klh10-2.0h' and '&amp;lt;platform&amp;gt;' is 'lnx86' (Linux, x86) - so, I did:&lt;br /&gt;
&lt;br /&gt;
        $ cd klh10-2.0h/bld/lnx86&lt;br /&gt;
&lt;br /&gt;
.. but was dismayed to find a solitary file in this directory:&lt;br /&gt;
&lt;br /&gt;
        -rwxr-xr-x 1 lex root 70 Feb 21  2005 00build&lt;br /&gt;
&lt;br /&gt;
This contains a 'make' command:&lt;br /&gt;
&lt;br /&gt;
        #!/bin/sh&lt;br /&gt;
        make base-kl CONFFLAGS_AUX=-DKLH10_I_CIRC=1 LDFLAGS=-static&lt;br /&gt;
&lt;br /&gt;
Predictably, executing it causes make to output an error, because there is no Makefile.&lt;br /&gt;
&lt;br /&gt;
        make: *** No rule to make target `base-kl'.  Stop.&lt;br /&gt;
&lt;br /&gt;
Eventually, I decided to copy the command from the '00build' file, but source the Makefile.mk in the 'src' directory, two levels up (../../src/).  This gave me this command:&lt;br /&gt;
&lt;br /&gt;
        make -f ../../src/Makefile.mk base-kl CONFFLAGS_AUX=-DKLH10_I_CIRC=1 LDFLAGS=-static&lt;br /&gt;
&lt;br /&gt;
I was happy that at this point, gcc compiled some code before aborting with a syntax error in ../../cenv.h.  This was easily-fixed: edit cenv.h and find line 270.&lt;br /&gt;
&lt;br /&gt;
        #   define _FILE_OFFSET_BITS=64 /* Use 64-bit file ops */&lt;br /&gt;
&lt;br /&gt;
Change that to:&lt;br /&gt;
&lt;br /&gt;
        #   define _FILE_OFFSET_BITS 64 /* Use 64-bit file ops */&lt;br /&gt;
&lt;br /&gt;
I.e. change the '=' to a space.&lt;br /&gt;
&lt;br /&gt;
Repeating the 'make base-kl ...' command should cause compilation to progress a bit further, before it aborts with an undefined reference to 'lites_init'.  That function is in src/dvlites.c, and is an addition that the Panda team added: it sends the processor status over the parallel port, where it is displayed by a custom bit of hardware (a microcontroller, as designed by [http://www.sparetimegizmos.com Spare Time Gizmos]).  I have almost all of the parts for this device, but alas!  My computer doesn't have a parallel port, and no serial port either.  I'll have to think of another way to display the CPU status, and I have thought of a few:&lt;br /&gt;
&lt;br /&gt;
# Display the CPU status as a window on the screen.&lt;br /&gt;
# Send it to a file, or a pipe (to be interpreted by another application).&lt;br /&gt;
# Send it over the network, to be displayed by other hardware.&lt;br /&gt;
# Display it on standard PC hardware - e.g. the keyboard LEDs.  Problem: there aren't many LEDs, and XKB might not take too kindly to my app stealing its control.&lt;br /&gt;
&lt;br /&gt;
I've decided on '2' at present, but might do the window thing first, as I am trying to learn to program with SDL.&lt;br /&gt;
&lt;br /&gt;
Back to the patching of the KLH10 code.  My next edit was to add an 'extern int' declaration to src/klh10.c, edit src/dvlites.c and change '#include &amp;lt;asm/io.h&amp;gt;' to '#include &amp;lt;sys/io.h&amp;gt;', having determined that it's using the functions ioperm() and outb() to write to the parallel port.&lt;br /&gt;
&lt;br /&gt;
The addition to klh10.c is at the top: find the section marked '/* Imported functions */' and add this line after the final 'extern int' of the block:&lt;br /&gt;
&lt;br /&gt;
        extern int lites_init(unsigned int prt);&lt;br /&gt;
&lt;br /&gt;
After one more command, the klh10 executable should compile.&lt;br /&gt;
&lt;br /&gt;
        make -f ../../src/Makefile.mk base-kl CONFFLAGS_AUX=&amp;quot;-DKLH10_I_CIRC=1 -DKLH10_DEV_LITES=1&amp;quot; LDFLAGS=&amp;quot;-static&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You may not need the '-DKLH10_DEV_LITES=1' definition, as I added this while testing [note to self: tidy this document!].&lt;br /&gt;
&lt;br /&gt;
=== Diff files (output of 'patch -u') ===&lt;br /&gt;
&lt;br /&gt;
The Wiki may edit these if I paste them verbatim, so I have made [[http://brooknet.imap.cc/klh10_diffs_260212_0617.txt them]] available on my webserver (I was not able to upload them due to browser difficulties).  There are four patches to files cenv.h, dvlites.c, klh10.c and kn10def.h.  These include the kn10def.c patch. ''[Please verify]''&lt;br /&gt;
&lt;br /&gt;
After compilation, you should find that the platform build directory ('klh10-2.0h/bld/lnx86/') contains executables for dpni20, dprpxx, dptm03, kn10-kl, tapedd, uexbconv, vdkfmt, wfconv and wxtest.&lt;br /&gt;
&lt;br /&gt;
Other issues: 'make ks' and 'make ks-its' abort with undefined references.  Oh.. do a 'make clean' and try again, and they should compile. ''(much embarrassment)''&lt;br /&gt;
&lt;br /&gt;
[[User:Lexthehex|Lexthehex]] 22:41, 25 February 2012 (PST)&lt;/div&gt;</summary>
		<author><name>Lexthehex</name></author>	</entry>

	<entry>
		<id>https://gunkies.org/w/index.php?title=Compiling_KLH10&amp;diff=10745</id>
		<title>Compiling KLH10</title>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=Compiling_KLH10&amp;diff=10745"/>
				<updated>2012-02-26T06:36:03Z</updated>
		
		<summary type="html">&lt;p&gt;Lexthehex: Compiling KLH10 on Gentoo x86_64 -- added a bracket&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a brief guide to compiling Ken Harrenstein's KLH10 PDP-10 emulator.  It was written on an AMD64 Gentoo machine with 2GB RAM and gcc 4.5.3-r1.  The author currently has a bad cold, so please excuse any mistakes/foolishness caused by light-headedness.&lt;br /&gt;
&lt;br /&gt;
I was satisfied with using [[SIMH]] to run MIT's [[ITS]] operating system, but there was an annoying bug: the reported time of the system looped endlessly over three hours, and did not seem to keep proper time.  Was the clock running too fast?  It seemed to be okay, but something was amiss with the way that ITS reads the clock.  In an effort to narrow down the cause, I decided to get [[KLH10]] running and see if it exhibited the same problem.  I have not found an answer yet.&lt;br /&gt;
&lt;br /&gt;
== Useful links ==&lt;br /&gt;
&lt;br /&gt;
# Viktor Björn's tutorial [http://victor.se/bjorn/its/ 'Some notes on setting up an ITS system']&lt;br /&gt;
# [http://www.normalesup.org/~zoghaib/comp/pdp10/ITS/setup.html.en 'Setting up an ITS system today']&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
This tutorial assumes that you are running a Linux system with a modern version of gcc.  Some of these instructions will not apply to your system, or may differ.  I am using a current Gentoo system, as of February 2012.  The system has been configured as a 'multilib' configuration, with a mixture of 32- and 64-bit.  By default, gcc compiles for 64-bit. ''(verify this)''&lt;br /&gt;
&lt;br /&gt;
== Compilation ==&lt;br /&gt;
&lt;br /&gt;
Step 1: obtaining the KLH-10 source.  There are two places that you can get the source, but I recommend using the Panda source, which you can download at [http://panda.trailing-edge.com/].  As mentioned in Mr. Björn's tutorial, if you are using gcc 4.x or later (I am!) you need to apply [http://victor.se/bjorn/its/kn10def-patch.txt this patch].  I needed to apply some additional patches of my own - see later.&lt;br /&gt;
&lt;br /&gt;
Step 2: unpack the source - easy: 'tar -xzf panda-dist.tar.gz'&lt;br /&gt;
&lt;br /&gt;
Step 3: compile the source.  Here's where I got lost.  The instructions (panda-dist/klh10-2.0h/doc/install.txt) tell you to:&lt;br /&gt;
&lt;br /&gt;
# Unpack the main distribution, and the auxiliary distribution (I didn't, as I don't need it yet).&lt;br /&gt;
# Configure for the native platform.  Again, I didn't do anything here.  Perhaps I should have.&lt;br /&gt;
# 'Build a KN10 from sources'.  Here, I was stumped.  Which sources?  Where?  How? (Remember, I have a cold and my brain is a bit woolly.)&lt;br /&gt;
&lt;br /&gt;
The example shows:&lt;br /&gt;
&lt;br /&gt;
        $ cd &amp;lt;distrib&amp;gt;/bld/&amp;lt;platform&amp;gt;&lt;br /&gt;
        $ make base-kl          ;;; or base-ks or base-ks-its&lt;br /&gt;
&lt;br /&gt;
On my system, '&amp;lt;distrib&amp;gt;' is 'klh10-2.0h' and '&amp;lt;platform&amp;gt;' is 'lnx86' (Linux, x86) - so, I did:&lt;br /&gt;
&lt;br /&gt;
        $ cd klh10-2.0h/bld/lnx86&lt;br /&gt;
&lt;br /&gt;
.. but was dismayed to find a solitary file in this directory:&lt;br /&gt;
&lt;br /&gt;
        -rwxr-xr-x 1 lex root 70 Feb 21  2005 00build&lt;br /&gt;
&lt;br /&gt;
This contains a 'make' command:&lt;br /&gt;
&lt;br /&gt;
        #!/bin/sh&lt;br /&gt;
        make base-kl CONFFLAGS_AUX=-DKLH10_I_CIRC=1 LDFLAGS=-static&lt;br /&gt;
&lt;br /&gt;
Predictably, executing it causes make to output an error, because there is no Makefile.&lt;br /&gt;
&lt;br /&gt;
        make: *** No rule to make target `base-kl'.  Stop.&lt;br /&gt;
&lt;br /&gt;
Eventually, I decided to copy the command from the '00build' file, but source the Makefile.mk in the 'src' directory, two levels up (../../src/).  This gave me this command:&lt;br /&gt;
&lt;br /&gt;
        make -f ../../src/Makefile.mk base-kl CONFFLAGS_AUX=-DKLH10_I_CIRC=1 LDFLAGS=-static&lt;br /&gt;
&lt;br /&gt;
I was happy that at this point, gcc compiled some code before aborting with a syntax error in ../../cenv.h.  This was easily-fixed: edit cenv.h and find line 270.&lt;br /&gt;
&lt;br /&gt;
        #   define _FILE_OFFSET_BITS=64 /* Use 64-bit file ops */&lt;br /&gt;
&lt;br /&gt;
Change that to:&lt;br /&gt;
&lt;br /&gt;
        #   define _FILE_OFFSET_BITS 64 /* Use 64-bit file ops */&lt;br /&gt;
&lt;br /&gt;
I.e. change the '=' to a space.&lt;br /&gt;
&lt;br /&gt;
Repeating the 'make base-kl ...' command should cause compilation to progress a bit further, before it aborts with an undefined reference to 'lites_init'.  That function is in src/dvlites.c, and is an addition that the Panda team added: it sends the processor status over the parallel port, where it is displayed by a custom bit of hardware (a microcontroller, as designed by [http://www.sparetimegizmos.com Spare Time Gizmos]).  I have almost all of the parts for this device, but alas!  My computer doesn't have a parallel port, and no serial port either.  I'll have to think of another way to display the CPU status, and I have thought of a few:&lt;br /&gt;
&lt;br /&gt;
# Display the CPU status as a window on the screen.&lt;br /&gt;
# Send it to a file, or a pipe (to be interpreted by another application).&lt;br /&gt;
# Send it over the network, to be displayed by other hardware.&lt;br /&gt;
# Display it on standard PC hardware - e.g. the keyboard LEDs.  Problem: there aren't many LEDs, and XKB might not take too kindly to my app stealing its control.&lt;br /&gt;
&lt;br /&gt;
I've decided on '2' at present, but might do the window thing first, as I am trying to learn to program with SDL.&lt;br /&gt;
&lt;br /&gt;
Back to the patching of the KLH10 code.  My next edit was to add an 'extern int' declaration to src/klh10.c, edit src/dvlites.c and change '#include &amp;lt;asm/io.h&amp;gt;' to '#include &amp;lt;sys/io.h&amp;gt;', having determined that it's using the functions ioperm() and outb() to write to the parallel port.&lt;br /&gt;
&lt;br /&gt;
The addition to klh10.c is at the top: find the section marked '/* Imported functions */' and add this line after the final 'extern int' of the block:&lt;br /&gt;
&lt;br /&gt;
        extern int lites_init(unsigned int prt);&lt;br /&gt;
&lt;br /&gt;
After one more command, the klh10 executable should compile.&lt;br /&gt;
&lt;br /&gt;
        make -f ../../src/Makefile.mk base-kl CONFFLAGS_AUX=&amp;quot;-DKLH10_I_CIRC=1 -DKLH10_DEV_LITES=1&amp;quot; LDFLAGS=&amp;quot;-static&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You may not need the '-DKLH10_DEV_LITES=1' definition, as I added this while testing [note to self: tidy this document!].&lt;br /&gt;
&lt;br /&gt;
=== Diff files (output of 'patch -u') ===&lt;br /&gt;
&lt;br /&gt;
The Wiki may edit these if I paste them verbatim, so I have made [[http://brooknet.imap.cc/klh10_diffs_260212_0617.txt them]] available on my webserver (I was not able to upload them due to browser difficulties).  There are four patches to files cenv.h, dvlites.c, klh10.c and kn10def.h.  These include the kn10def.c patch. ''[Please verify]''&lt;br /&gt;
&lt;br /&gt;
[[User:Lexthehex|Lexthehex]] 22:36, 25 February 2012 (PST)&lt;/div&gt;</summary>
		<author><name>Lexthehex</name></author>	</entry>

	<entry>
		<id>https://gunkies.org/w/index.php?title=Compiling_KLH10&amp;diff=10744</id>
		<title>Compiling KLH10</title>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=Compiling_KLH10&amp;diff=10744"/>
				<updated>2012-02-26T06:33:43Z</updated>
		
		<summary type="html">&lt;p&gt;Lexthehex: Compiling KLH10 on Gentoo x86_64&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a brief guide to compiling Ken Harrenstein's KLH10 PDP-10 emulator.  It was written on an AMD64 Gentoo machine with 2GB RAM and gcc 4.5.3-r1.  The author currently has a bad cold, so please excuse any mistakes/foolishness caused by light-headedness.&lt;br /&gt;
&lt;br /&gt;
I was satisfied with using [[SIMH]] to run MIT's [[ITS]] operating system, but there was an annoying bug: the reported time of the system looped endlessly over three hours, and did not seem to keep proper time.  Was the clock running too fast?  It seemed to be okay, but something was amiss with the way that ITS reads the clock.  In an effort to narrow down the cause, I decided to get [[KLH10]] running and see if it exhibited the same problem.  I have not found an answer yet.&lt;br /&gt;
&lt;br /&gt;
== Useful links ==&lt;br /&gt;
&lt;br /&gt;
# Viktor Björn's tutorial [http://victor.se/bjorn/its/ 'Some notes on setting up an ITS system']&lt;br /&gt;
# [http://www.normalesup.org/~zoghaib/comp/pdp10/ITS/setup.html.en 'Setting up an ITS system today']&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
This tutorial assumes that you are running a Linux system with a modern version of gcc.  Some of these instructions will not apply to your system, or may differ.  I am using a current Gentoo system, as of February 2012.  The system has been configured as a 'multilib' configuration, with a mixture of 32- and 64-bit.  By default, gcc compiles for 64-bit. ''(verify this)''&lt;br /&gt;
&lt;br /&gt;
== Compilation ==&lt;br /&gt;
&lt;br /&gt;
Step 1: obtaining the KLH-10 source.  There are two places that you can get the source, but I recommend using the Panda source, which you can download at [http://panda.trailing-edge.com/].  As mentioned in Mr. Björn's tutorial, if you are using gcc 4.x or later (I am!) you need to apply [http://victor.se/bjorn/its/kn10def-patch.txt this patch].  I needed to apply some additional patches of my own - see later.&lt;br /&gt;
&lt;br /&gt;
Step 2: unpack the source - easy: 'tar -xzf panda-dist.tar.gz'&lt;br /&gt;
&lt;br /&gt;
Step 3: compile the source.  Here's where I got lost.  The instructions (panda-dist/klh10-2.0h/doc/install.txt) tell you to:&lt;br /&gt;
&lt;br /&gt;
# Unpack the main distribution, and the auxiliary distribution (I didn't, as I don't need it yet).&lt;br /&gt;
# Configure for the native platform.  Again, I didn't do anything here.  Perhaps I should have.&lt;br /&gt;
# 'Build a KN10 from sources'.  Here, I was stumped.  Which sources?  Where?  How? (Remember, I have a cold and my brain is a bit woolly.)&lt;br /&gt;
&lt;br /&gt;
The example shows:&lt;br /&gt;
&lt;br /&gt;
        $ cd &amp;lt;distrib&amp;gt;/bld/&amp;lt;platform&amp;gt;&lt;br /&gt;
        $ make base-kl          ;;; or base-ks or base-ks-its&lt;br /&gt;
&lt;br /&gt;
On my system, '&amp;lt;distrib&amp;gt;' is 'klh10-2.0h' and '&amp;lt;platform&amp;gt;' is 'lnx86' (Linux, x86) - so, I did:&lt;br /&gt;
&lt;br /&gt;
        $ cd klh10-2.0h/bld/lnx86&lt;br /&gt;
&lt;br /&gt;
.. but was dismayed to find a solitary file in this directory:&lt;br /&gt;
&lt;br /&gt;
        -rwxr-xr-x 1 lex root 70 Feb 21  2005 00build&lt;br /&gt;
&lt;br /&gt;
This contains a 'make' command:&lt;br /&gt;
&lt;br /&gt;
        #!/bin/sh&lt;br /&gt;
        make base-kl CONFFLAGS_AUX=-DKLH10_I_CIRC=1 LDFLAGS=-static&lt;br /&gt;
&lt;br /&gt;
Predictably, executing it causes make to output an error, because there is no Makefile.&lt;br /&gt;
&lt;br /&gt;
        make: *** No rule to make target `base-kl'.  Stop.&lt;br /&gt;
&lt;br /&gt;
Eventually, I decided to copy the command from the '00build' file, but source the Makefile.mk in the 'src' directory, two levels up (../../src/).  This gave me this command:&lt;br /&gt;
&lt;br /&gt;
        make -f ../../src/Makefile.mk base-kl CONFFLAGS_AUX=-DKLH10_I_CIRC=1 LDFLAGS=-static&lt;br /&gt;
&lt;br /&gt;
I was happy that at this point, gcc compiled some code before aborting with a syntax error in ../../cenv.h.  This was easily-fixed: edit cenv.h and find line 270.&lt;br /&gt;
&lt;br /&gt;
        #   define _FILE_OFFSET_BITS=64 /* Use 64-bit file ops */&lt;br /&gt;
&lt;br /&gt;
Change that to:&lt;br /&gt;
&lt;br /&gt;
        #   define _FILE_OFFSET_BITS 64 /* Use 64-bit file ops */&lt;br /&gt;
&lt;br /&gt;
I.e. change the '=' to a space.&lt;br /&gt;
&lt;br /&gt;
Repeating the 'make base-kl ...' command should cause compilation to progress a bit further, before it aborts with an undefined reference to 'lites_init'.  That function is in src/dvlites.c, and is an addition that the Panda team added: it sends the processor status over the parallel port, where it is displayed by a custom bit of hardware (a microcontroller, as designed by [http://www.sparetimegizmos.com Spare Time Gizmos].  I have almost all of the parts for this device, but alas!  My computer doesn't have a parallel port, and no serial port either.  I'll have to think of another way to display the CPU status, and I have thought of a few:&lt;br /&gt;
&lt;br /&gt;
# Display the CPU status as a window on the screen.&lt;br /&gt;
# Send it to a file, or a pipe (to be interpreted by another application).&lt;br /&gt;
# Send it over the network, to be displayed by other hardware.&lt;br /&gt;
# Display it on standard PC hardware - e.g. the keyboard LEDs.  Problem: there aren't many LEDs, and XKB might not take too kindly to my app stealing its control.&lt;br /&gt;
&lt;br /&gt;
I've decided on '2' at present, but might do the window thing first, as I am trying to learn to program with SDL.&lt;br /&gt;
&lt;br /&gt;
Back to the patching of the KLH10 code.  My next edit was to add an 'extern int' declaration to src/klh10.c, edit src/dvlites.c and change '#include &amp;lt;asm/io.h&amp;gt;' to '#include &amp;lt;sys/io.h&amp;gt;', having determined that it's using the functions ioperm() and outb() to write to the parallel port.&lt;br /&gt;
&lt;br /&gt;
The addition to klh10.c is at the top: find the section marked '/* Imported functions */' and add this line after the final 'extern int' of the block:&lt;br /&gt;
&lt;br /&gt;
        extern int lites_init(unsigned int prt);&lt;br /&gt;
&lt;br /&gt;
After one more command, the klh10 executable should compile.&lt;br /&gt;
&lt;br /&gt;
        make -f ../../src/Makefile.mk base-kl CONFFLAGS_AUX=&amp;quot;-DKLH10_I_CIRC=1 -DKLH10_DEV_LITES=1&amp;quot; LDFLAGS=&amp;quot;-static&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You may not need the '-DKLH10_DEV_LITES=1' definition, as I added this while testing [note to self: tidy this document!].&lt;br /&gt;
&lt;br /&gt;
=== Diff files (output of 'patch -u') ===&lt;br /&gt;
&lt;br /&gt;
The Wiki may edit these if I paste them verbatim, so I have made [[http://brooknet.imap.cc/klh10_diffs_260212_0617.txt them]] available on my webserver (I was not able to upload them due to browser difficulties).  There are four patches to files cenv.h, dvlites.c, klh10.c and kn10def.h.  These include the kn10def.c patch. ''[Please verify]''&lt;br /&gt;
&lt;br /&gt;
[[User:Lexthehex|Lexthehex]] 22:33, 25 February 2012 (PST)&lt;/div&gt;</summary>
		<author><name>Lexthehex</name></author>	</entry>

	<entry>
		<id>https://gunkies.org/w/index.php?title=Compiling_KLH10&amp;diff=10743</id>
		<title>Compiling KLH10</title>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=Compiling_KLH10&amp;diff=10743"/>
				<updated>2012-02-26T06:30:12Z</updated>
		
		<summary type="html">&lt;p&gt;Lexthehex: Compiling KLH10 on Gentoo x86_64&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a brief guide to compiling Ken Harrenstein's KLH10 PDP-10 emulator.  It was written on an AMD64 Gentoo machine with 2GB RAM and gcc 4.5.3-r1.  The author currently has a bad cold, so please excuse any mistakes/foolishness caused by light-headedness.&lt;br /&gt;
&lt;br /&gt;
I was satisfied with using [[SIMH]] to run MIT's [[ITS]] operating system, but there was an annoying bug: the reported time of the system looped endlessly over three hours, and did not seem to keep proper time.  Was the clock running too fast?  It seemed to be okay, but something was amiss with the way that ITS reads the clock.  In an effort to narrow down the cause, I decided to get [[KLH10]] running and see if it exhibited the same problem.  I have not found an answer yet.&lt;br /&gt;
&lt;br /&gt;
== Useful links ==&lt;br /&gt;
&lt;br /&gt;
# Viktor Björn's tutorial [http://victor.se/bjorn/its/ 'Some notes on setting up an ITS system']&lt;br /&gt;
# [http://www.normalesup.org/~zoghaib/comp/pdp10/ITS/setup.html.en 'Setting up an ITS system today']&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
This tutorial assumes that you are running a Linux system with a modern version of gcc.  Some of these instructions will not apply to your system, or may differ.  I am using a current Gentoo system, as of February 2012.  The system has been configured as a 'multilib' configuration, with a mixture of 32- and 64-bit.  By default, gcc compiles for 64-bit. ''(verify this)''&lt;br /&gt;
&lt;br /&gt;
== Compilation ==&lt;br /&gt;
&lt;br /&gt;
Step 1: obtaining the KLH-10 source.  There are two places that you can get the source, but I recommend using the Panda source, which you can download at [http://panda.trailing-edge.com/].  As mentioned in Mr. Björn's tutorial, if you are using gcc 4.x or later (I am!) you need to apply [http://victor.se/bjorn/its/kn10def-patch.txt this patch].  I needed to apply some additional patches of my own - see later.&lt;br /&gt;
&lt;br /&gt;
Step 2: unpack the source - easy: 'tar -xzf panda-dist.tar.gz'&lt;br /&gt;
&lt;br /&gt;
Step 3: compile the source.  Here's where I got lost.  The instructions (panda-dist/klh10-2.0h/doc/install.txt) tell you to:&lt;br /&gt;
&lt;br /&gt;
# Unpack the main distribution, and the auxiliary distribution (I didn't, as I don't need it yet).&lt;br /&gt;
# Configure for the native platform.  Again, I didn't do anything here.  Perhaps I should have.&lt;br /&gt;
# 'Build a KN10 from sources'.  Here, I was stumped.  Which sources?  Where?  How? (Remember, I have a cold and my brain is a bit woolly.)&lt;br /&gt;
&lt;br /&gt;
The example shows:&lt;br /&gt;
&lt;br /&gt;
        $ cd &amp;lt;distrib&amp;gt;/bld/&amp;lt;platform&amp;gt;&lt;br /&gt;
        $ make base-kl          ;;; or base-ks or base-ks-its&lt;br /&gt;
&lt;br /&gt;
On my system, '&amp;lt;distrib&amp;gt;' is 'klh10-2.0h' and '&amp;lt;platform&amp;gt;' is 'lnx86' (Linux, x86) - so, I did:&lt;br /&gt;
&lt;br /&gt;
        $ cd klh10-2.0h/bld/lnx86&lt;br /&gt;
&lt;br /&gt;
.. but was dismayed to find a solitary file in this directory:&lt;br /&gt;
&lt;br /&gt;
        -rwxr-xr-x 1 lex root 70 Feb 21  2005 00build&lt;br /&gt;
&lt;br /&gt;
This contains a 'make' command:&lt;br /&gt;
&lt;br /&gt;
        #!/bin/sh&lt;br /&gt;
        make base-kl CONFFLAGS_AUX=-DKLH10_I_CIRC=1 LDFLAGS=-static&lt;br /&gt;
&lt;br /&gt;
Predictably, executing it causes make to output an error, because there is no Makefile.&lt;br /&gt;
&lt;br /&gt;
        make: *** No rule to make target `base-kl'.  Stop.&lt;br /&gt;
&lt;br /&gt;
Eventually, I decided to copy the command from the '00build' file, but source the Makefile.mk in the 'src' directory, two levels up (../../src/).  This gave me this command:&lt;br /&gt;
&lt;br /&gt;
        make -f ../../src/Makefile.mk base-kl CONFFLAGS_AUX=-DKLH10_I_CIRC=1 LDFLAGS=-static&lt;br /&gt;
&lt;br /&gt;
I was happy that at this point, gcc compiled some code before aborting with a syntax error in ../../cenv.h.  This was easily-fixed: edit cenv.h and find line 270.&lt;br /&gt;
&lt;br /&gt;
        #   define _FILE_OFFSET_BITS=64 /* Use 64-bit file ops */&lt;br /&gt;
&lt;br /&gt;
Change that to:&lt;br /&gt;
&lt;br /&gt;
        #   define _FILE_OFFSET_BITS 64 /* Use 64-bit file ops */&lt;br /&gt;
&lt;br /&gt;
I.e. change the '=' to a space.&lt;br /&gt;
&lt;br /&gt;
Repeating the 'make base-kl ...' command should cause compilation to progress a bit further, before it aborts with an undefined reference to 'lites_init'.  That function is in src/dvlites.c, and is an addition that the Panda team added: it sends the processor status over the parallel port, where it is displayed by a custom bit of hardware (a microcontroller, as designed by [http://www.sparetimegizmos.com Spare Time Gizmos].  I have almost all of the parts for this device, but alas!  My computer doesn't have a parallel port, and no serial port either.  I'll have to think of another way to display the CPU status, and I have thought of a few:&lt;br /&gt;
&lt;br /&gt;
# Display the CPU status as a window on the screen.&lt;br /&gt;
# Send it to a file, or a pipe (to be interpreted by another application).&lt;br /&gt;
# Send it over the network, to be displayed by other hardware.&lt;br /&gt;
# Display it on standard PC hardware - e.g. the keyboard LEDs.  Problem: there aren't many LEDs, and XKB might not take too kindly to my app stealing its control.&lt;br /&gt;
&lt;br /&gt;
I've decided on '2' at present, but might do the window thing first, as I am trying to learn to program with SDL.&lt;br /&gt;
&lt;br /&gt;
Back to the patching of the KLH10 code.  My next edit was to add an 'extern int' declaration to src/klh10.c, edit src/dvlites.c and change '#include &amp;lt;asm/io.h&amp;gt;' to '#include &amp;lt;sys/io.h&amp;gt;', having determined that it's using the functions ioperm() and outb() to write to the parallel port.&lt;br /&gt;
&lt;br /&gt;
The addition to klh10.c is at the top: find the section marked '/* Imported functions */' and add this line after the final 'extern int' of the block:&lt;br /&gt;
&lt;br /&gt;
        extern int lites_init(unsigned int prt);&lt;br /&gt;
&lt;br /&gt;
After one more command, the klh10 executable should compile.&lt;br /&gt;
&lt;br /&gt;
        make -f ../../src/Makefile.mk base-kl CONFFLAGS_AUX=&amp;quot;-DKLH10_I_CIRC=1 -DKLH10_DEV_LITES=1&amp;quot; LDFLAGS=&amp;quot;-static&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You may not need the '-DKLH10_DEV_LITES=1' definition, as I added this while testing [note to self: tidy this document!].&lt;br /&gt;
&lt;br /&gt;
=== Diff files (output of 'patch -u') ===&lt;br /&gt;
&lt;br /&gt;
The Wiki may edit these if I paste them verbatim, so I have made [[http://brooknet.imap.cc/klh10_diffs_260212_0617.txt them]] available on my webserver (I was not able to upload them due to browser difficulties).  There are four patches to files cenv.h, dvlites.c, klh10.c and kn10def.h.&lt;br /&gt;
&lt;br /&gt;
[[User:Lexthehex|Lexthehex]] 22:30, 25 February 2012 (PST)&lt;/div&gt;</summary>
		<author><name>Lexthehex</name></author>	</entry>

	<entry>
		<id>https://gunkies.org/w/index.php?title=Compiling_KLH10&amp;diff=10742</id>
		<title>Compiling KLH10</title>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=Compiling_KLH10&amp;diff=10742"/>
				<updated>2012-02-26T06:28:58Z</updated>
		
		<summary type="html">&lt;p&gt;Lexthehex: Compiling KLH10 on Gentoo x86_64&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a brief guide to compiling Ken Harrenstein's KLH10 PDP-10 emulator.  It was written on an AMD64 Gentoo machine with 2GB RAM and gcc 4.5.3-r1.  The author currently has a bad cold, so please excuse any mistakes/foolishness caused by light-headedness.&lt;br /&gt;
&lt;br /&gt;
I was satisfied with using [[SIMH]] to run MIT's [[ITS]] operating system, but there was an annoying bug: the reported time of the system looped endlessly over three hours, and did not seem to keep proper time.  Was the clock running too fast?  It seemed to be okay, but something was amiss with the way that ITS reads the clock.  In an effort to narrow down the cause, I decided to get [[KLH10]] running and see if it exhibited the same problem.  I have not found an answer yet.&lt;br /&gt;
&lt;br /&gt;
Useful links:&lt;br /&gt;
&lt;br /&gt;
# Viktor Björn's tutorial [http://victor.se/bjorn/its/ 'Some notes on setting up an ITS system']&lt;br /&gt;
# [http://www.normalesup.org/~zoghaib/comp/pdp10/ITS/setup.html.en 'Setting up an ITS system today']&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This tutorial assumes that you are running a Linux system with a modern version of gcc.  Some of these instructions will not apply to your system, or may differ.  I am using a current Gentoo system, as of February 2012.  The system has been configured as a 'multilib' configuration, with a mixture of 32- and 64-bit.  By default, gcc compiles for 64-bit. ''(verify this)''&lt;br /&gt;
&lt;br /&gt;
Step 1: obtaining the KLH-10 source.  There are two places that you can get the source, but I recommend using the Panda source, which you can download at [http://panda.trailing-edge.com/].  As mentioned in Mr. Björn's tutorial, if you are using gcc 4.x or later (I am!) you need to apply [http://victor.se/bjorn/its/kn10def-patch.txt this patch].  I needed to apply some additional patches of my own - see later.&lt;br /&gt;
&lt;br /&gt;
Step 2: unpack the source - easy: 'tar -xzf panda-dist.tar.gz'&lt;br /&gt;
&lt;br /&gt;
Step 3: compile the source.  Here's where I got lost.  The instructions (panda-dist/klh10-2.0h/doc/install.txt) tell you to:&lt;br /&gt;
&lt;br /&gt;
# Unpack the main distribution, and the auxiliary distribution (I didn't, as I don't need it yet).&lt;br /&gt;
# Configure for the native platform.  Again, I didn't do anything here.  Perhaps I should have.&lt;br /&gt;
# 'Build a KN10 from sources'.  Here, I was stumped.  Which sources?  Where?  How? (Remember, I have a cold and my brain is a bit woolly.)&lt;br /&gt;
&lt;br /&gt;
The example shows:&lt;br /&gt;
&lt;br /&gt;
        $ cd &amp;lt;distrib&amp;gt;/bld/&amp;lt;platform&amp;gt;&lt;br /&gt;
        $ make base-kl          ;;; or base-ks or base-ks-its&lt;br /&gt;
&lt;br /&gt;
On my system, '&amp;lt;distrib&amp;gt;' is 'klh10-2.0h' and '&amp;lt;platform&amp;gt;' is 'lnx86' (Linux, x86) - so, I did:&lt;br /&gt;
&lt;br /&gt;
        $ cd klh10-2.0h/bld/lnx86&lt;br /&gt;
&lt;br /&gt;
.. but was dismayed to find a solitary file in this directory:&lt;br /&gt;
&lt;br /&gt;
        -rwxr-xr-x 1 lex root 70 Feb 21  2005 00build&lt;br /&gt;
&lt;br /&gt;
This contains a 'make' command:&lt;br /&gt;
&lt;br /&gt;
        #!/bin/sh&lt;br /&gt;
        make base-kl CONFFLAGS_AUX=-DKLH10_I_CIRC=1 LDFLAGS=-static&lt;br /&gt;
&lt;br /&gt;
Predictably, executing it causes make to output an error, because there is no Makefile.&lt;br /&gt;
&lt;br /&gt;
        make: *** No rule to make target `base-kl'.  Stop.&lt;br /&gt;
&lt;br /&gt;
Eventually, I decided to copy the command from the '00build' file, but source the Makefile.mk in the 'src' directory, two levels up (../../src/).  This gave me this command:&lt;br /&gt;
&lt;br /&gt;
        make -f ../../src/Makefile.mk base-kl CONFFLAGS_AUX=-DKLH10_I_CIRC=1 LDFLAGS=-static&lt;br /&gt;
&lt;br /&gt;
I was happy that at this point, gcc compiled some code before aborting with a syntax error in ../../cenv.h.  This was easily-fixed: edit cenv.h and find line 270.&lt;br /&gt;
&lt;br /&gt;
        #   define _FILE_OFFSET_BITS=64 /* Use 64-bit file ops */&lt;br /&gt;
&lt;br /&gt;
Change that to:&lt;br /&gt;
&lt;br /&gt;
        #   define _FILE_OFFSET_BITS 64 /* Use 64-bit file ops */&lt;br /&gt;
&lt;br /&gt;
I.e. change the '=' to a space.&lt;br /&gt;
&lt;br /&gt;
Repeating the 'make base-kl ...' command should cause compilation to progress a bit further, before it aborts with an undefined reference to 'lites_init'.  That function is in src/dvlites.c, and is an addition that the Panda team added: it sends the processor status over the parallel port, where it is displayed by a custom bit of hardware (a microcontroller, as designed by [http://www.sparetimegizmos.com Spare Time Gizmos].  I have almost all of the parts for this device, but alas!  My computer doesn't have a parallel port, and no serial port either.  I'll have to think of another way to display the CPU status, and I have thought of a few:&lt;br /&gt;
&lt;br /&gt;
# Display the CPU status as a window on the screen.&lt;br /&gt;
# Send it to a file, or a pipe (to be interpreted by another application).&lt;br /&gt;
# Send it over the network, to be displayed by other hardware.&lt;br /&gt;
# Display it on standard PC hardware - e.g. the keyboard LEDs.  Problem: there aren't many LEDs, and XKB might not take too kindly to my app stealing its control.&lt;br /&gt;
&lt;br /&gt;
I've decided on '2' at present, but might do the window thing first, as I am trying to learn to program with SDL.&lt;br /&gt;
&lt;br /&gt;
Back to the patching of the KLH10 code.  My next edit was to add an 'extern int' declaration to src/klh10.c, edit src/dvlites.c and change '#include &amp;lt;asm/io.h&amp;gt;' to '#include &amp;lt;sys/io.h&amp;gt;', having determined that it's using the functions ioperm() and outb() to write to the parallel port.&lt;br /&gt;
&lt;br /&gt;
The addition to klh10.c is at the top: find the section marked '/* Imported functions */' and add this line after the final 'extern int' of the block:&lt;br /&gt;
&lt;br /&gt;
        extern int lites_init(unsigned int prt);&lt;br /&gt;
&lt;br /&gt;
After one more command, the klh10 executable should compile.&lt;br /&gt;
&lt;br /&gt;
        make -f ../../src/Makefile.mk base-kl CONFFLAGS_AUX=&amp;quot;-DKLH10_I_CIRC=1 -DKLH10_DEV_LITES=1&amp;quot; LDFLAGS=&amp;quot;-static&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You may not need the '-DKLH10_DEV_LITES=1' definition, as I added this while testing [note to self: tidy this document!].&lt;br /&gt;
&lt;br /&gt;
=== Diff files (output of 'patch -u') ===&lt;br /&gt;
&lt;br /&gt;
The Wiki may edit these if I paste them verbatim, so I have made [[http://brooknet.imap.cc/klh10_diffs_260212_0617.txt them]] available on my webserver (I was not able to upload them due to browser difficulties).  There are four patches to files cenv.h, dvlites.c, klh10.c and kn10def.h.&lt;br /&gt;
&lt;br /&gt;
[[User:Lexthehex|Lexthehex]] 22:28, 25 February 2012 (PST)&lt;/div&gt;</summary>
		<author><name>Lexthehex</name></author>	</entry>

	<entry>
		<id>https://gunkies.org/w/index.php?title=Compiling_KLH10&amp;diff=10741</id>
		<title>Compiling KLH10</title>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=Compiling_KLH10&amp;diff=10741"/>
				<updated>2012-02-26T06:28:31Z</updated>
		
		<summary type="html">&lt;p&gt;Lexthehex: Compiling KLH10 on Gentoo x86_64&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a brief guide to compiling Ken Harrenstein's KLH10 PDP-10 emulator.  It was written on an AMD64 Gentoo machine with 2GB RAM and gcc 4.5.3-r1.  The author currently has a bad cold, so please excuse any mistakes/foolishness caused by light-headedness.&lt;br /&gt;
&lt;br /&gt;
I was satisfied with using [[SIMH]] to run MIT's [[ITS]] operating system, but there was an annoying bug: the reported time of the system looped endlessly over three hours, and did not seem to keep proper time.  Was the clock running too fast?  It seemed to be okay, but something was amiss with the way that ITS reads the clock.  In an effort to narrow down the cause, I decided to get [[KLH10]] running and see if it exhibited the same problem.  I have not found an answer yet.&lt;br /&gt;
&lt;br /&gt;
Useful links:  Viktor Björn's tutorial [http://victor.se/bjorn/its/ 'Some notes on setting up an ITS system']&lt;br /&gt;
               [http://www.normalesup.org/~zoghaib/comp/pdp10/ITS/setup.html.en 'Setting up an ITS system today']&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This tutorial assumes that you are running a Linux system with a modern version of gcc.  Some of these instructions will not apply to your system, or may differ.  I am using a current Gentoo system, as of February 2012.  The system has been configured as a 'multilib' configuration, with a mixture of 32- and 64-bit.  By default, gcc compiles for 64-bit. ''(verify this)''&lt;br /&gt;
&lt;br /&gt;
Step 1: obtaining the KLH-10 source.  There are two places that you can get the source, but I recommend using the Panda source, which you can download at [http://panda.trailing-edge.com/].  As mentioned in Mr. Björn's tutorial, if you are using gcc 4.x or later (I am!) you need to apply [http://victor.se/bjorn/its/kn10def-patch.txt this patch].  I needed to apply some additional patches of my own - see later.&lt;br /&gt;
&lt;br /&gt;
Step 2: unpack the source - easy: 'tar -xzf panda-dist.tar.gz'&lt;br /&gt;
&lt;br /&gt;
Step 3: compile the source.  Here's where I got lost.  The instructions (panda-dist/klh10-2.0h/doc/install.txt) tell you to:&lt;br /&gt;
&lt;br /&gt;
# Unpack the main distribution, and the auxiliary distribution (I didn't, as I don't need it yet).&lt;br /&gt;
# Configure for the native platform.  Again, I didn't do anything here.  Perhaps I should have.&lt;br /&gt;
# 'Build a KN10 from sources'.  Here, I was stumped.  Which sources?  Where?  How? (Remember, I have a cold and my brain is a bit woolly.)&lt;br /&gt;
&lt;br /&gt;
The example shows:&lt;br /&gt;
&lt;br /&gt;
        $ cd &amp;lt;distrib&amp;gt;/bld/&amp;lt;platform&amp;gt;&lt;br /&gt;
        $ make base-kl          ;;; or base-ks or base-ks-its&lt;br /&gt;
&lt;br /&gt;
On my system, '&amp;lt;distrib&amp;gt;' is 'klh10-2.0h' and '&amp;lt;platform&amp;gt;' is 'lnx86' (Linux, x86) - so, I did:&lt;br /&gt;
&lt;br /&gt;
        $ cd klh10-2.0h/bld/lnx86&lt;br /&gt;
&lt;br /&gt;
.. but was dismayed to find a solitary file in this directory:&lt;br /&gt;
&lt;br /&gt;
        -rwxr-xr-x 1 lex root 70 Feb 21  2005 00build&lt;br /&gt;
&lt;br /&gt;
This contains a 'make' command:&lt;br /&gt;
&lt;br /&gt;
        #!/bin/sh&lt;br /&gt;
        make base-kl CONFFLAGS_AUX=-DKLH10_I_CIRC=1 LDFLAGS=-static&lt;br /&gt;
&lt;br /&gt;
Predictably, executing it causes make to output an error, because there is no Makefile.&lt;br /&gt;
&lt;br /&gt;
        make: *** No rule to make target `base-kl'.  Stop.&lt;br /&gt;
&lt;br /&gt;
Eventually, I decided to copy the command from the '00build' file, but source the Makefile.mk in the 'src' directory, two levels up (../../src/).  This gave me this command:&lt;br /&gt;
&lt;br /&gt;
        make -f ../../src/Makefile.mk base-kl CONFFLAGS_AUX=-DKLH10_I_CIRC=1 LDFLAGS=-static&lt;br /&gt;
&lt;br /&gt;
I was happy that at this point, gcc compiled some code before aborting with a syntax error in ../../cenv.h.  This was easily-fixed: edit cenv.h and find line 270.&lt;br /&gt;
&lt;br /&gt;
        #   define _FILE_OFFSET_BITS=64 /* Use 64-bit file ops */&lt;br /&gt;
&lt;br /&gt;
Change that to:&lt;br /&gt;
&lt;br /&gt;
        #   define _FILE_OFFSET_BITS 64 /* Use 64-bit file ops */&lt;br /&gt;
&lt;br /&gt;
I.e. change the '=' to a space.&lt;br /&gt;
&lt;br /&gt;
Repeating the 'make base-kl ...' command should cause compilation to progress a bit further, before it aborts with an undefined reference to 'lites_init'.  That function is in src/dvlites.c, and is an addition that the Panda team added: it sends the processor status over the parallel port, where it is displayed by a custom bit of hardware (a microcontroller, as designed by [http://www.sparetimegizmos.com Spare Time Gizmos].  I have almost all of the parts for this device, but alas!  My computer doesn't have a parallel port, and no serial port either.  I'll have to think of another way to display the CPU status, and I have thought of a few:&lt;br /&gt;
&lt;br /&gt;
# Display the CPU status as a window on the screen.&lt;br /&gt;
# Send it to a file, or a pipe (to be interpreted by another application).&lt;br /&gt;
# Send it over the network, to be displayed by other hardware.&lt;br /&gt;
# Display it on standard PC hardware - e.g. the keyboard LEDs.  Problem: there aren't many LEDs, and XKB might not take too kindly to my app stealing its control.&lt;br /&gt;
&lt;br /&gt;
I've decided on '2' at present, but might do the window thing first, as I am trying to learn to program with SDL.&lt;br /&gt;
&lt;br /&gt;
Back to the patching of the KLH10 code.  My next edit was to add an 'extern int' declaration to src/klh10.c, edit src/dvlites.c and change '#include &amp;lt;asm/io.h&amp;gt;' to '#include &amp;lt;sys/io.h&amp;gt;', having determined that it's using the functions ioperm() and outb() to write to the parallel port.&lt;br /&gt;
&lt;br /&gt;
The addition to klh10.c is at the top: find the section marked '/* Imported functions */' and add this line after the final 'extern int' of the block:&lt;br /&gt;
&lt;br /&gt;
        extern int lites_init(unsigned int prt);&lt;br /&gt;
&lt;br /&gt;
After one more command, the klh10 executable should compile.&lt;br /&gt;
&lt;br /&gt;
        make -f ../../src/Makefile.mk base-kl CONFFLAGS_AUX=&amp;quot;-DKLH10_I_CIRC=1 -DKLH10_DEV_LITES=1&amp;quot; LDFLAGS=&amp;quot;-static&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You may not need the '-DKLH10_DEV_LITES=1' definition, as I added this while testing [note to self: tidy this document!].&lt;br /&gt;
&lt;br /&gt;
=== Diff files (output of 'patch -u') ===&lt;br /&gt;
&lt;br /&gt;
The Wiki may edit these if I paste them verbatim, so I have made [[http://brooknet.imap.cc/klh10_diffs_260212_0617.txt them]] available on my webserver (I was not able to upload them due to browser difficulties).  There are four patches to files cenv.h, dvlites.c, klh10.c and kn10def.h.&lt;br /&gt;
&lt;br /&gt;
[[User:Lexthehex|Lexthehex]] 22:28, 25 February 2012 (PST)&lt;/div&gt;</summary>
		<author><name>Lexthehex</name></author>	</entry>

	<entry>
		<id>https://gunkies.org/w/index.php?title=Compiling_KLH10&amp;diff=10740</id>
		<title>Compiling KLH10</title>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=Compiling_KLH10&amp;diff=10740"/>
				<updated>2012-02-26T06:23:05Z</updated>
		
		<summary type="html">&lt;p&gt;Lexthehex: Compiling KLH10 on Gentoo x86_64&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a brief guide to compiling Ken Harrenstein's KLH10 PDP-10 emulator.  It was written on an AMD64 Gentoo machine with 2GB RAM and gcc 4.5.3-r1.  The author currently has a bad cold, so please excuse any mistakes/foolishness caused by light-headedness.&lt;br /&gt;
&lt;br /&gt;
I was satisfied with using [[SIMH]] to run MIT's [[ITS]] operating system, but there was an annoying bug: the reported time of the system looped endlessly over three hours, and did not seem to keep proper time.  Was the clock running too fast?  It seemed to be okay, but something was amiss with the way that ITS reads the clock.  In an effort to narrow down the cause, I decided to get [[KLH10]] running and see if it exhibited the same problem.  I have not found an answer yet.&lt;br /&gt;
&lt;br /&gt;
Useful links: Viktor Björn's tutorial [http://victor.se/bjorn/its/ 'Some notes on setting up an ITS system']&lt;br /&gt;
&lt;br /&gt;
This tutorial assumes that you are running a Linux system with a modern version of gcc.  Some of these instructions will not apply to your system, or may differ.  I am using a current Gentoo system, as of February 2012.  The system has been configured as a 'multilib' configuration, with a mixture of 32- and 64-bit.  By default, gcc compiles for 64-bit. ''(verify this)''&lt;br /&gt;
&lt;br /&gt;
Step 1: obtaining the KLH-10 source.  There are two places that you can get the source, but I recommend using the Panda source, which you can download at [http://panda.trailing-edge.com/].  As mentioned in Mr. Björn's tutorial, if you are using gcc 4.x or later (I am!) you need to apply [http://victor.se/bjorn/its/kn10def-patch.txt this patch].  I needed to apply some additional patches of my own - see later.&lt;br /&gt;
&lt;br /&gt;
Step 2: unpack the source - easy: 'tar -xzf panda-dist.tar.gz'&lt;br /&gt;
&lt;br /&gt;
Step 3: compile the source.  Here's where I got lost.  The instructions (panda-dist/klh10-2.0h/doc/install.txt) tell you to:&lt;br /&gt;
&lt;br /&gt;
# Unpack the main distribution, and the auxiliary distribution (I didn't, as I don't need it yet).&lt;br /&gt;
# Configure for the native platform.  Again, I didn't do anything here.  Perhaps I should have.&lt;br /&gt;
# 'Build a KN10 from sources'.  Here, I was stumped.  Which sources?  Where?  How? (Remember, I have a cold and my brain is a bit woolly.)&lt;br /&gt;
&lt;br /&gt;
The example shows:&lt;br /&gt;
&lt;br /&gt;
        $ cd &amp;lt;distrib&amp;gt;/bld/&amp;lt;platform&amp;gt;&lt;br /&gt;
        $ make base-kl          ;;; or base-ks or base-ks-its&lt;br /&gt;
&lt;br /&gt;
On my system, '&amp;lt;distrib&amp;gt;' is 'klh10-2.0h' and '&amp;lt;platform&amp;gt;' is 'lnx86' (Linux, x86) - so, I did:&lt;br /&gt;
&lt;br /&gt;
        $ cd klh10-2.0h/bld/lnx86&lt;br /&gt;
&lt;br /&gt;
.. but was dismayed to find a solitary file in this directory:&lt;br /&gt;
&lt;br /&gt;
        -rwxr-xr-x 1 lex root 70 Feb 21  2005 00build&lt;br /&gt;
&lt;br /&gt;
This contains a 'make' command:&lt;br /&gt;
&lt;br /&gt;
        #!/bin/sh&lt;br /&gt;
        make base-kl CONFFLAGS_AUX=-DKLH10_I_CIRC=1 LDFLAGS=-static&lt;br /&gt;
&lt;br /&gt;
Predictably, executing it causes make to output an error, because there is no Makefile.&lt;br /&gt;
&lt;br /&gt;
        make: *** No rule to make target `base-kl'.  Stop.&lt;br /&gt;
&lt;br /&gt;
Eventually, I decided to copy the command from the '00build' file, but source the Makefile.mk in the 'src' directory, two levels up (../../src/).  This gave me this command:&lt;br /&gt;
&lt;br /&gt;
        make -f ../../src/Makefile.mk base-kl CONFFLAGS_AUX=-DKLH10_I_CIRC=1 LDFLAGS=-static&lt;br /&gt;
&lt;br /&gt;
I was happy that at this point, gcc compiled some code before aborting with a syntax error in ../../cenv.h.  This was easily-fixed: edit cenv.h and find line 270.&lt;br /&gt;
&lt;br /&gt;
        #   define _FILE_OFFSET_BITS=64 /* Use 64-bit file ops */&lt;br /&gt;
&lt;br /&gt;
Change that to:&lt;br /&gt;
&lt;br /&gt;
        #   define _FILE_OFFSET_BITS 64 /* Use 64-bit file ops */&lt;br /&gt;
&lt;br /&gt;
I.e. change the '=' to a space.&lt;br /&gt;
&lt;br /&gt;
Repeating the 'make base-kl ...' command should cause compilation to progress a bit further, before it aborts with an undefined reference to 'lites_init'.  That function is in src/dvlites.c, and is an addition that the Panda team added: it sends the processor status over the parallel port, where it is displayed by a custom bit of hardware (a microcontroller, as designed by [http://www.sparetimegizmos.com Spare Time Gizmos].  I have almost all of the parts for this device, but alas!  My computer doesn't have a parallel port, and no serial port either.  I'll have to think of another way to display the CPU status, and I have thought of a few:&lt;br /&gt;
&lt;br /&gt;
# Display the CPU status as a window on the screen.&lt;br /&gt;
# Send it to a file, or a pipe (to be interpreted by another application).&lt;br /&gt;
# Send it over the network, to be displayed by other hardware.&lt;br /&gt;
# Display it on standard PC hardware - e.g. the keyboard LEDs.  Problem: there aren't many LEDs, and XKB might not take too kindly to my app stealing its control.&lt;br /&gt;
&lt;br /&gt;
I've decided on '2' at present, but might do the window thing first, as I am trying to learn to program with SDL.&lt;br /&gt;
&lt;br /&gt;
Back to the patching of the KLH10 code.  My next edit was to add an 'extern int' declaration to src/klh10.c, edit src/dvlites.c and change '#include &amp;lt;asm/io.h&amp;gt;' to '#include &amp;lt;sys/io.h&amp;gt;', having determined that it's using the functions ioperm() and outb() to write to the parallel port.&lt;br /&gt;
&lt;br /&gt;
The addition to klh10.c is at the top: find the section marked '/* Imported functions */' and add this line after the final 'extern int' of the block:&lt;br /&gt;
&lt;br /&gt;
        extern int lites_init(unsigned int prt);&lt;br /&gt;
&lt;br /&gt;
After one more command, the klh10 executable should compile.&lt;br /&gt;
&lt;br /&gt;
        make -f ../../src/Makefile.mk base-kl CONFFLAGS_AUX=&amp;quot;-DKLH10_I_CIRC=1 -DKLH10_DEV_LITES=1&amp;quot; LDFLAGS=&amp;quot;-static&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You may not need the '-DKLH10_DEV_LITES=1' definition, as I added this while testing [note to self: tidy this document!].&lt;br /&gt;
&lt;br /&gt;
=== Diff files (output of 'patch -u') ===&lt;br /&gt;
&lt;br /&gt;
The Wiki may edit these if I paste them verbatim, so I have made [[http://brooknet.imap.cc/klh10_diffs_260212_0617.txt them]] available on my webserver (I was not able to upload them due to browser difficulties).  There are four patches to files cenv.h, dvlites.c, klh10.c and kn10def.h.&lt;br /&gt;
&lt;br /&gt;
[[User:Lexthehex|Lexthehex]] 22:23, 25 February 2012 (PST)&lt;/div&gt;</summary>
		<author><name>Lexthehex</name></author>	</entry>

	<entry>
		<id>https://gunkies.org/w/index.php?title=Compiling_KLH10&amp;diff=10739</id>
		<title>Compiling KLH10</title>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=Compiling_KLH10&amp;diff=10739"/>
				<updated>2012-02-26T06:16:10Z</updated>
		
		<summary type="html">&lt;p&gt;Lexthehex: Compiling KLH10 on Gentoo x86_64&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a brief guide to compiling Ken Harrenstein's KLH10 PDP-10 emulator.  It was written on an AMD64 Gentoo machine with 2GB RAM and gcc 4.5.3-r1.  The author currently has a bad cold, so please excuse any mistakes/foolishness caused by light-headedness.&lt;br /&gt;
&lt;br /&gt;
I was satisfied with using [[SIMH]] to run MIT's [[ITS]] operating system, but there was an annoying bug: the reported time of the system looped endlessly over three hours, and did not seem to keep proper time.  Was the clock running too fast?  It seemed to be okay, but something was amiss with the way that ITS reads the clock.  In an effort to narrow down the cause, I decided to get [[KLH10]] running and see if it exhibited the same problem.  I have not found an answer yet.&lt;br /&gt;
&lt;br /&gt;
Useful links: Viktor Björn's tutorial [http://victor.se/bjorn/its/ 'Some notes on setting up an ITS system']&lt;br /&gt;
&lt;br /&gt;
This tutorial assumes that you are running a Linux system with a modern version of gcc.  Some of these instructions will not apply to your system, or may differ.  I am using a current Gentoo system, as of February 2012.  The system has been configured as a 'multilib' configuration, with a mixture of 32- and 64-bit.  By default, gcc compiles for 64-bit. ''(verify this)''&lt;br /&gt;
&lt;br /&gt;
Step 1: obtaining the KLH-10 source.  There are two places that you can get the source, but I recommend using the Panda source, which you can download at [http://panda.trailing-edge.com/].  As mentioned in Mr. Björn's tutorial, if you are using gcc 4.x or later (I am!) you need to apply [http://victor.se/bjorn/its/kn10def-patch.txt this patch].  I needed to apply some additional patches of my own - see later.&lt;br /&gt;
&lt;br /&gt;
Step 2: unpack the source - easy: 'tar -xzf panda-dist.tar.gz'&lt;br /&gt;
&lt;br /&gt;
Step 3: compile the source.  Here's where I got lost.  The instructions (panda-dist/klh10-2.0h/doc/install.txt) tell you to:&lt;br /&gt;
&lt;br /&gt;
# Unpack the main distribution, and the auxiliary distribution (I didn't, as I don't need it yet).&lt;br /&gt;
# Configure for the native platform.  Again, I didn't do anything here.  Perhaps I should have.&lt;br /&gt;
# 'Build a KN10 from sources'.  Here, I was stumped.  Which sources?  Where?  How? (Remember, I have a cold and my brain is a bit woolly.)&lt;br /&gt;
&lt;br /&gt;
The example shows:&lt;br /&gt;
&lt;br /&gt;
        $ cd &amp;lt;distrib&amp;gt;/bld/&amp;lt;platform&amp;gt;&lt;br /&gt;
        $ make base-kl          ;;; or base-ks or base-ks-its&lt;br /&gt;
&lt;br /&gt;
On my system, '&amp;lt;distrib&amp;gt;' is 'klh10-2.0h' and '&amp;lt;platform&amp;gt;' is 'lnx86' (Linux, x86) - so, I did:&lt;br /&gt;
&lt;br /&gt;
        $ cd klh10-2.0h/bld/lnx86&lt;br /&gt;
&lt;br /&gt;
.. but was dismayed to find a solitary file in this directory:&lt;br /&gt;
&lt;br /&gt;
        -rwxr-xr-x 1 lex root 70 Feb 21  2005 00build&lt;br /&gt;
&lt;br /&gt;
This contains a 'make' command:&lt;br /&gt;
&lt;br /&gt;
        #!/bin/sh&lt;br /&gt;
        make base-kl CONFFLAGS_AUX=-DKLH10_I_CIRC=1 LDFLAGS=-static&lt;br /&gt;
&lt;br /&gt;
Predictably, executing it causes make to output an error, because there is no Makefile.&lt;br /&gt;
&lt;br /&gt;
        make: *** No rule to make target `base-kl'.  Stop.&lt;br /&gt;
&lt;br /&gt;
Eventually, I decided to copy the command from the '00build' file, but source the Makefile.mk in the 'src' directory, two levels up (../../src/).  This gave me this command:&lt;br /&gt;
&lt;br /&gt;
        make -f ../../src/Makefile.mk base-kl CONFFLAGS_AUX=-DKLH10_I_CIRC=1 LDFLAGS=-static&lt;br /&gt;
&lt;br /&gt;
I was happy that at this point, gcc compiled some code before aborting with a syntax error in ../../cenv.h.  This was easily-fixed: edit cenv.h and find line 270.&lt;br /&gt;
&lt;br /&gt;
        #   define _FILE_OFFSET_BITS=64 /* Use 64-bit file ops */&lt;br /&gt;
&lt;br /&gt;
Change that to:&lt;br /&gt;
&lt;br /&gt;
        #   define _FILE_OFFSET_BITS 64 /* Use 64-bit file ops */&lt;br /&gt;
&lt;br /&gt;
I.e. change the '=' to a space.&lt;br /&gt;
&lt;br /&gt;
Repeating the 'make base-kl ...' command should cause compilation to progress a bit further, before it aborts with an undefined reference to 'lites_init'.  That function is in src/dvlites.c, and is an addition that the Panda team added: it sends the processor status over the parallel port, where it is displayed by a custom bit of hardware (a microcontroller, as designed by [http://www.sparetimegizmos.com Spare Time Gizmos].  I have almost all of the parts for this device, but alas!  My computer doesn't have a parallel port, and no serial port either.  I'll have to think of another way to display the CPU status, and I have thought of a few:&lt;br /&gt;
&lt;br /&gt;
# Display the CPU status as a window on the screen.&lt;br /&gt;
# Send it to a file, or a pipe (to be interpreted by another application).&lt;br /&gt;
# Send it over the network, to be displayed by other hardware.&lt;br /&gt;
# Display it on standard PC hardware - e.g. the keyboard LEDs.  Problem: there aren't many LEDs, and XKB might not take too kindly to my app stealing its control.&lt;br /&gt;
&lt;br /&gt;
I've decided on '2' at present, but might do the window thing first, as I am trying to learn to program with SDL.&lt;br /&gt;
&lt;br /&gt;
Back to the patching of the KLH10 code.  My next edit was to add an 'extern int' declaration to src/klh10.c, edit src/dvlites.c and change '#include &amp;lt;asm/io.h&amp;gt;' to '#include &amp;lt;sys/io.h&amp;gt;', having determined that it's using the functions ioperm() and outb() to write to the parallel port.&lt;br /&gt;
&lt;br /&gt;
The addition to klh10.c is at the top: find the section marked '/* Imported functions */' and add this line after the final 'extern int' of the block:&lt;br /&gt;
&lt;br /&gt;
        extern int lites_init(unsigned int prt);&lt;br /&gt;
&lt;br /&gt;
After one more command, the klh10 executable should compile.&lt;br /&gt;
&lt;br /&gt;
        make -f ../../src/Makefile.mk base-kl CONFFLAGS_AUX=&amp;quot;-DKLH10_I_CIRC=1 -DKLH10_DEV_LITES=1&amp;quot; LDFLAGS=&amp;quot;-static&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You may not need the '-DKLH10_DEV_LITES=1' definition, as I added this while testing [note to self: tidy this document!].&lt;br /&gt;
&lt;br /&gt;
=== Diffs ===&lt;br /&gt;
&lt;br /&gt;
The Wiki may process these in some way, so I may upload them as a separate file.&lt;br /&gt;
&lt;br /&gt;
==== cenv.h patch ====&lt;br /&gt;
&lt;br /&gt;
diff -u src/cenv.h /home/lex/Projects/KLH10/TOPS-20/panda-dist/klh10-2.0h/src/cenv.h&lt;br /&gt;
--- src/cenv.h	2002-03-28 08:48:50.000000000 +0000&lt;br /&gt;
+++ /home/lex/Projects/KLH10/TOPS-20/panda-dist/klh10-2.0h/src/cenv.h	2012-02-26 03:04:08.000000000 +0000&lt;br /&gt;
@@ -267,7 +267,7 @@&lt;br /&gt;
 #  define CENV_SYSF_LFS 64		/* off_t exists and has 64 bits */&lt;br /&gt;
 #  define CENV_SYSF_FSEEKO 1		/* And have some flavor of fseeko */&lt;br /&gt;
 #  ifndef _FILE_OFFSET_BITS&lt;br /&gt;
-#   define _FILE_OFFSET_BITS=64	/* Use 64-bit file ops */&lt;br /&gt;
+#   define _FILE_OFFSET_BITS 64	/* Use 64-bit file ops */&lt;br /&gt;
 #  endif&lt;br /&gt;
 #  ifndef _LARGEFILE_SOURCE&lt;br /&gt;
 #   define _LARGEFILE_SOURCE		/* Include fseeko, ftello, etc */&lt;br /&gt;
&lt;br /&gt;
==== dvlites.c patch ====&lt;br /&gt;
&lt;br /&gt;
diff -u src/dvlites.c /home/lex/Projects/KLH10/TOPS-20/panda-dist/klh10-2.0h/src/dvlites.c&lt;br /&gt;
--- src/dvlites.c	2005-02-21 23:19:13.000000000 +0000&lt;br /&gt;
+++ /home/lex/Projects/KLH10/TOPS-20/panda-dist/klh10-2.0h/src/dvlites.c	2012-02-26 03:46:04.000000000 +0000&lt;br /&gt;
@@ -31,7 +31,8 @@&lt;br /&gt;
 &lt;br /&gt;
 #if KLH10_DEV_LITES		/* Moby conditional for entire file */&lt;br /&gt;
 &lt;br /&gt;
-#include &amp;lt;asm/io.h&amp;gt;&lt;br /&gt;
+/* #include &amp;lt;asm/io.h&amp;gt; */&lt;br /&gt;
+#include &amp;lt;sys/io.h&amp;gt;&lt;br /&gt;
 #include &amp;quot;dvlites.h&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
==== klh10.c patch ====&lt;br /&gt;
 &lt;br /&gt;
diff -u src/klh10.c /home/lex/Projects/KLH10/TOPS-20/panda-dist/klh10-2.0h/src/klh10.c&lt;br /&gt;
--- src/klh10.c	2005-02-21 23:20:34.000000000 +0000&lt;br /&gt;
+++ /home/lex/Projects/KLH10/TOPS-20/panda-dist/klh10-2.0h/src/klh10.c	2012-02-26 03:42:42.000000000 +0000&lt;br /&gt;
@@ -82,6 +82,7 @@&lt;br /&gt;
 extern void apr_init(void);&lt;br /&gt;
 extern void apr_init_aprid(void);&lt;br /&gt;
 extern int apr_run(void);&lt;br /&gt;
+extern int lites_init(unsigned int prt);&lt;br /&gt;
 &lt;br /&gt;
 /* Local function kept external for easier debug access  */&lt;br /&gt;
 void errpt(void);&lt;br /&gt;
&lt;br /&gt;
==== kn10def.h patch ====&lt;br /&gt;
&lt;br /&gt;
diff -u src/kn10def.h /home/lex/Projects/KLH10/TOPS-20/panda-dist/klh10-2.0h/src/kn10def.h&lt;br /&gt;
--- src/kn10def.h	2006-06-15 17:30:59.000000000 +0000&lt;br /&gt;
+++ /home/lex/Projects/KLH10/TOPS-20/panda-dist/klh10-2.0h/src/kn10def.h	2012-02-26 02:25:55.000000000 +0000&lt;br /&gt;
@@ -235,7 +235,7 @@&lt;br /&gt;
 #if KLH10_EXTADR&lt;br /&gt;
 # define PC_ADDXCT(x) { register pcinc_t i__ = (x); if (i__) PC_ADD(i__); }&lt;br /&gt;
 #else&lt;br /&gt;
-# define PC_ADDXCT(x) (cpu.mr_PC += (x))	/* For now; fix up later? */&lt;br /&gt;
+# define PC_ADDXCT(x) { register pcinc_t i__ = (x); cpu.mr_PC += i__; } /* gcc4 fix by Roch Kusiak */&lt;br /&gt;
 #endif&lt;br /&gt;
 &lt;br /&gt;
 /* Macros for putting PC into a word.&lt;br /&gt;
&lt;br /&gt;
[[User:Lexthehex|Lexthehex]] 22:16, 25 February 2012 (PST)&lt;/div&gt;</summary>
		<author><name>Lexthehex</name></author>	</entry>

	<entry>
		<id>https://gunkies.org/w/index.php?title=Compiling_KLH10&amp;diff=10738</id>
		<title>Compiling KLH10</title>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=Compiling_KLH10&amp;diff=10738"/>
				<updated>2012-02-26T06:06:18Z</updated>
		
		<summary type="html">&lt;p&gt;Lexthehex: Compiling KLH10 on Gentoo x86_64&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a brief guide to compiling Ken Harrenstein's KLH10 PDP-10 emulator.  It was written on an AMD64 Gentoo machine with 2GB RAM and gcc 4.5.3-r1.  The author currently has a bad cold, so please excuse any mistakes/foolishness caused by light-headedness.&lt;br /&gt;
&lt;br /&gt;
I was satisfied with using [[SIMH]] to run MIT's [[ITS]] operating system, but there was an annoying bug: the reported time of the system looped endlessly over three hours, and did not seem to keep proper time.  Was the clock running too fast?  It seemed to be okay, but something was amiss with the way that ITS reads the clock.  In an effort to narrow down the cause, I decided to get [[KLH10]] running and see if it exhibited the same problem.  I have not found an answer yet.&lt;br /&gt;
&lt;br /&gt;
Useful links: Viktor Björn's tutorial [http://victor.se/bjorn/its/ 'Some notes on setting up an ITS system']&lt;br /&gt;
&lt;br /&gt;
This tutorial assumes that you are running a Linux system with a modern version of gcc.  Some of these instructions will not apply to your system, or may differ.  I am using a current Gentoo system, as of February 2012.  The system has been configured as a 'multilib' configuration, with a mixture of 32- and 64-bit.  By default, gcc compiles for 64-bit. ''(verify this)''&lt;br /&gt;
&lt;br /&gt;
Step 1: obtaining the KLH-10 source.  There are two places that you can get the source, but I recommend using the Panda source, which you can download at [http://panda.trailing-edge.com/].  As mentioned in Mr. Björn's tutorial, if you are using gcc 4.x or later (I am!) you need to apply [http://victor.se/bjorn/its/kn10def-patch.txt this patch].  I needed to apply some additional patches of my own - see later.&lt;br /&gt;
&lt;br /&gt;
Step 2: unpack the source - easy: 'tar -xzf panda-dist.tar.gz'&lt;br /&gt;
&lt;br /&gt;
Step 3: compile the source.  Here's where I got lost.  The instructions (panda-dist/klh10-2.0h/doc/install.txt) tell you to:&lt;br /&gt;
&lt;br /&gt;
# Unpack the main distribution, and the auxiliary distribution (I didn't, as I don't need it yet).&lt;br /&gt;
# Configure for the native platform.  Again, I didn't do anything here.  Perhaps I should have.&lt;br /&gt;
# 'Build a KN10 from sources'.  Here, I was stumped.  Which sources?  Where?  How?&lt;br /&gt;
&lt;br /&gt;
The example shows:&lt;br /&gt;
&lt;br /&gt;
        $ cd &amp;lt;distrib&amp;gt;/bld/&amp;lt;platform&amp;gt;&lt;br /&gt;
        $ make base-kl          ;;; or base-ks or base-ks-its&lt;br /&gt;
&lt;br /&gt;
On my system, '&amp;lt;distrib&amp;gt;' is 'klh10-2.0h' and '&amp;lt;platform&amp;gt;' is 'lnx86' (Linux, x86) - so, I did:&lt;br /&gt;
&lt;br /&gt;
        $ cd klh10-2.0h/bld/lnx86&lt;br /&gt;
&lt;br /&gt;
.. but was dismayed to find a solitary file in this directory:&lt;br /&gt;
&lt;br /&gt;
        -rwxr-xr-x 1 lex root 70 Feb 21  2005 00build&lt;br /&gt;
&lt;br /&gt;
This contains a 'make' command:&lt;br /&gt;
&lt;br /&gt;
        #!/bin/sh&lt;br /&gt;
        make base-kl CONFFLAGS_AUX=-DKLH10_I_CIRC=1 LDFLAGS=-static&lt;br /&gt;
&lt;br /&gt;
Predictably, executing it causes make to output an error, because there is no Makefile.&lt;br /&gt;
&lt;br /&gt;
        make: *** No rule to make target `base-kl'.  Stop.&lt;br /&gt;
&lt;br /&gt;
Eventually, I decided to copy the command from the '00build' file, but source the Makefile.mk in the 'src' directory, two levels up (../../src/).  This gave me this command:&lt;br /&gt;
&lt;br /&gt;
        make -f ../../src/Makefile.mk base-kl CONFFLAGS_AUX=-DKLH10_I_CIRC=1 LDFLAGS=-static&lt;br /&gt;
&lt;br /&gt;
I was happy that at this point, gcc compiled some code before aborting with a syntax error in ../../cenv.h.  This was easily-fixed: edit cenv.h and find line 270.&lt;br /&gt;
&lt;br /&gt;
        #   define _FILE_OFFSET_BITS=64 /* Use 64-bit file ops */&lt;br /&gt;
&lt;br /&gt;
Change that to:&lt;br /&gt;
&lt;br /&gt;
        #   define _FILE_OFFSET_BITS 64 /* Use 64-bit file ops */&lt;br /&gt;
&lt;br /&gt;
I.e. change the '=' to a space.&lt;br /&gt;
&lt;br /&gt;
Repeating the 'make base-kl ...' command should cause compilation to progress a bit further, before it aborts with an undefined reference to 'lites_init'.  That function is in src/dvlites.c, and is an addition that the Panda team added: it sends the processor status over the parallel port, where it is displayed by a custom bit of hardware (a microcontroller, as designed by [http://www.sparetimegizmos.com Spare Time Gizmos].  I have almost all of the parts for this device, but alas!  My computer doesn't have a parallel port, and no serial port either.  I'll have to think of another way to display the CPU status, and I have thought of a few:&lt;br /&gt;
&lt;br /&gt;
# Display the CPU status as a window on the screen.&lt;br /&gt;
# Send it to a file, or a pipe (to be interpreted by another application).&lt;br /&gt;
# Send it over the network, to be displayed by other hardware.&lt;br /&gt;
# Display it on standard PC hardware - e.g. the keyboard LEDs.  Problem: there aren't many LEDs, and XKB might not take too kindly to my app stealing its control.&lt;br /&gt;
&lt;br /&gt;
I've decided on '2' at present, but might do the window thing first, as I am trying to learn to program with SDL.&lt;br /&gt;
&lt;br /&gt;
Back to the patching of the KLH10 code.  My next edit was to add an 'extern int' declaration to src/klh10.c, edit src/dvlites.c and change '#include &amp;lt;asm/io.h&amp;gt;' to '#include &amp;lt;sys/io.h&amp;gt;', having determined that it's using the functions ioperm() and outb() to write to the parallel port.&lt;br /&gt;
&lt;br /&gt;
I'll make these patches available once I have produced them; currently, I'm editing the files directly and have not made backups - having to sneeze/blow my nose every 2 minutes means that I am not able to concentrate very well.&lt;br /&gt;
&lt;br /&gt;
The addition to klh10.c is at the top: find the section marked '/* Imported functions */' and add this line after the final 'extern int' of the block:&lt;br /&gt;
&lt;br /&gt;
        extern int lites_init(unsigned int prt);&lt;br /&gt;
&lt;br /&gt;
After one more command, the klh10 executable should compile.&lt;br /&gt;
&lt;br /&gt;
        make -f ../../src/Makefile.mk base-kl CONFFLAGS_AUX=&amp;quot;-DKLH10_I_CIRC=1 -DKLH10_DEV_LITES=1&amp;quot; LDFLAGS=&amp;quot;-static&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You may not need the '-DKLH10_DEV_LITES=1' definition, as I added this while testing [note to self: tidy this document!].&lt;br /&gt;
&lt;br /&gt;
[[User:Lexthehex|Lexthehex]] 22:06, 25 February 2012 (PST)&lt;/div&gt;</summary>
		<author><name>Lexthehex</name></author>	</entry>

	<entry>
		<id>https://gunkies.org/w/index.php?title=Compiling_KLH10&amp;diff=10737</id>
		<title>Compiling KLH10</title>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=Compiling_KLH10&amp;diff=10737"/>
				<updated>2012-02-26T05:29:14Z</updated>
		
		<summary type="html">&lt;p&gt;Lexthehex: Compiling KLH10 on Gentoo x86_64&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a brief guide to compiling Ken Harrenstein's KLH10 PDP-10 emulator.  It was written on an AMD64 Gentoo machine with 2GB RAM and gcc 4.5.3-r1.  The author currently has a bad cold, so please excuse any mistakes/foolishness caused by light-headedness.&lt;br /&gt;
&lt;br /&gt;
Useful links: Viktor Björn's tutorial [http://victor.se/bjorn/its/ 'Some notes on setting up an ITS system']&lt;br /&gt;
&lt;br /&gt;
This tutorial assumes that you are running a Linux system with a modern version of gcc.  Some of these instructions will not apply to your system, or may differ.  I am using a current Gentoo system, as of February 2012.  The system has been configured as a 'multilib' configuration, with a mixture of 32- and 64-bit.  By default, gcc compiles for 64-bit. ''(verify this)''&lt;br /&gt;
&lt;br /&gt;
Step 1: obtaining the KLH-10 source.  There are two places that you can get the source, but I recommend using the Panda source, which you can download at [http://panda.trailing-edge.com/].  As mentioned in Mr. Viktor's tutorial, if you are using gcc 4.x or later (I am!) you need to apply [http://victor.se/bjorn/its/kn10def-patch.txt this patch].  I needed to apply some additional patches of my own - see later.&lt;br /&gt;
&lt;br /&gt;
Step 2: unpack the source - easy: 'tar -xzf panda-dist.tar.gz'&lt;br /&gt;
&lt;br /&gt;
Step 3: compile the source.  Here's where I got lost.  The instructions (panda-dist/klh10-2.0h/doc/install.txt) tell you to:&lt;br /&gt;
&lt;br /&gt;
# Unpack the main distribution, and the auxiliary distribution (I didn't, as I don't need it yet).&lt;br /&gt;
# Configure for the native platform.  Again, I didn't do anything here.  Perhaps I should have.&lt;br /&gt;
# 'Build a KN10 from sources'.  Here, I was stumped.  Which sources?  Where?  How?&lt;br /&gt;
&lt;br /&gt;
The example shows:&lt;br /&gt;
&lt;br /&gt;
        $ cd &amp;lt;distrib&amp;gt;/bld/&amp;lt;platform&amp;gt;&lt;br /&gt;
        $ make base-kl          ;;; or base-ks or base-ks-its&lt;br /&gt;
&lt;br /&gt;
On my system, '&amp;lt;distrib&amp;gt;' is 'klh10-2.0h' and '&amp;lt;platform&amp;gt;' is 'lnx86' (Linux, x86) - so, I did:&lt;br /&gt;
&lt;br /&gt;
        $ cd klh10-2.0h/bld/lnx86&lt;br /&gt;
&lt;br /&gt;
.. but was dismayed to find a solitary file in this directory:&lt;br /&gt;
&lt;br /&gt;
        -rwxr-xr-x 1 lex root 70 Feb 21  2005 00build&lt;br /&gt;
&lt;br /&gt;
This contains a 'make' command:&lt;br /&gt;
&lt;br /&gt;
        #!/bin/sh&lt;br /&gt;
        make base-kl CONFFLAGS_AUX=-DKLH10_I_CIRC=1 LDFLAGS=-static&lt;br /&gt;
&lt;br /&gt;
Predictably, executing it causes make to output an error, because there is no Makefile.&lt;br /&gt;
&lt;br /&gt;
        make: *** No rule to make target `base-kl'.  Stop.&lt;br /&gt;
&lt;br /&gt;
Eventually, I decided to copy the command from the '00build' file, but source the Makefile.mk in the 'src' directory, two levels up (../../src/).  This gave me this command:&lt;br /&gt;
&lt;br /&gt;
        make -f ../../src/Makefile.mk base-kl CONFFLAGS_AUX=-DKLH10_I_CIRC=1 LDFLAGS=-static&lt;br /&gt;
&lt;br /&gt;
I was happy that at this point, gcc compiled some code before aborting with a syntax error in ../../cenv.h.  This was easily-fixed: edit cenv.h and find line 270.&lt;br /&gt;
&lt;br /&gt;
        #   define _FILE_OFFSET_BITS=64 /* Use 64-bit file ops */&lt;br /&gt;
&lt;br /&gt;
Change that to:&lt;br /&gt;
&lt;br /&gt;
        #   define _FILE_OFFSET_BITS 64 /* Use 64-bit file ops */&lt;br /&gt;
&lt;br /&gt;
I.e. change the '=' to a space.&lt;br /&gt;
&lt;br /&gt;
Repeating the 'make base-kl ...' command should cause compilation to progress a bit further, before it aborts with an undefined reference to 'lites_init'.  That function is in src/dvlites.c, and is an addition that the Panda team added: it sends the processor status over the parallel port, where it is displayed by a custom bit of hardware (a microcontroller, as designed by [http://www.sparetimegizmos.com Spare Time Gizmos].  I have almost all of the parts for this device, but alas!  My computer doesn't have a parallel port, and no serial port either.  I'll have to think of another way to display the CPU status, and I have thought of a few:&lt;br /&gt;
&lt;br /&gt;
# Display the CPU status as a window on the screen.&lt;br /&gt;
# Send it to a file, or a pipe (to be interpreted by another application).&lt;br /&gt;
# Send it over the network, to be displayed by other hardware.&lt;br /&gt;
# Display it on standard PC hardware - e.g. the keyboard LEDs.  Problem: there aren't many LEDs, and XKB might not take too kindly to my app stealing its control.&lt;br /&gt;
&lt;br /&gt;
I've decided on '2' at present, but might do the window thing first, as I am trying to learn to program with SDL.&lt;br /&gt;
&lt;br /&gt;
[[User:Lexthehex|Lexthehex]] 21:29, 25 February 2012 (PST)&lt;/div&gt;</summary>
		<author><name>Lexthehex</name></author>	</entry>

	<entry>
		<id>https://gunkies.org/w/index.php?title=Compiling_KLH10&amp;diff=10736</id>
		<title>Compiling KLH10</title>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=Compiling_KLH10&amp;diff=10736"/>
				<updated>2012-02-26T05:10:29Z</updated>
		
		<summary type="html">&lt;p&gt;Lexthehex: Compiling KLH10 on Gentoo x86_64&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a brief guide to compiling Ken Harrenstein's KLH10 PDP-10 emulator.  It was written on an AMD64 Gentoo machine with 2GB RAM and gcc 4.5.3-r1.  The author currently has a bad cold, so please excuse any mistakes/foolishness caused by dizziness.&lt;br /&gt;
&lt;br /&gt;
Useful links: Viktor Björn's tutorial [http://victor.se/bjorn/its/ 'Some notes on setting up an ITS system']&lt;br /&gt;
&lt;br /&gt;
This tutorial assumes that you are running a Linux system with a modern version of gcc.  Some of these instructions will not apply to your system, or may differ.  I am using a current Gentoo system, as of February 2012.  The system has been configured as a 'multilib' configuration, with a mixture of 32- and 64-bit.  By default, gcc compiles for 64-bit. ''(verify this)''&lt;br /&gt;
&lt;br /&gt;
Step 1: obtaining the KLH-10 source.  There are two places that you can get the source, but I recommend using the Panda source, which you can download at [http://panda.trailing-edge.com/].  As mentioned in Mr. Viktor's tutorial, if you are using gcc 4.x or later (I am!) you need to apply [http://victor.se/bjorn/its/kn10def-patch.txt this patch].  I needed to apply some additional patches of my own - see later.&lt;br /&gt;
&lt;br /&gt;
Step 2: unpack the source - easy: 'tar -xzf panda-dist.tar.gz'&lt;br /&gt;
&lt;br /&gt;
Step 3: compile the source.  Here's where I got lost.  The instructions (panda-dist/klh10-2.0h/doc/install.txt) tell you to:&lt;br /&gt;
&lt;br /&gt;
# Unpack the main distribution, and the auxiliary distribution (I didn't, as I don't need it yet).&lt;br /&gt;
# Configure for the native platform.  Again, I didn't do anything here.  Perhaps I should have.&lt;br /&gt;
# 'Build a KN10 from sources'.  Here, I was stumped.  Which sources?  Where?  How?&lt;br /&gt;
&lt;br /&gt;
The example shows:&lt;br /&gt;
&lt;br /&gt;
        $ cd &amp;lt;distrib&amp;gt;/bld/&amp;lt;platform&amp;gt;&lt;br /&gt;
        $ make base-kl          ;;; or base-ks or base-ks-its&lt;br /&gt;
&lt;br /&gt;
On my system, '&amp;lt;distrib&amp;gt;' is 'klh10-2.0h' and '&amp;lt;platform&amp;gt;' is 'lnx86' (Linux, x86) - so, I did:&lt;br /&gt;
&lt;br /&gt;
        $ cd klh10-2.0h/bld/lnx86&lt;br /&gt;
&lt;br /&gt;
.. but was dismayed to find a solitary file in this directory:&lt;br /&gt;
&lt;br /&gt;
        -rwxr-xr-x 1 lex root 70 Feb 21  2005 00build&lt;br /&gt;
&lt;br /&gt;
This contains a 'make' command:&lt;br /&gt;
&lt;br /&gt;
        #!/bin/sh&lt;br /&gt;
        make base-kl CONFFLAGS_AUX=-DKLH10_I_CIRC=1 LDFLAGS=-static&lt;br /&gt;
&lt;br /&gt;
Predictably, executing it causes make to output an error, because there is no Makefile.&lt;br /&gt;
&lt;br /&gt;
        make: *** No rule to make target `base-kl'.  Stop.&lt;br /&gt;
&lt;br /&gt;
[[User:Lexthehex|Lexthehex]] 21:10, 25 February 2012 (PST)&lt;/div&gt;</summary>
		<author><name>Lexthehex</name></author>	</entry>

	<entry>
		<id>https://gunkies.org/w/index.php?title=Compiling_KLH10&amp;diff=10735</id>
		<title>Compiling KLH10</title>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=Compiling_KLH10&amp;diff=10735"/>
				<updated>2012-02-26T04:58:21Z</updated>
		
		<summary type="html">&lt;p&gt;Lexthehex: Compiling KLH10 on Gentoo x86_64&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a brief guide to compiling Ken Harrenstein's KLH10 PDP-10 emulator.  It was written on an AMD64 Gentoo machine with 2GB RAM and gcc 4.5.3-r1.  The author currently has a bad cold, so please excuse any mistakes/foolishness caused by dizziness.&lt;br /&gt;
&lt;br /&gt;
Useful links: Viktor Björn's tutorial [http://victor.se/bjorn/its/ 'Some notes on setting up an ITS system']&lt;br /&gt;
&lt;br /&gt;
This tutorial assumes that you are running a Linux system with a modern version of gcc.  Some of these instructions will not apply to your system, or may differ.  I am using a current Gentoo system, as of February 2012.  The system has been configured as a 'multilib' configuration, with a mixture of 32- and 64-bit.  By default, gcc compiles for 64-bit. ''(verify this)''&lt;br /&gt;
&lt;br /&gt;
Step 1: obtaining the KLH-10 source.  There are two places that you can get the source, but I recommend using the Panda source, which you can download at [http://panda.trailing-edge.com/].  As mentioned in Mr. Viktor's tutorial, if you are using gcc 4.x or later (I am!) you need to apply [http://victor.se/bjorn/its/kn10def-patch.txt this patch].  I needed to apply some additional patches of my own - see later.&lt;br /&gt;
&lt;br /&gt;
Step 2: unpack the source - easy: 'tar -xzf panda-dist.tar.gz'&lt;br /&gt;
&lt;br /&gt;
Step 3: compile the source.  Here's where I got a headache and started pacing around the kitchen, drinking endless mugs of coffee and staring at the screen, uttering 'How?  Why?  How?  HOW?'&lt;br /&gt;
&lt;br /&gt;
(to be continued)&lt;br /&gt;
&lt;br /&gt;
[[User:Lexthehex|Lexthehex]] 20:58, 25 February 2012 (PST)&lt;/div&gt;</summary>
		<author><name>Lexthehex</name></author>	</entry>

	<entry>
		<id>https://gunkies.org/w/index.php?title=User:Lexthehex&amp;diff=10734</id>
		<title>User:Lexthehex</title>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=User:Lexthehex&amp;diff=10734"/>
				<updated>2012-02-26T04:41:52Z</updated>
		
		<summary type="html">&lt;p&gt;Lexthehex: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi there...&lt;br /&gt;
&lt;br /&gt;
Username: '''Lexthehex'''&lt;br /&gt;
&lt;br /&gt;
Real name: '''Lex'''&lt;br /&gt;
&lt;br /&gt;
Location: '''Devon, United Kingdom'''&lt;br /&gt;
&lt;br /&gt;
Timezone: '''GMT''' (I ignore this horrible thing they call 'British Summer Time')&lt;br /&gt;
&lt;br /&gt;
My untidy, seldom-maintained website is at brooknet.no-ip.com [http://brooknet.no-ip.com].&lt;br /&gt;
&lt;br /&gt;
Interests: Computing (especially ancient computing history), electronics, and I used to be interested in parapsychology, but not so much now.&lt;br /&gt;
I like walking - the further the better, and the more random the route, the better.&lt;br /&gt;
&lt;br /&gt;
My life's ambition is to finish something, and to be able to learn how to concentrate.  I mean, look how many tabs this window has open: 10, with several PDF documents open, a couple of XTerms with GNU Screen running in one of them - and I have no idea how many sessions are in that.&lt;br /&gt;
&lt;br /&gt;
(26-Feb-12): I'm currently writing this page - my first (apart from this one): [[Compiling KLH10]]&lt;/div&gt;</summary>
		<author><name>Lexthehex</name></author>	</entry>

	<entry>
		<id>https://gunkies.org/w/index.php?title=User:Lexthehex&amp;diff=10733</id>
		<title>User:Lexthehex</title>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=User:Lexthehex&amp;diff=10733"/>
				<updated>2012-02-26T04:41:38Z</updated>
		
		<summary type="html">&lt;p&gt;Lexthehex: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi there...&lt;br /&gt;
&lt;br /&gt;
Username: '''Lexthehex'''&lt;br /&gt;
&lt;br /&gt;
Real name: '''Lex'''&lt;br /&gt;
&lt;br /&gt;
Location: '''Devon, United Kingdom'''&lt;br /&gt;
&lt;br /&gt;
Timezone: '''GMT''' (I ignore this horrible thing they call 'British Summer Time')&lt;br /&gt;
&lt;br /&gt;
My untidy, seldom-maintained website is at brooknet.no-ip.com [http://brooknet.no-ip.com].&lt;br /&gt;
&lt;br /&gt;
Interests: Computing (especially ancient computing history), electronics, and I used to be interested in parapsychology, but not so much now.&lt;br /&gt;
I like walking - the further the better, and the more random the route, the better.&lt;br /&gt;
&lt;br /&gt;
My life's ambition is to finish something, and to be able to learn how to concentrate.  I mean, look how many tabs this window has open: 10, with several PDF documents open, a couple of XTerms with GNU Screen running in one of them - and I have no idea how many sessions are in that.&lt;br /&gt;
&lt;br /&gt;
(26-Feb-12): I'm currently writing this page - my first (apart from this one): [[Compiling_KLH10]]&lt;/div&gt;</summary>
		<author><name>Lexthehex</name></author>	</entry>

	<entry>
		<id>https://gunkies.org/w/index.php?title=TCP/IP&amp;diff=10624</id>
		<title>TCP/IP</title>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=TCP/IP&amp;diff=10624"/>
				<updated>2011-08-09T23:06:04Z</updated>
		
		<summary type="html">&lt;p&gt;Lexthehex: /* Grammar fixes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;TCP/IP is the network protocol, along with the routing protocol [[BGP]] that make up the Internet.  Because of the rise in popularity of the Internet, TCP/IP is the most popular networking protocol of all time.  There simply are an amazing amount of OSs and platforms that support TCP/IP.&lt;br /&gt;
&lt;br /&gt;
The most popular implementation of TCP/IP came from the [[4.3 BSD]] release: because of the BSD copyright, people were free to adapt the software to their own needs.&lt;br /&gt;
&lt;br /&gt;
Vint Cerf is largely credited with creating the protocol.&lt;br /&gt;
&lt;br /&gt;
TCP/IP is a family of several protocols.&lt;br /&gt;
&lt;br /&gt;
== Lower OSI protocols ==&lt;br /&gt;
=== ARP ===&lt;br /&gt;
Address resolution protocol.&lt;br /&gt;
=== SLIP ===&lt;br /&gt;
Serial line protocol.  SLIP was a popular way to connect machines with TCP/IP over leased lines and modems (or anything that could talk in a serial manner, like the most popular RS232 ports).  The big drawback to SLIP was that each end had to be pre-configured; this made things like dialup banks exceptionally difficult to maintain, as each user would be assigned a static address - however it did work out fine for 'infrastructure' as they tended not to move.&lt;br /&gt;
&lt;br /&gt;
SLIP has been largely supplanted by the PPP protocol.&lt;br /&gt;
&lt;br /&gt;
=== PPP ===&lt;br /&gt;
Point to point protocol.&lt;br /&gt;
&lt;br /&gt;
PPP supplanted SLIP in two major ways.  The first and most significant change was that PPP can auto-configure nodes, so that clients don't have to know anything about the network they are connecting to.  The PPP server will supply an IP address from a pool - and configure the client's gateway - and will also add DNS information.  PPP also included VJ header compression support, while ignoring the payload did help speed up some things on slow dialup links.&lt;br /&gt;
&lt;br /&gt;
== Higher OSI protocols ==&lt;br /&gt;
=== TCP ===&lt;br /&gt;
Transmission control protocol&lt;br /&gt;
=== UDP ===&lt;br /&gt;
User datagram protocol&lt;br /&gt;
&lt;br /&gt;
== Historical Systems Including TCP/IP ==&lt;br /&gt;
&lt;br /&gt;
This list is far, far from exhaustive, and primarily meant for systems from the 1980s, before TCP/IP became universal on all but embedded systems.&lt;br /&gt;
&lt;br /&gt;
* [[BSD]] Unix from 4.2 onward.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{stub}}&lt;br /&gt;
[[Category:Network Protocols]]&lt;/div&gt;</summary>
		<author><name>Lexthehex</name></author>	</entry>

	<entry>
		<id>https://gunkies.org/w/index.php?title=RA70_disk_drive&amp;diff=10623</id>
		<title>RA70 disk drive</title>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=RA70_disk_drive&amp;diff=10623"/>
				<updated>2011-08-09T22:57:34Z</updated>
		
		<summary type="html">&lt;p&gt;Lexthehex: /* Added a full stop/period (sigh) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:ra70.jpg|thumb|right|200px|RA70]]&lt;br /&gt;
280MB SDI HD with compact 5.25&amp;quot; size, 27 msec access time, 1.4 MB/sec transfer rate.&lt;br /&gt;
&lt;br /&gt;
[[Category:DEC Disk Drives]]&lt;/div&gt;</summary>
		<author><name>Lexthehex</name></author>	</entry>

	<entry>
		<id>https://gunkies.org/w/index.php?title=Talk:RA70_disk_drive&amp;diff=10622</id>
		<title>Talk:RA70 disk drive</title>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=Talk:RA70_disk_drive&amp;diff=10622"/>
				<updated>2011-08-09T22:55:35Z</updated>
		
		<summary type="html">&lt;p&gt;Lexthehex: /* Created the page */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;To Neozeed: please excuse my minor edits: I really should add something to this article, but I don't know anything about this disk. [Lexthehex]&lt;/div&gt;</summary>
		<author><name>Lexthehex</name></author>	</entry>

	<entry>
		<id>https://gunkies.org/w/index.php?title=RA70_disk_drive&amp;diff=10621</id>
		<title>RA70 disk drive</title>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=RA70_disk_drive&amp;diff=10621"/>
				<updated>2011-08-09T22:52:19Z</updated>
		
		<summary type="html">&lt;p&gt;Lexthehex: /* Typo fixes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:ra70.jpg|thumb|right|200px|RA70]]&lt;br /&gt;
280MB SDI HD with compact 5.25&amp;quot; size, 27 msec access time, 1.4 MB/sec transfer rate&lt;br /&gt;
&lt;br /&gt;
[[Category:DEC Disk Drives]]&lt;/div&gt;</summary>
		<author><name>Lexthehex</name></author>	</entry>

	<entry>
		<id>https://gunkies.org/w/index.php?title=Windows_2.0&amp;diff=10620</id>
		<title>Windows 2.0</title>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=Windows_2.0&amp;diff=10620"/>
				<updated>2011-08-09T22:49:36Z</updated>
		
		<summary type="html">&lt;p&gt;Lexthehex: /* Windows/386 (missed something that I should have spotted earlier) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Windows 386 2.11 boot logo.jpg|150px|thumb|right|The Windows/386 splash screen]]&lt;br /&gt;
Windows 2.0 was the second release of the Microsoft Windows environment for [[MS-DOS]].  It was not a commercial success - however, it furthered the development of the kernel so that it could use XMS memory, and it later introduced a 286-specific version that could do some limited multitasking with MS-DOS - and a 386-specific version that could spawn multiple [[VDM]]'s.&lt;br /&gt;
&lt;br /&gt;
An interesting thing about version 2.0 of Microsoft Windows, is the reference to [[Presentation Manager]] and the future of [[OS/2]] in the literature.  Even the appearance of the GUI between OS/2 1.1 &amp;amp; 1.2 and Windows 2.0 is consistent.&lt;br /&gt;
&lt;br /&gt;
Also to appease Compaq, Microsoft actually finished and shipped Windows/386 in September of 1987, with the 'regular' version to follow in November of 1987.&lt;br /&gt;
&lt;br /&gt;
It was superseded by [[Windows 3.0]].&lt;br /&gt;
&lt;br /&gt;
== Versions ==&lt;br /&gt;
Windows 2.0 came in 3 'waves': first the 2.0x wave - in 1987, 2.1 - in 1988 - and finally 2.11, in 1989.&lt;br /&gt;
&lt;br /&gt;
== Windows/286 ==&lt;br /&gt;
[[Image:Windows 286 box front.jpg|150px|A Windows/286 retail box.]]&lt;br /&gt;
[[Image:Windows 286 running.png|200px|thumb|right|Windows 286 running a command window]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This version had some specific code to the 80286 CPU allowing limited MS-DOS multitasking.  However since each instance of MS-DOS consumed the same limited 640kb memory pool, it was largely ineffective.  This version was 286-specific, in that it used the a20 gate to give Windows/286 an extra 64kb of RAM.  Windows/286 was expected to run with MS-DOS 3.3, so the high memory area was not in use, nor was there a himem.sys at the time.  DOS extenders pretty much all did their own thing at this time, and they were mostly incompatible with both Windows/286 &amp;amp; Windows/386.&lt;br /&gt;
&lt;br /&gt;
Windows/286 could run MS-DOS sessions in a window, although memory was so constrained it was mostly useless.  Honestly, I wonder if this was the outgrowth of the &amp;quot;European&amp;quot; MS-DOS 4...&lt;br /&gt;
&lt;br /&gt;
== Windows/386 ==&lt;br /&gt;
[[Image:Windows 386 2.1 front.jpg|150px]]&lt;br /&gt;
[[Image:Windows 386 2.1 back.jpg|150px]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Windows 386 running.jpg|200px|thumb|right|Windows/386 running multiple VDMs]]&lt;br /&gt;
Windows/386 was Microsoft's first product to allow people to directly use the V86 mode of the 80386 CPU.  With enough extended memory you could run several virtual MS-DOS machines.  What was 'cool' is that each VDM was copied from the primary memory map, so that way each VM had the same operating features, and each had the same amount of free memory.  The selling point at the time, was that each VDM could run its own programs in its own memory space.  From the sample picture, a VM is running [[GW-Basic]], another is running [[Zork II]], and another is running chkdsk.  Each one started up with the same amount of free memory.  Windows/386 also facilitated basic clipboard operations between VMs so you could copy data between MS-DOS applications, and of course  Windows applications.&lt;br /&gt;
&lt;br /&gt;
It's worth noting that this version of Windows still ran in the limited space of the MS-DOS 640kb area, but it went to protected mode to run the v86 machines - with expanded memory - while itself was limited to the real memory space.  Needless to say IBM should have taken note, as this quasi-32bit shell suddenly could do something that the 16bit version of OS/2 could never do, and years before the release of OS/2 2.0 - which could run multiple MS-DOS VMs.&lt;br /&gt;
&lt;br /&gt;
Windows/386 shipped with a 'working model' of Excel, that was limited to 16 columns and 64 rows.&lt;br /&gt;
&lt;br /&gt;
Naturally, since [[Compaq]] was the first to release a 386 based computer, they were bundling Windows/386 with it.  There is a press release available here [[Microsoft Windows-386 Being Delivered With Compaq 80386-Based PCs Through Dec. 31, 1987]].  NEC also released a 1987 version of Windows/386 in December: it was tagged as version 2.03.&lt;br /&gt;
&lt;br /&gt;
[[Image:Battletech under Windows 386 2.11.jpg|thumb|right|200px|Battletech CGA under Windows/386 VGA]]&lt;br /&gt;
Windows/386 is interesting in that you can run 'lesser' graphical programs inside of Windows, meaning that a VGA-equipped machine could play CGA games in a window.  OS/2 2.0 could run lesser programs as well in a box, and some of the same level.  Windows/386 could also run itself within itself.  The actual GUI portion was &amp;quot;win86.com&amp;quot;, targeted for the 8086.  If you re-installed Windows/386 into a different directory with a 'lesser' video card you could even run Windows/86 in a window.&lt;br /&gt;
&lt;br /&gt;
Windows/386 is also known for the laughable promotion video:&lt;br /&gt;
[http://www.google.com/url?sa=t&amp;amp;source=web&amp;amp;oi=video_result&amp;amp;ct=res&amp;amp;cd=1&amp;amp;url=http%3A%2F%2Fvideo.google.com%2Fvideoplay%3Fdocid%3D4915875929930836239&amp;amp;ei=9y2rSrOhC8KltgeO5LzzBw&amp;amp;usg=AFQjCNGmuHbjUWEnPWhQx8WBB1naHFRVSA&amp;amp;sig2=3R35B6IlFWfWjAKsARhWvw|Google video of Windows/386].  Jump to the 7 minute mark, and see how long you can stand it!&lt;br /&gt;
&lt;br /&gt;
{{nav Microsoft Windows}}&lt;br /&gt;
[[Category:Operating Environments]]&lt;/div&gt;</summary>
		<author><name>Lexthehex</name></author>	</entry>

	<entry>
		<id>https://gunkies.org/w/index.php?title=Windows_2.0&amp;diff=10619</id>
		<title>Windows 2.0</title>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=Windows_2.0&amp;diff=10619"/>
				<updated>2011-08-09T22:47:38Z</updated>
		
		<summary type="html">&lt;p&gt;Lexthehex: /* Versions - commas */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Windows 386 2.11 boot logo.jpg|150px|thumb|right|The Windows/386 splash screen]]&lt;br /&gt;
Windows 2.0 was the second release of the Microsoft Windows environment for [[MS-DOS]].  It was not a commercial success - however, it furthered the development of the kernel so that it could use XMS memory, and it later introduced a 286-specific version that could do some limited multitasking with MS-DOS - and a 386-specific version that could spawn multiple [[VDM]]'s.&lt;br /&gt;
&lt;br /&gt;
An interesting thing about version 2.0 of Microsoft Windows, is the reference to [[Presentation Manager]] and the future of [[OS/2]] in the literature.  Even the appearance of the GUI between OS/2 1.1 &amp;amp; 1.2 and Windows 2.0 is consistent.&lt;br /&gt;
&lt;br /&gt;
Also to appease Compaq, Microsoft actually finished and shipped Windows/386 in September of 1987, with the 'regular' version to follow in November of 1987.&lt;br /&gt;
&lt;br /&gt;
It was superseded by [[Windows 3.0]].&lt;br /&gt;
&lt;br /&gt;
== Versions ==&lt;br /&gt;
Windows 2.0 came in 3 'waves': first the 2.0x wave - in 1987, 2.1 - in 1988 - and finally 2.11, in 1989.&lt;br /&gt;
&lt;br /&gt;
== Windows/286 ==&lt;br /&gt;
[[Image:Windows 286 box front.jpg|150px|A Windows/286 retail box.]]&lt;br /&gt;
[[Image:Windows 286 running.png|200px|thumb|right|Windows 286 running a command window]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This version had some specific code to the 80286 CPU allowing limited MS-DOS multitasking.  However since each instance of MS-DOS consumed the same limited 640kb memory pool, it was largely ineffective.  This version was 286-specific, in that it used the a20 gate to give Windows/286 an extra 64kb of RAM.  Windows/286 was expected to run with MS-DOS 3.3, so the high memory area was not in use, nor was there a himem.sys at the time.  DOS extenders pretty much all did their own thing at this time, and they were mostly incompatible with both Windows/286 &amp;amp; Windows/386.&lt;br /&gt;
&lt;br /&gt;
Windows/286 could run MS-DOS sessions in a window, although memory was so constrained it was mostly useless.  Honestly, I wonder if this was the outgrowth of the &amp;quot;European&amp;quot; MS-DOS 4...&lt;br /&gt;
&lt;br /&gt;
== Windows/386 ==&lt;br /&gt;
[[Image:Windows 386 2.1 front.jpg|150px]]&lt;br /&gt;
[[Image:Windows 386 2.1 back.jpg|150px]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Windows 386 running.jpg|200px|thumb|right|Windows/386 running multiple VDMs]]&lt;br /&gt;
Windows/386 was Microsoft's first product to allow people to directly use the V86 mode of the 80386 CPU.  With enough extended memory you could run several virtual MS-DOS machines.  What was 'cool' is that each VDM was copied from the primary memory map, so that way each VM had the same operating features, and each had the same amount of free memory.  The selling point at the time, was that each VDM could run its own programs in its own memory space.  From the sample picture, a VM is running [[GW-Basic]], another is running [[Zork II]], and another is running chkdsk.  Each one started up with the same amount of free memory.  Windows/386 also facilitated basic clipboard operations between VMs so you could copy data between MS-DOS applications, and of course  Windows applications.&lt;br /&gt;
&lt;br /&gt;
It's worth noting that this version of Windows still ran in the limited space of the MS-DOS 640kb area, but it went to protected mode to run the v86 machines - with expanded memory - while itself was limited to the real memory space.  Needless to say IBM should have taken note, as this quasi-32bit shell suddenly could do something that the 16bit version of OS/2 could never do - and years before the release of OS/2 2.0, which is run multiple MS-DOS VMs.&lt;br /&gt;
&lt;br /&gt;
Windows/386 shipped with a 'working model' of Excel, that was limited to 16 columns and 64 rows.&lt;br /&gt;
&lt;br /&gt;
Naturally, since [[Compaq]] was the first to release a 386 based computer, they were bundling Windows/386 with it.  There is a press release available here [[Microsoft Windows-386 Being Delivered With Compaq 80386-Based PCs Through Dec. 31, 1987]].  NEC also released a 1987 version of Windows/386 in December: it was tagged as version 2.03.&lt;br /&gt;
&lt;br /&gt;
[[Image:Battletech under Windows 386 2.11.jpg|thumb|right|200px|Battletech CGA under Windows/386 VGA]]&lt;br /&gt;
Windows/386 is interesting in that you can run 'lesser' graphical programs inside of Windows, meaning that a VGA-equipped machine could play CGA games in a window.  OS/2 2.0 could run lesser programs as well in a box, and some of the same level.  Windows/386 could also run itself within itself.  The actual GUI portion was &amp;quot;win86.com&amp;quot;, targeted for the 8086.  If you re-installed Windows/386 into a different directory with a 'lesser' video card you could even run Windows/86 in a window.&lt;br /&gt;
&lt;br /&gt;
Windows/386 is also known for the laughable promotion video:&lt;br /&gt;
[http://www.google.com/url?sa=t&amp;amp;source=web&amp;amp;oi=video_result&amp;amp;ct=res&amp;amp;cd=1&amp;amp;url=http%3A%2F%2Fvideo.google.com%2Fvideoplay%3Fdocid%3D4915875929930836239&amp;amp;ei=9y2rSrOhC8KltgeO5LzzBw&amp;amp;usg=AFQjCNGmuHbjUWEnPWhQx8WBB1naHFRVSA&amp;amp;sig2=3R35B6IlFWfWjAKsARhWvw|Google video of Windows/386].  Jump to the 7 minute mark, and see how long you can stand it!&lt;br /&gt;
&lt;br /&gt;
{{nav Microsoft Windows}}&lt;br /&gt;
[[Category:Operating Environments]]&lt;/div&gt;</summary>
		<author><name>Lexthehex</name></author>	</entry>

	<entry>
		<id>https://gunkies.org/w/index.php?title=Windows_2.0&amp;diff=10618</id>
		<title>Windows 2.0</title>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=Windows_2.0&amp;diff=10618"/>
				<updated>2011-08-09T22:45:07Z</updated>
		
		<summary type="html">&lt;p&gt;Lexthehex: /* Misc. grammar edits */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Windows 386 2.11 boot logo.jpg|150px|thumb|right|The Windows/386 splash screen]]&lt;br /&gt;
Windows 2.0 was the second release of the Microsoft Windows environment for [[MS-DOS]].  It was not a commercial success - however, it furthered the development of the kernel so that it could use XMS memory, and it later introduced a 286-specific version that could do some limited multitasking with MS-DOS - and a 386-specific version that could spawn multiple [[VDM]]'s.&lt;br /&gt;
&lt;br /&gt;
An interesting thing about version 2.0 of Microsoft Windows, is the reference to [[Presentation Manager]] and the future of [[OS/2]] in the literature.  Even the appearance of the GUI between OS/2 1.1 &amp;amp; 1.2 and Windows 2.0 is consistent.&lt;br /&gt;
&lt;br /&gt;
Also to appease Compaq, Microsoft actually finished and shipped Windows/386 in September of 1987, with the 'regular' version to follow in November of 1987.&lt;br /&gt;
&lt;br /&gt;
It was superseded by [[Windows 3.0]].&lt;br /&gt;
&lt;br /&gt;
== Versions ==&lt;br /&gt;
Windows 2.0 came in 3 'waves' first the 2.0x wave in 1987, 2.1 in 1988 and finally 2.11 in 1989.&lt;br /&gt;
&lt;br /&gt;
== Windows/286 ==&lt;br /&gt;
[[Image:Windows 286 box front.jpg|150px|A Windows/286 retail box.]]&lt;br /&gt;
[[Image:Windows 286 running.png|200px|thumb|right|Windows 286 running a command window]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This version had some specific code to the 80286 CPU allowing limited MS-DOS multitasking.  However since each instance of MS-DOS consumed the same limited 640kb memory pool, it was largely ineffective.  This version was 286-specific, in that it used the a20 gate to give Windows/286 an extra 64kb of RAM.  Windows/286 was expected to run with MS-DOS 3.3, so the high memory area was not in use, nor was there a himem.sys at the time.  DOS extenders pretty much all did their own thing at this time, and they were mostly incompatible with both Windows/286 &amp;amp; Windows/386.&lt;br /&gt;
&lt;br /&gt;
Windows/286 could run MS-DOS sessions in a window, although memory was so constrained it was mostly useless.  Honestly, I wonder if this was the outgrowth of the &amp;quot;European&amp;quot; MS-DOS 4...&lt;br /&gt;
&lt;br /&gt;
== Windows/386 ==&lt;br /&gt;
[[Image:Windows 386 2.1 front.jpg|150px]]&lt;br /&gt;
[[Image:Windows 386 2.1 back.jpg|150px]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Windows 386 running.jpg|200px|thumb|right|Windows/386 running multiple VDMs]]&lt;br /&gt;
Windows/386 was Microsoft's first product to allow people to directly use the V86 mode of the 80386 CPU.  With enough extended memory you could run several virtual MS-DOS machines.  What was 'cool' is that each VDM was copied from the primary memory map, so that way each VM had the same operating features, and each had the same amount of free memory.  The selling point at the time, was that each VDM could run its own programs in its own memory space.  From the sample picture, a VM is running [[GW-Basic]], another is running [[Zork II]], and another is running chkdsk.  Each one started up with the same amount of free memory.  Windows/386 also facilitated basic clipboard operations between VMs so you could copy data between MS-DOS applications, and of course  Windows applications.&lt;br /&gt;
&lt;br /&gt;
It's worth noting that this version of Windows still ran in the limited space of the MS-DOS 640kb area, but it went to protected mode to run the v86 machines - with expanded memory - while itself was limited to the real memory space.  Needless to say IBM should have taken note, as this quasi-32bit shell suddenly could do something that the 16bit version of OS/2 could never do - and years before the release of OS/2 2.0, which is run multiple MS-DOS VMs.&lt;br /&gt;
&lt;br /&gt;
Windows/386 shipped with a 'working model' of Excel, that was limited to 16 columns and 64 rows.&lt;br /&gt;
&lt;br /&gt;
Naturally, since [[Compaq]] was the first to release a 386 based computer, they were bundling Windows/386 with it.  There is a press release available here [[Microsoft Windows-386 Being Delivered With Compaq 80386-Based PCs Through Dec. 31, 1987]].  NEC also released a 1987 version of Windows/386 in December: it was tagged as version 2.03.&lt;br /&gt;
&lt;br /&gt;
[[Image:Battletech under Windows 386 2.11.jpg|thumb|right|200px|Battletech CGA under Windows/386 VGA]]&lt;br /&gt;
Windows/386 is interesting in that you can run 'lesser' graphical programs inside of Windows, meaning that a VGA-equipped machine could play CGA games in a window.  OS/2 2.0 could run lesser programs as well in a box, and some of the same level.  Windows/386 could also run itself within itself.  The actual GUI portion was &amp;quot;win86.com&amp;quot;, targeted for the 8086.  If you re-installed Windows/386 into a different directory with a 'lesser' video card you could even run Windows/86 in a window.&lt;br /&gt;
&lt;br /&gt;
Windows/386 is also known for the laughable promotion video:&lt;br /&gt;
[http://www.google.com/url?sa=t&amp;amp;source=web&amp;amp;oi=video_result&amp;amp;ct=res&amp;amp;cd=1&amp;amp;url=http%3A%2F%2Fvideo.google.com%2Fvideoplay%3Fdocid%3D4915875929930836239&amp;amp;ei=9y2rSrOhC8KltgeO5LzzBw&amp;amp;usg=AFQjCNGmuHbjUWEnPWhQx8WBB1naHFRVSA&amp;amp;sig2=3R35B6IlFWfWjAKsARhWvw|Google video of Windows/386].  Jump to the 7 minute mark, and see how long you can stand it!&lt;br /&gt;
&lt;br /&gt;
{{nav Microsoft Windows}}&lt;br /&gt;
[[Category:Operating Environments]]&lt;/div&gt;</summary>
		<author><name>Lexthehex</name></author>	</entry>

	<entry>
		<id>https://gunkies.org/w/index.php?title=User:Lexthehex&amp;diff=10532</id>
		<title>User:Lexthehex</title>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=User:Lexthehex&amp;diff=10532"/>
				<updated>2011-06-13T01:36:54Z</updated>
		
		<summary type="html">&lt;p&gt;Lexthehex: Added a space to the website URL&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi there...&lt;br /&gt;
&lt;br /&gt;
Username: '''Lexthehex'''&lt;br /&gt;
&lt;br /&gt;
Real name: '''Lex'''&lt;br /&gt;
&lt;br /&gt;
Location: '''Devon, United Kingdom'''&lt;br /&gt;
&lt;br /&gt;
Timezone: '''GMT''' (I ignore this horrible thing they call 'British Summer Time')&lt;br /&gt;
&lt;br /&gt;
My untidy, seldom-maintained website is at brooknet.no-ip.com [http://brooknet.no-ip.com].&lt;br /&gt;
&lt;br /&gt;
Interests: Computing (especially ancient computing history), electronics, and I used to be interested in parapsychology, but not so much now.&lt;br /&gt;
I like walking - the further the better, and the more random the route, the better.&lt;br /&gt;
&lt;br /&gt;
My life's ambition is to finish something, and to be able to learn how to concentrate.  I mean, look how many tabs this window has open: 10, with several PDF documents open, a couple of XTerms with GNU Screen running in one of them - and I have no idea how many sessions are in that.&lt;/div&gt;</summary>
		<author><name>Lexthehex</name></author>	</entry>

	<entry>
		<id>https://gunkies.org/w/index.php?title=User:Lexthehex&amp;diff=10531</id>
		<title>User:Lexthehex</title>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=User:Lexthehex&amp;diff=10531"/>
				<updated>2011-06-13T01:36:33Z</updated>
		
		<summary type="html">&lt;p&gt;Lexthehex: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi there...&lt;br /&gt;
&lt;br /&gt;
Username: '''Lexthehex'''&lt;br /&gt;
&lt;br /&gt;
Real name: '''Lex'''&lt;br /&gt;
&lt;br /&gt;
Location: '''Devon, United Kingdom'''&lt;br /&gt;
&lt;br /&gt;
Timezone: '''GMT''' (I ignore this horrible thing they call 'British Summer Time')&lt;br /&gt;
&lt;br /&gt;
My untidy, seldom-maintained website is at brooknet.no-ip.com[http://brooknet.no-ip.com].&lt;br /&gt;
&lt;br /&gt;
Interests: Computing (especially ancient computing history), electronics, and I used to be interested in parapsychology, but not so much now.&lt;br /&gt;
I like walking - the further the better, and the more random the route, the better.&lt;br /&gt;
&lt;br /&gt;
My life's ambition is to finish something, and to be able to learn how to concentrate.  I mean, look how many tabs this window has open: 10, with several PDF documents open, a couple of XTerms with GNU Screen running in one of them - and I have no idea how many sessions are in that.&lt;/div&gt;</summary>
		<author><name>Lexthehex</name></author>	</entry>

	<entry>
		<id>https://gunkies.org/w/index.php?title=User:Lexthehex&amp;diff=10530</id>
		<title>User:Lexthehex</title>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=User:Lexthehex&amp;diff=10530"/>
				<updated>2011-06-13T01:34:59Z</updated>
		
		<summary type="html">&lt;p&gt;Lexthehex: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi there...&lt;br /&gt;
&lt;br /&gt;
Username: '''Lexthehex'''&lt;br /&gt;
&lt;br /&gt;
Real name: '''Lex'''&lt;br /&gt;
&lt;br /&gt;
Location: '''Devon, United Kingdom'''&lt;br /&gt;
&lt;br /&gt;
Timezone: '''GMT''' (I ignore this horrible thing they call 'British Summer Time')&lt;br /&gt;
&lt;br /&gt;
My untidy, seldom-maintained website is at [http://brooknet.no-ip.com].&lt;br /&gt;
&lt;br /&gt;
Interests: Computing (especially ancient computing history), electronics, and I used to be interested in parapsychology, but not so much now.&lt;br /&gt;
I like walking - the further the better, and the more random the route, the better.&lt;br /&gt;
&lt;br /&gt;
My life's ambition is to finish something, and to be able to learn how to concentrate.  I mean, look how many tabs this window has open: 10, with several PDF documents open, a couple of XTerms with GNU Screen running in one of them - and I have no idea how many sessions are in that.&lt;/div&gt;</summary>
		<author><name>Lexthehex</name></author>	</entry>

	<entry>
		<id>https://gunkies.org/w/index.php?title=User:Lexthehex&amp;diff=10529</id>
		<title>User:Lexthehex</title>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=User:Lexthehex&amp;diff=10529"/>
				<updated>2011-06-13T01:34:37Z</updated>
		
		<summary type="html">&lt;p&gt;Lexthehex: /* Created the page */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi there...&lt;br /&gt;
&lt;br /&gt;
Username: '''Lexthehex'''&lt;br /&gt;
Real name: '''Lex'''&lt;br /&gt;
Location: '''Devon, United Kingdom'''&lt;br /&gt;
Timezone: '''GMT''' (I ignore this horrible thing they call 'British Summer Time')&lt;br /&gt;
&lt;br /&gt;
My untidy, seldom-maintained website is at [http://brooknet.no-ip.com].&lt;br /&gt;
&lt;br /&gt;
Interests: Computing (especially ancient computing history), electronics, and I used to be interested in parapsychology, but not so much now.&lt;br /&gt;
I like walking - the further the better, and the more random the route, the better.&lt;br /&gt;
&lt;br /&gt;
My life's ambition is to finish something, and to be able to learn how to concentrate.  I mean, look how many tabs this window has open: 10, with several PDF documents open, a couple of XTerms with GNU Screen running in one of them - and I have no idea how many sessions are in that.&lt;/div&gt;</summary>
		<author><name>Lexthehex</name></author>	</entry>

	<entry>
		<id>https://gunkies.org/w/index.php?title=Talk:VAX-11/780&amp;diff=10528</id>
		<title>Talk:VAX-11/780</title>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=Talk:VAX-11/780&amp;diff=10528"/>
				<updated>2011-06-13T01:27:12Z</updated>
		
		<summary type="html">&lt;p&gt;Lexthehex: (reply to Neozeed)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I split up the 11/780 &amp;amp; the 11/785 because the formatting was all broken with the two info boxes on the same page...&lt;br /&gt;
&lt;br /&gt;
== Booting VAX-11/780 ==&lt;br /&gt;
&lt;br /&gt;
I'm currently trying to boot DEC Ultrix 1.1 on SIMH, using the vax780 (11/780) emulator - however, I am used to the 'vax' (MicroVAX 3900) emulator, which has its console environment in ROM (possibly EEROM).  The VMS - before it was 'OpenVMS'! - documentation for the 11/780 mentions a console floppy and SIMH's vax780 source dir has a file named 'vmb.exe'; I think that this might be the minimal console environment that I need to carry out disk maintenance tasks to get Ultrix running, but I am unable to load it ('Invalid argument').  I have tried the 'fload' command and 'load -o vmb.exe 0' and 'run 2' - but the simulator just hangs.&lt;br /&gt;
&lt;br /&gt;
Can anyone explain how the VAX-11/780 boots?  Any hints would be appreciated!&lt;br /&gt;
----&lt;br /&gt;
It's... complicated.&lt;br /&gt;
&lt;br /&gt;
and not 100% by any stretch, look at 4.2 BSD, and 32v for some hints... Odds are Ultrix being a 4.2BSD derived OS, it'll work better with forced bootblock injection... I bet you can even use BSD 4.2's bootblocks.  I'm assuming you can extract the miniroot from the tape?  I don't have access to Ultrix 1.1 so I can't spell it out.....&lt;br /&gt;
[[User:Neozeed|neozeed]] 12:50, 12 June 2011 (PDT)&lt;br /&gt;
&lt;br /&gt;
Thanks Neozeed, and yes, I may be able to get the miniroot off the tape image as I have had some success in just poking around the Ultrix dist and separating various sections.  Part of this is me learning how to use such an old OS, and also working out what translations need to be done to get SIMH to work with these files.  I have 4.2 BSD working, and 4.3 BSD too, thanks to the tutorials gunkies.org.  The bootblock injection stuff is a little (well, a lot) beyond me at this point.&lt;br /&gt;
[[User:Lexthehex|lexthehex]] 01:25, 13 June 2011 (GMT)&lt;/div&gt;</summary>
		<author><name>Lexthehex</name></author>	</entry>

	<entry>
		<id>https://gunkies.org/w/index.php?title=Talk:Installing_Ultrix_4.0_on_SIMH&amp;diff=10523</id>
		<title>Talk:Installing Ultrix 4.0 on SIMH</title>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=Talk:Installing_Ultrix_4.0_on_SIMH&amp;diff=10523"/>
				<updated>2011-06-09T23:35:51Z</updated>
		
		<summary type="html">&lt;p&gt;Lexthehex: Ultrix 4.0 Y2K&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Thank you for this useful tutorial.  Ultrix 4.0 does not appear to be Y2K-compliant, and it reset the system year to 1970 when I entered '11' (intending this to be '2011').  This caused a filesystem fix and reboot on the first boot from the disk, at which point I set the year to 1994, whose days are the same as in 2011.&lt;/div&gt;</summary>
		<author><name>Lexthehex</name></author>	</entry>

	<entry>
		<id>https://gunkies.org/w/index.php?title=Talk:VAX-11/780&amp;diff=10522</id>
		<title>Talk:VAX-11/780</title>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=Talk:VAX-11/780&amp;diff=10522"/>
				<updated>2011-06-09T01:17:51Z</updated>
		
		<summary type="html">&lt;p&gt;Lexthehex: /* Booting VAX-11/780 */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I split up the 11/780 &amp;amp; the 11/785 because the formatting was all broken with the two info boxes on the same page...&lt;br /&gt;
&lt;br /&gt;
== Booting VAX-11/780 ==&lt;br /&gt;
&lt;br /&gt;
I'm currently trying to boot DEC Ultrix 1.1 on SIMH, using the vax780 (11/780) emulator - however, I am used to the 'vax' (MicroVAX 3900) emulator, which has its console environment in ROM (possibly EEROM).  The VMS - before it was 'OpenVMS'! - documentation for the 11/780 mentions a console floppy and SIMH's vax780 source dir has a file named 'vmb.exe'; I think that this might be the minimal console environment that I need to carry out disk maintenance tasks to get Ultrix running, but I am unable to load it ('Invalid argument').  I have tried the 'fload' command and 'load -o vmb.exe 0' and 'run 2' - but the simulator just hangs.&lt;br /&gt;
&lt;br /&gt;
Can anyone explain how the VAX-11/780 boots?  Any hints would be appreciated!&lt;/div&gt;</summary>
		<author><name>Lexthehex</name></author>	</entry>

	</feed>