The Futhark | Character coding | Execution | Example | Program listing | References
The Futhark (Runic alphabet) on a HP-42S calculator
The FUTH program is written for the HP-42s calculator [1] and displays strings of characters from the futhark [2] (also denoted Runic alphabet) as supplied by the user via a two-level menu system. The input characters are in the user interface of the program listed as we would read and pronounce them today.
The program can be seen as an example of addressing of individual pixels of the display of the HP-42s, enabling creation of arbitrary characters displayed as graphical elements. The program makes an extensive use of the built-in menu functionality of the HP-42s, in order to simplify for the everyday user of this eminent program.
N.B. This is a strong candidate for being the silliest-ever program written for a pocket calculator. It does not contain one single arithmetic operation and at the time when I wrote it (summer 1990) I did it merely for the sake of proving that it actually was possible to generate custom-made character maps for the HP-42s (in this case the futhark once used in historic Scandinavia). Nevertheless, I today find this piece of code quite funny.
The futhark
Figure 1. The Elder Futhark, used for writing
proto-Norse
(Swedish: »urnordisk», »urnordiska»), consist of
twenty-four runes, often arranged in three rows of eight.
The earliest known sequential listing of the full set of 24 runes dates to
ca. 400 AD and is found on the
Kylver Stone
in Gotland, Sweden.
Figure 2. In the 7th century appeared an intermediary form of runes
between the Elder Futhark and the Younger Futhark, but there are very few
inscriptions. Two of them are the
Stentoften
Runestone and the
Björketorp Runestone.
This is the form of the futhark as used in the FUTH program.
Coding of the characters
Each character in the futhark is in the FUTH program contructed from a binary representation of its graphical appearance, in a column-wise build-up where each row of the respective columns is coded as '1' or '0' for white (blank) or black pixels, respectively. The binary column-wise representation is then converted into decimal numbers, as used by the built-in AGRAPH function of the HP-42s. The following example illustrates the construction of the first character »F» of the futhark:
Hence the »F» of the futhark can be encoded in a 6×8-pixel representation as {255,20,19,8,7,0}, where each column code is set by the XTOA command of the HP-42s.1 2 3 4 5 6 [col] 1 X X X 2 X X X 3 X X X 4 X X 5 X X X 6 X 7 X 8 X [row] | | | | | |__ 00000000 [bin] = 0 [dec] | | | | |____ 00000111 [bin] = 7 [dec] | | | |______ 00001000 [bin] = 8 [dec] | | |________ 00010011 [bin] = 19 [dec] | |__________ 00010100 [bin] = 20 [dec] |____________ 11111111 [bin] = 255 [dec]
Execution of the program
Start the program by XEQ followed by the menu choice "FUTH". This leaves you with the screen as shown in Fig. 3. (As it looks on my own, quite battered 1988 vintage HP-42s.) Suppose you now wish to enter the »n» rune; in this case proceed with selecting the NIÅST menu block, followed by selecting the N submenu item (Fig. 4). That's it! Repeat for the rest of the characters in the string and press TRAN when finished, leaving you with the displayed corresponding string of rune characters. Additional spaces can be entered using the SPACE menu item. The entire set of characters in the futhark, as implemented in the FUTH program, is displayed in Fig. 5.
Figure 3. Startup display of the FUTH program.
Figure 4. The »NIÅST» sub-menu block of the FUTH
program.
Figure 5. The entire futhark as displayed by the HP-42s!
Example
The Gripsholm Runestone, in 1827 found as one of the thresholds of Gripsholm castle by the runologist Johan G. Liljegren, is one of the most famous runestones commemorating the death of Swedish Vikings who died in the Caliphate, and it is considered to be the most prominent stone raised in commemoration of the ill-fated expedition of Ingvar the Far-Travelled. In Latin letters, the inscription of the stone yields:
Tola let ræisa stæin þennsa
at sun sinn Harald, broður Ingvars.
ÞæiR foru drængila
fiarri at gulli
ok austarla
ærni gafu,
dou sunnarla
a Særklandi.
Translated into English this yields:
Tola had this stone raised
after her son Harald, Ingvar's brother.
They travelled valiantly
far for gold,
and in the east
gave (food) to the eagle.
(They) died in the south
in Serkland.
Typed into the FUTH program of the HP-42s, the first line displays as:
Interpretation of the text: The text informs us that they died during a Viking expedition in the East, that is to say across Russia. The expression »fed the eagle» is a kenning for waging war and killing enemies who were left as food for the eagles. The large expedition continued across the Caucasus and into the Caliphate. According to Yngvars saga víðförla, only one ship returned to Sweden in 1042.
The information that Harald's mother Tola raised the stone is interpreted as telling that Tola was a concubine of Ingvar's father, so Ingvar and Harald were half-brothers. According to a different interpretation, Harald and Ingvar were only brothers-in-arms.
Program listing
000 { 910-BYTE PRGM }
001 LBL "FUTH"
002 CF 01
003 CF 02
004 0
005 STO "N"
006 4
007 STO "X"
008 LBL A
009 1
010 STO+ "N"
011 CLX
012 CLMENU
013 "TRAN" [Key for translating into rune characters]
014 KEY 1 GTO B
015 "SPACE" [Key for inserting blank space]
016 KEY 2 GTO 49
017 "FUTH" [Key for first menu block of rune characters]
018 KEY 3 GTO 20
019 "ARKH" [Key for second menu block of rune characters]
020 KEY 4 GTO 21
021 "NIÅST" [Key for third menu block of rune characters]
022 KEY 5 GTO 22
023 "BMLR" [Key for fourth menu block of rune characters]
024 KEY 6 GTO 23
025 MENU
026 STOP
027 GTO "FUTH"
028 LBL 20
029 CLMENU
030 "F" [Key for the "F" rune of the first block]
031 KEY 2 GTO 30
032 "U" [Key for the "U" rune of the first block]
033 KEY 3 GTO 31
034 "TH" [Key for the "TH" rune of the first block]
035 KEY 4 GTO 32
036 MENU
037 STOP
038 LBL 21
039 CLMENU
040 "A" [Key for the "A" rune of the second block]
041 KEY 2 GTO 33
042 "R" [Key for the "R" rune of the second block]
043 KEY 3 GTO 34
044 "K" [Key for the "K" rune of the second block]
045 KEY 4 GTO 35
046 "H" [Key for the "H" rune of the second block]
047 KEY 5 GTO 36
048 MENU
049 STOP
050 LBL 22
051 CLMENU
052 "N" [Key for the "N" rune of the third block]
053 KEY 2 GTO 37
054 "I" [Key for the "I" rune of the third block]
055 KEY 3 GTO 38
056 "Å" [Key for the "Å" rune of the third block]
057 KEY 4 GTO 39
058 "S" [Key for the "S" rune of the third block]
059 KEY 5 GTO 40
060 "T" [Key for the "T" rune of the third block]
061 KEY 6 GTO 41
062 MENU
063 STOP
064 LBL 23
065 CLMENU
066 "B" [Key for the "B" rune of the fourth block]
067 KEY 2 GTO 42
068 "M" [Key for the "M" rune of the fourth block]
069 KEY 3 GTO 43
070 "L" [Key for the "L" rune of the fourth block]
071 KEY 4 GTO 44
072 "R" [Key for the "R" rune of the fourth block]
073 KEY 5 GTO 45
074 MENU
075 STOP
076 LBL 30
077 1
078 STO IND "N"
079 GTO A
080 LBL 31
081 2
082 STO IND "N"
083 GTO A
084 LBL 32
085 3
086 STO IND "N"
087 GTO A
088 LBL 33
089 4
090 STO IND "N"
091 GTO A
092 LBL 34
093 5
094 STO IND "N"
095 GTO A
096 LBL 35
097 6
098 STO IND "N"
099 GTO A
100 LBL 36
101 7
102 STO IND "N"
103 GTO A
104 LBL 37
105 8
106 STO IND "N"
107 GTO A
108 LBL 38
109 9
110 STO IND "N"
111 GTO A
112 LBL 39
113 10
114 STO IND "N"
115 GTO A
116 LBL 40
117 11
118 STO IND "N"
119 GTO A
120 LBL 41
121 12
122 STO IND "N"
123 GTO A
124 LBL 42
125 13
126 STO IND "N"
127 GTO A
128 LBL 43
129 14
130 STO IND "N"
131 GTO A
132 LBL 44
133 15
134 STO IND "N"
135 GTO A
136 LBL 45
137 16
138 STO IND "N"
139 GTO A
140 LBL B
141 0
142 STO "Y"
143 CLLCD
144 LBL C
145 6
146 STO+ "X"
147 1
148 STO+ "Y"
149 RCL "Y"
150 RCL "N"
151 X=Y?
152 GTO 50
153 CLA
154 RCL IND "Y"
155 GTO IND ST X
156 LBL D
157 0
158 XTOA
159 5
160 RCL "X"
161 AGRAPH
162 GTO C
163 LBL 01 [Enter codes for drawing the "F" rune]
164 255 [bin: 11111111]
165 XTOA
166 20 [bin: 00010100]
167 XTOA
168 19 [bin: 00010011]
169 XTOA
170 8 [bin: 00001000]
171 XTOA
172 7 [bin: 00000111]
173 XTOA
174 GTO D
175 LBL 02 [Enter codes for drawing the "U" rune]
176 255 [bin: 11111111]
177 XTOA
178 1 [bin: 00000001]
179 XTOA
180 2 [bin: 00000010]
181 XTOA
182 12 [bin: 00001100]
183 XTOA
184 240 [bin: 11110000]
185 XTOA
186 GTO D
187 LBL 03 [Enter codes for drawing the "TH" rune]
188 255 [bin: 11111111]
189 XTOA
190 36 [bin: 00100100]
191 XTOA
192 24 [bin: 00011000]
193 XTOA
194 GTO D
195 LBL 04 [Enter codes for drawing the "A" rune]
196 20 [bin: 00010100]
197 XTOA
198 20 [bin: 00010100]
199 XTOA
200 255 [bin: 11111111]
201 XTOA
202 40 [bin: 00101000]
203 XTOA
204 40 [bin: 00101000]
205 XTOA
206 GTO D
207 LBL 05 [Enter codes for drawing the "R" rune]
208 255 [bin: 11111111]
209 XTOA
210 17 [bin: 00010001]
211 XTOA
212 42 [bin: 00101010]
213 XTOA
214 74 [bin: 01001010]
215 XTOA
216 132 [bin: 10000100]
217 XTOA
218 GTO D
219 LBL 06 [Enter codes for drawing the "K" rune]
220 255 [bin: 11111111]
221 XTOA
222 8 [bin: 00001000]
223 XTOA
224 4 [bin: 00000100]
225 XTOA
226 2 [bin: 00000010]
227 XTOA
228 1 [bin: 00000001]
229 XTOA
230 GTO D
231 LBL 07 [Enter codes for drawing the "H" rune]
232 34 [bin: 00100010]
233 XTOA
234 20 [bin: 00010100]
235 XTOA
236 255 [bin: 11111111]
237 XTOA
238 20 [bin: 00010100]
239 XTOA
240 34 [bin: 00100010]
241 XTOA
242 GTO D
243 LBL 08 [Enter codes for drawing the "N" rune]
244 4 [bin: 00000100]
245 XTOA
246 8 [bin: 00001000]
247 XTOA
248 255 [bin: 11111111]
249 XTOA
250 16 [bin: 00010000]
251 XTOA
252 32 [bin: 00100000]
253 XTOA
254 GTO D
255 LBL 09 [Enter codes for drawing the "I" rune]
256 255 [bin: 11111111]
257 XTOA
258 GTO D
259 LBL 10 [Enter codes for drawing the "Å" rune]
260 32 [bin: 00100000]
261 XTOA
262 16 [bin: 00010000]
263 XTOA
264 255 [bin: 11111111]
265 XTOA
266 8 [bin: 00000100]
267 XTOA
268 4 [bin: 00000010]
269 XTOA
270 GTO D
271 LBL 11 [Enter codes for drawing the "S" rune]
272 63 [bin: 00111111]
273 XTOA
274 16 [bin: 00010000]
275 XTOA
276 8 [bin: 00001000]
277 XTOA
278 4 [bin: 00000100]
279 XTOA
280 254 [bin: 11111110]
281 XTOA
282 GTO D
283 LBL 12 [Enter codes for drawing the "T" rune]
284 4 [bin: 00000100]
285 XTOA
286 2 [bin: 00000010]
287 XTOA
288 255 [bin: 11111111]
289 XTOA
290 2 [bin: 00000010]
291 XTOA
292 4 [bin: 00000100]
293 XTOA
294 GTO D
295 LBL 13 [Enter codes for drawing the "B" rune]
296 255 [bin: 11111111]
297 XTOA
298 145 [bin: 10010001]
299 XTOA
300 153 [bin: 10011001]
301 XTOA
302 170 [bin: 10101010]
303 XTOA
304 68 [bin: 01000100]
305 XTOA
306 GTO D
307 LBL 14 [Enter codes for drawing the "M" rune]
308 7 [bin: 00000111]
309 XTOA
310 8 [bin: 00001000]
311 XTOA
312 255 [bin: 11111111]
313 XTOA
314 8 [bin: 00001000]
315 XTOA
316 7 [bin: 00000111]
317 XTOA
318 GTO D
319 LBL 15 [Enter codes for drawing the "L" rune]
320 255 [bin: 11111111]
321 XTOA
322 1 [bin: 00000001]
323 XTOA
324 2 [bin: 00000010]
325 XTOA
326 4 [bin: 00000100]
327 XTOA
328 8 [bin: 00001000]
329 XTOA
330 GTO D
331 LBL 16 [Enter codes for drawing the "R" rune]
332 224 [bin: 11100000]
333 XTOA
334 16 [bin: 00010000]
335 XTOA
336 255 [bin: 11111111]
337 XTOA
338 16 [bin: 00010000]
339 XTOA
340 224 [bin: 11100000]
341 XTOA
342 GTO D
343 LBL 18 [Enter codes for drawing blank space]
344 0 [bin: 00000000]
345 XTOA
346 0 [bin: 00000000]
347 XTOA
348 0 [bin: 00000000]
349 XTOA
350 0 [bin: 00000000]
351 XTOA
352 GTO D
353 LBL 49
354 18
355 STO IND "N"
356 GTO A
357 LBL 50
358 CLST
359 END
References
[1] The HP-42s calculator was manufactured by Hewlett-Packard Inc. between 1988 and 1995, and it had 7.2 kB of user memory. The full specification for this model can be found at the web site of The Museum of HP Calculators, http://www.hpmuseum.org/, section on the HP-42s.
[2] The origin of the futhark can be summarized by the following excerpts from http://www.futhark.com/: "The first step in understanding rune lore is the understanding of the concept rune. Runes were in use by the Nordic and Germanic tribes of Northern Europe. A rune is not merely a letter in an old Germanic alphabet, but it bears the primary definition of "secret" or "mysteries." There were many different runic alphabets in use throughout Northern Europe over the centuries. The most common is the Germanic or Elder Futhark. This system may have begun as early as 200 B.C.E. The Elder Futhark contains 24 letters divided into three groups of eight, called Ætt (aettir, plural). The first eight is called Freyja's Ætt, the second Heimdall's Ætt and the third Tyr's Ætt."