SQUOZE

From testwiki
Jump to navigation Jump to search

Template:Short description Template:About Template:Use dmy dates Template:Use list-defined references SQUOZE (abbreviated as SQZ) is a memory-efficient representation of a combined source and relocatable object program file with a symbol table on punched cards which was introduced in 1958 with the SCAT assembler[1][2] on the SHARE Operating System (SOS) for the IBM 709.[3][4] A program in this format was called a SQUOZE deck.[5][6][7] It was also used on later machines including the IBM 7090 and 7094.

SQUOZE deck

Template:Expand section A SQUOZE deck contains an encoded binary form of the original assembly language code; SQUOZE decks are converted to absolute machine code and stored in memory by a loader program.[8][9][10]

Identifier name character encoding

In the SQUOZE encoding, identifiers in the symbol table were represented in a 50-character alphabet, allowing a 36-bit machine word to represent six alphanumeric characters plus two flag bits, thus saving two bits per six characters,[6][1] because the six bits normally allocated for each character could store up to 64 states rather than only the 50 states needed to represent the 50 letters of the alphabet, and 506 < 234.

SQUOZE character codes[1]
Most
significant
digits
Least significant digits
Dec +0 +1 +2 +3 +4 +5 +6 +7
Oct 0 1 2 3 4 5 6 7
Dec Oct Bin 000 001 010 011 100 101 110 111
+0 0 000 space 0 1 2 3 4 5 6
+8 1 001 7 8 9 A B C D E
+16 2 010 F G H I J K L M
+24 3 011 N O P Q R S T U
+32 4 100 V W X Y Z = # / % ) ⌑
+40 5 101 + & - - @ + & - * / $
+48 6 110 , . Template:N/A Template:N/A Template:N/A Template:N/A Template:N/A Template:N/A

Using base 50 already saves a single bit every three characters, so it was used in two three-character chunks. The manual[1] has a formula for encoding six characters ABCDEF: (A*502+B*50+C)*217+(D*502+E*50+F)

For example "SQUOZE", normally 36 bits: 35 33 37 31 44 17(base 8) would be encoded in two 17-bit pieces to fit in the 34 bits as ( 0o220231 << 17 ) | 0o175473 == 0o110114575473.

A simpler example of the same logic would be how a three-digit BCD number would take up 12 bits, such as 987: 9 8 7(base 16) 1001 1000 0111(base 2), but any such value could be stored in 10 bits directly, saving two bits, such as 987: 3db(base 16) 11 1101 1011(base 2).

Etymology

"Squoze" is a facetious past participle of the verb 'to squeeze'.[5][6]

The name SQUOZE was later borrowed for similar character encoding schemes used on DEC machines;[4] they had a 40-character alphabet (50 in octal) and were called DEC RADIX 50 and MOD40,[11] but sometimes nicknamed DEC Squoze.

See also

References

Template:Reflist

Further reading

  1. 1.0 1.1 1.2 1.3 Cite error: Invalid <ref> tag; no text was provided for refs named IBM_1961_SOS
  2. Cite error: Invalid <ref> tag; no text was provided for refs named Salomon_1993
  3. Cite error: Invalid <ref> tag; no text was provided for refs named Jacob_2008
  4. 4.0 4.1 Cite error: Invalid <ref> tag; no text was provided for refs named Jones_2018
  5. 5.0 5.1 Cite error: Invalid <ref> tag; no text was provided for refs named Boehm-Steel_1958
  6. 6.0 6.1 6.2 Cite error: Invalid <ref> tag; no text was provided for refs named Boehm-Steel_1959
  7. Cite error: Invalid <ref> tag; no text was provided for refs named Shell_1959
  8. Cite error: Invalid <ref> tag; no text was provided for refs named 7090genInfo_1959
  9. Cite error: Invalid <ref> tag; no text was provided for refs named PORTHOS_1964
  10. Cite error: Invalid <ref> tag; no text was provided for refs named SOS_Reference_1961
  11. Cite error: Invalid <ref> tag; no text was provided for refs named DEC_1971_PAL-11R