Here's a small tip to get UTF-8 to work properly in irssi running within GNU screen:
Add the following to ~/.screenrc
Then start screen with the -U parameter, and start irssi.
/set term_charset utf-8 /set recode_autodetect_utf8 ON /save
Also add the following to your ~/.bashrc, but it may not be required:
export LANG=en_US.UTF-8 export LC_CTYPE=en_US.UTF-8
UTF-8 encoding now works, it's as simple as that. (Note for reference, I've only tested this within Terminal.app on OS X). Next time you re-attach to this screen, remember to do so with the -UrD parameter.
TedSki on #motorcycles (EFNet IRC) came up with this solution and told me about it. Here's after the first test:
[20:37] < sgtzx> let's give it another shot [20:37] < TedSki> sgtzx: 華語 [20:37] < sgtzx> yes, works! [20:37] < TedSki> there ya go
I decided to check out the Scala programming language and seeing that my favorite IDE is NetBeans, I wanted to keep using it for Scala development.
The steps required to do this are the following:
- Download Scala from www.scala-lang.org/downloads, uncompress in say ~/scala-2.8.1.final. I like to make a symlink from ~/scala-2.8.1.final to ~/scala
- Edit your ~/.profile and set the environment variable SCALA_HOME to be $HOME/scala. Also add $SCALA_HOME/bin to your PATH variable.
- Now, go to http://sourceforge.net/projects/erlybird/files/ and get your Scala plugin. Uncompress and you will find lots of NBM files.
- Start NetBeans, go to Tools/Plugins/Downloaded. Click "Add plugins" and select the NBM files from step 3. Now you have the plugin installed.
- Finally, create a folder ~/.MacOSX (unless it already exists) and within it, create a file called environment.plist. The contents of this file follows:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>SCALA_HOME</key> <string>/Users/tk/scala</string> <key>PATH</key> <string>/Users/tk/scala/bin:/whatever/other/paths/you/may/have:/usr/local/bin</string> </dict> </plist>
The IBM XT 8088 comes with something called "ROM BASIC", however I couldn't seem to access it via MS-DOS. [Note: Source code now available, see comment below]
Initially, it seemed to be inaccessible unless you are willing to remove the harddrive and reboot. So I set out on a mission; I wanted to access it from within MS-DOS! The value of all this? Weeeell... Hey, it's a challenge.
I read up on the specific interrupt you need to trigger ROM BASIC, and it is INT 18h.
However, it's not as easy as that. I started up DEBUG, punched a few assembly instructions so I could trigger INT 18h. It responded, and sure enough I got ROM BASIC. Unfortunately, the keyboard input was not working at all!
I consulted some friendly peeps at comp.lang.asm.x86 and they told me the whole IVT (interrupt vector table) had to be replaced with the one present before MS-DOS replaces it with its own IVT. In other words, I needed the default BIOS IVT table, otherwise I would be calling the DOS keyboard interrupt routines instead of the BIOS keyboard routines.
I temporarily removed the harddrive, and started the computer so that ROM BASIC came up. I then wrote a little BASIC program to dump the entire IVT contents as hexadecimal codes to screen. 100 at a time. Just enough so that I could take a photograph of each screen. (I don't have any means of connecting the XT to one of my other modern machines!).
Typing it all in on my Mac later, I started to make sense of it, and finally printed it all out, including my prototype 8088 program (yes, on old fashioned paper. And yes, this took way too long and my fingers hurt afterwards). Tricky stuff. I got some friendly advice from the guys in comp.lang.asm.x86 to keep me going further after nearly giving up (Thanks Bob, Rod, Frank!). My knowledge of assembly isn't the greatest so this endeavour forced me to learn a whole LOT.
Some glimpses of my assembly code.
Then, I finally got it to work, with keyboard working - as you can see below!
Ok, hmm, I spent way too much time on this! However, I'm glad it's over and done with now. I think it's cool that there is so much direct access to the hardware and to the memory with these old machines. Perhaps it's time to revive my Amiga now. [PS: Full code will be posted shortly, just need to type it all in]
My dad bought an IBM XT 8088 a long time ago, in the 80s sometime. This was my first introduction to computing so I have fond memories of this machine. It clocks in at 4.77Mhz on its Intel 8088 CPU. A mind-boggling 640kB memory keeps you satisfied for a lifetime.
Being home this Christmas vacation (December 2010) I figured it's time to take it down from the attic and see if it boots up! I first vacuumed it and cleaned all the circuit boards with a brush, so there wouldn't be a hint of dust anywhere.
I cranked the ol' beast up it and it said BAM. Followed by a bit of white smoke. I still don't know what happened, but after the 2nd boot, it booted straight up and started MS-DOS. However, unfortunately only 192kB of the original 640kB was recognized, so some of the memory chips were clearly faulty. As for the BAM! sound, it must have come from somewhere else. To my knowledge, RAM chips don't fail with a loud noise and burned scent!
I thus started hunting the faulty chips, and finally found the two sinners. Two nasty 4164 chips (contains 65536 bits each). However, this meant that all the other chips on the same bank would have to be taken out as well. So I ended up with an acceptable 576kB of working memory.
Stay tuned for more exciting vintage computing stories!