uunalf was *not* written in C. no C compiler for the 6502 emits such tight code, especially not the ones that were available in 1988. This explains why it outperforms arc (which actually was in C) while having a smaller executable size. unalf14.com is a standard Atari segmented executable. For disassembly purposes, I converted it to a single chunk of raw object code: ataricom -n -m 1-2 unalf14.com unalf14.raw IOCB usage: #0 is E: as usual. #1 is the input file(s). #2 is K: (not sure if it's actually used). #3 is the output file. When the program exits (print_msg_complete), it checks the byte at $0700 (BOOTRG). If it's equal to $53 (ASCII S, for SpartaDOS), it exits via an RTS. Otherwise it exits via JMP (DOSVEC), which reloads the DOS menu on DOS 2 and compatibles. Bugs: ALF14.COM won't actually compress any files at all, when run from the DOS on the disk image I keep finding in archives. The DOS is "XDOS". Whatever I try to compress, I always end up with a 0-byte output file. It works better in DOS 2.0S, but "*.TXT" doesn't catch all the files it should, either. Trying to compress a file with the one-letter name D causes a an error and the program exits. D:D works OK. Compressed files: ----------------------------------------------------------------------- original data: ff ff ff ff 00 ff ff ff ff 01 ff ff ff ff 02 in binary: 00000000: 11111111 11111111 11111111 11111111 00000000 11111111 ...... 00000006: 11111111 11111111 11111111 00000001 11111111 11111111 ...... 0000000c: 11111111 11111111 00000010 compressed form: 10000000 00111111 11100000 01001111 11110000 00000100 00001101 11111110 00000001 10000011 00000000 10100000 00100000 ----------------------------------------------------------------------- orig in hex: aa aa aa aa 00 aa aa aa aa 01 aa aa aa aa 02 orig in bin: 0: 10101010 1: 10101010 2: 10101010 3: 10101010 4: 00000000 5: 10101010 6: 10101010 7: 10101010 8: 10101010 9: 00000001 10: 10101010 11: 10101010 12: 10101010 13: 10101010 14: 00000010 compressed: 10000000 00101010 10100000 01001010 10100000 00000100 00001101 01010100 00000001 10000011 00000000 10100000 00100000 in groups of 9 bits: 1 00000000 0 10101010 1 00000010 0 10101010 0 00000000 1 00000011 0 10101010 0 00000001 1 00000110 0 00000010 1 00000001 0 0000 0: 1 00000000 ; 0 start 1: 0 10101010 ; literal $aa 2: 1 00000010 ; 2: $aa $aa 3: 0 10101010 ; literal $aa 4: 0 00000000 ; literal $00 5: 1 00000011 ; 3: $aa $aa $aa 6: 0 10101010 ; literal $aa 7: 0 00000001 ; literal $01 8: 1 00000110 ; 6: $aa $aa $aa $aa 9: 0 00000010 ; literal $02 10: 1 00000001 ; 1 end ----------------------------------------------------------------------- orig (sam.txt): 00000000: 49 20 61 6d 20 53 61 6d 0a 0a 53 61 6d 20 49 20 I am Sam..Sam I 00000010: 61 6d 0a 0a 54 68 61 74 20 53 61 6d 2d 49 2d 61 am..That Sam-I-a 00000020: 6d 21 0a 54 68 61 74 20 53 61 6d 2d 49 2d 61 6d m!.That Sam-I-am 00000030: 21 0a 49 20 64 6f 20 6e 6f 74 20 6c 69 6b 65 0a !.I do not like. 00000040: 74 68 61 74 20 53 61 6d 2d 49 2d 61 6d 21 0a 0a that Sam-I-am!.. 00000050: 44 6f 20 79 6f 75 20 6c 69 6b 65 20 67 72 65 65 Do you like gree 00000060: 6e 20 65 67 67 73 20 61 6e 64 20 68 61 6d 3f 0a n eggs and ham?. 00000070: 0a 49 20 64 6f 20 6e 6f 74 20 6c 69 6b 65 20 74 .I do not like t 00000080: 68 65 6d 2c 20 53 61 6d 2d 49 2d 61 6d 2e 0a 49 hem, Sam-I-am..I 00000090: 20 64 6f 20 6e 6f 74 20 6c 69 6b 65 20 67 72 65 do not like gre 000000a0: 65 6e 20 65 67 67 73 20 61 6e 64 20 68 61 6d 2e en eggs and ham. 000000b0: 0a . Name Length Stowage SF Size now Date Time CRC ============ ======== ======== ==== ======== ========= ====== ==== SAM.TXT 177 ALF 28% 128 8 Dec 82 12:24a 3690 0: 1 00000000 ; 0 start 1: 0 01001001 ; literal $49 I 2: 0 00100000 ; literal $20 3: 0 01100001 ; literal $61 a 4: 0 01101101 ; literal $6d m 5: 0 00100000 ; literal $20 6: 0 01010011 ; literal $53 S 7: 1 00000100 ; 4 (?) 8: 0 00001010 ; literal $0a 9: 0 00001010 ; literal $0a 10: 1 00000111 ; 7 (?) 11: 1 00000101 ; 5 (?) 12: 1 00000010 ; 2 (?) 13: 1 00001000 ; 8 (?) 14: 0 00001010 ; literal $0a 15: 0 01010100 ; literal $54 T 16: 0 01101000 ; literal $68 h 17: 0 01100001 ; literal $61 a 18: 0 01110100 ; literal $74 t 19: 1 00000110 ; 6 (?) 20: 1 00000100 ; 4 (?) 21: 0 00101101 ; literal $2d - 22: 0 01001001 ; literal $49 I 23: 0 00101101 ; literal $2d - 24: 1 00000100 ; 4 (?) 25: 0 00100001 ; literal $21 ! 26: 1 00001111 ; 15 (?) 27: 1 00010001 ; 17 (?) 28: 1 00010011 ; 19 (?) 29: 1 00001011 ; 11 (?) 30: 1 00010110 ; 22 (?) 31: 1 00011000 ; 24 (?) 32: 0 01101101 ; literal $6d m 33: 1 00011010 ; 26 (?) 34: 1 00000010 ; 2 (?) 35: 0 01100100 ; literal $64 d 36: 0 01101111 ; literal $6f o 37: 0 00100000 ; literal $20 38: 0 01101110 ; literal $6e n 39: 0 01101111 ; literal $6f o 40: 1 00010011 ; 19 (?) 41: 0 01101100 ; literal $6c l 42: 0 01101001 ; literal $69 i 43: 0 01101011 ; literal $6b k 44: 0 01100101 ; literal $65 e 45: 0 00001010 ; literal $0a 46: 0 01110100 ; literal $74 t 47: 1 00011100 ; 28 (?) 48: 1 00010100 ; 20 (?) 49: 0 01101101 ; literal $6d m 50: 1 00011111 ; 31 (?) 51: 1 00011001 ; 25 (?) 52: 1 00001001 ; 9 (?) 53: 0 01000100 ; literal $44 D 54: 1 00100101 ; 37 (?) 55: 0 01111001 ; literal $79 y 56: 0 01101111 ; literal $6f o 57: 0 01110101 ; literal $75 u 58: 0 00100000 ; literal $20 59: 1 00101010 ; 42 (?) 60: 1 00101100 ; 44 (?) 61: 0 00100000 ; literal $20 62: 0 01100111 ; literal $67 g 63: 0 01110010 ; literal $72 r 64: 0 01100101 ; literal $65 e 65: 0 01100101 ; literal $65 e 66: 0 01101110 ; literal $6e n 67: 0 00100000 ; literal $20 68: 0 01100101 ; literal $65 e 69: 0 01100111 ; literal $67 g 70: 0 01100111 ; literal $67 g 71: 0 01110011 ; literal $73 s 72: 1 00000011 ; 3 (?) 73: 0 01101110 ; literal $6e n 74: 0 01100100 ; literal $64 d 75: 0 00100000 ; literal $20 76: 1 00010001 ; 17 (?) 77: 0 01101101 ; literal $6d m 78: 0 00111111 ; literal $3f ? 79: 1 00001001 ; 9 (?) 80: 1 00100011 ; 35 (?) 81: 1 00100101 ; 37 (?) 82: 1 00100111 ; 39 (?) 83: 1 00101001 ; 41 (?) 84: 1 00101011 ; 43 (?) 85: 0 01100101 ; literal $65 e 86: 0 00100000 ; literal $20 87: 1 00101111 ; 47 (?) 88: 0 01100101 ; literal $65 e 89: 0 01101101 ; literal $6d m 90: 0 00101100 ; literal $2c , 91: 1 00110001 ; 49 (?) 92: 1 00110011 ; 51 (?) 93: 0 01101101 ; literal $6d m 94: 0 00101110 ; literal $2e . 95: 0 00001010 ; literal $0a 96: 1 01010001 ; 81 (?) 97: 1 00100110 ; 38 (?) 98: 1 00101000 ; 40 (?) 99: 1 00111011 ; 59 (?) 100: 1 01010101 ; 85 (?) 101: 1 00111110 ; 62 (?) 102: 1 01000000 ; 64 (?) 103: 1 01000010 ; 66 (?) 104: 1 01000100 ; 68 (?) 105: 1 01000110 ; 70 (?) 106: 1 01001000 ; 72 (?) 107: 0 01100001 ; literal $61 a 108: 1 01001010 ; 74 (?) 109: 1 01001100 ; 76 (?) 110: 1 00000100 ; 4 (?) 111: 1 01011111 ; 95 (?) 112: 1 00000001 ; 1 end junk: 0000000 ==== ======== ==== ======== Total 1 177 99% 128 ----------------------------------------------------------------------- orig: ABCDEFABBCCDDEEFABCABCDABCDEBCDBCDEBCDEF 0: 1 00000000 ; 0 start 1: 0 01000001 ; literal $41 A 2: 0 01000010 ; literal $42 B 3: 0 01000011 ; literal $43 C 4: 0 01000100 ; literal $44 D 5: 0 01000101 ; literal $45 E 6: 0 01000110 ; literal $46 F 7: 1 00000010 ; 2 AB 8: 1 00000011 ; 3 BC 9: 1 00000100 ; 4 CD 10: 1 00000101 ; 5 DE 11: 1 00000110 ; 6 EF 12: 1 00000010 ; 2 AB 13: 0 01000011 ; literal $43 C 14: 1 00001101 ; 13 ABC 15: 0 01000100 ; literal $44 D 16: 1 00001111 ; 15 ABCD 17: 0 01000101 ; literal $45 E 18: 1 00000011 ; 3 BC 19: 0 01000100 ; literal $44 D 20: 1 00010011 ; 19 BCD? 21: 1 00010010 ; 18 EB? 22: 1 00000100 ; 4 CD 23: 1 00000110 ; 6 EF 24: 1 00000001 ; 1 end junk: 0000000