Name Date Size #Lines LOC

..25-Jul-2025-

README.txtH A D25-Jul-20251.5 KiB4836

README.txt.infoH A D25-Jul-2025734

examplesH A D25-Jul-20251.1 KiB1713

urmH A D25-Jul-2025630 3633

urm.vimH A D25-Jul-202596

README.txt

1This is another proof that Vim is perfectly compatible with Vi.
2The URM macro package was written by Rudolf Koenig ("Rudi")
3([email protected]) for hpux-vi in August 1991.
4
5Getting started:
6
7type
8in your shell:	 vim urm<RETURN>
9in vim:		 :so urm.vim<RETURN>
10in vim:		 *	(to load the registers and boot the URM-machine :-)
11in vim:		 g	(for 'go') and watch the fun. Per default, 3 and 4
12			are multiplied. Watch the Program counter, it is
13			visible as a komma moving around.
14
15This is a "standard URM" (Universal register machine)  interpreter. The URM
16concept is used in theoretical computer science to aid in theorem proving.
17Here it proves that vim is a general problem solver (if you bring enough
18patience).
19
20The interpreter begins with register 1 (not 0), without macros and more-lines
21capability.  A dot marks the end of a program. (Bug: there must be a space
22after the dot.)
23
24The registers are the first few lines, beginning with a '>' .
25The program is the first line after the registers.
26You should always initialize the registers required by the program.
27
28Output register:	line 2
29Input registers:	line 2 to ...
30
31Commands:
32a<n>		increment register <n>
33s<n>		decrement register <n>
34<x>;<y>		execute command <x> and then <y>
35(<x>)<n>	execute command <x> while register <n> is nonzero
36. 		("dot blank")  halt the machine.
37
38Examples:
39
40Add register 2 to register 3:
41	(a2;s3)3.
42Multiply register 2 with register 3:
43	(a4;a5;s2)2; ((a2;s4)4; s3; (a1;a4;s5)5; (a5;s1)1)3.
44
45There are more (complicated) examples in the file examples.
46Note, undo may take a while after a division.
47
48