Prev: fashion sunglasses wholesale from china,paypal payment and free shipping
Next: Fortran 77/90/95 free compiler
From: Louis Krupp on 15 May 2010 20:36 On 5/15/2010 5:13 PM, Uno wrote: <snip> > E:\fortran_stuff>type holl1.for > C PROGRAM HELLO1 > C > INTEGER IHWSTR(3) > DATA IHWSTR/4HHELL,4HO WO, 3HRLD/ > C > WRITE (6,100) IHWSTR > STOP > 100 FORMAT (3A4) > END > > C gfortran -Wall -Wextra -ffixed-form -o out.exe holl1.for > E:\fortran_stuff> > > What a clever little program and excellent way to show this material to > people who are younger. > > How dependent is this scheme on integers having a width of four? Very. Once upon a time, there were systems that didn't use 8-bit characters in 32-bit words. Terence mentioned DEC's 36-bit words, which held five 8-bit characters and change. The CDC 6600 had 60-bit words, each of which held ten 6-bit characters (nobody bothered with lower case in those days). The Burroughs B5500 had 48-bit words, each of which held eight 6-bit characters; its eventual successor, the B6700, also had 48-bit words which each held six 8-bit characters. Porting programs from one system to another was fun. Louis
From: Louis Krupp on 15 May 2010 20:53 On 5/15/2010 6:36 PM, Louis Krupp wrote: <snip> > Once upon a time, there were systems that didn't use 8-bit characters in > Terence mentioned DEC's 36-bit words, which held five > 8-bit characters and change. Oops. Make that five 7-bit characters plus a spare bit. Louis
From: Gordon Sande on 15 May 2010 21:50 On 2010-05-15 21:36:13 -0300, Louis Krupp <lkrupp_nospam(a)indra.com.invalid> said: > On 5/15/2010 5:13 PM, Uno wrote: > <snip> >> E:\fortran_stuff>type holl1.for >> C PROGRAM HELLO1 >> C >> INTEGER IHWSTR(3) >> DATA IHWSTR/4HHELL,4HO WO, 3HRLD/ >> C >> WRITE (6,100) IHWSTR >> STOP >> 100 FORMAT (3A4) >> END >> >> C gfortran -Wall -Wextra -ffixed-form -o out.exe holl1.for >> E:\fortran_stuff> >> >> What a clever little program and excellent way to show this material to >> people who are younger. >> >> How dependent is this scheme on integers having a width of four? > > Very. > > Once upon a time, there were systems that didn't use 8-bit characters > in 32-bit words. Terence mentioned DEC's 36-bit words, which held five > 8-bit characters and change. The CDC 6600 had 60-bit words, each of > which held ten 6-bit characters (nobody bothered with lower case in > those days). The Burroughs B5500 had 48-bit words, each of which held > eight 6-bit characters; its eventual successor, the B6700, also had > 48-bit words which each held six 8-bit characters. > > Porting programs from one system to another was fun. > > Louis IBM 7090 class machines had 36 bits for 6 BCD characters of 6 bits. 7090/7094/7040/7044 from IBM. There were early CDC 3600 as well (IIRC).
From: glen herrmannsfeldt on 16 May 2010 04:16 Louis Krupp <lkrupp_nospam(a)indra.com.invalid> wrote: > On 5/15/2010 5:13 PM, Uno wrote: > <snip> >> INTEGER IHWSTR(3) >> DATA IHWSTR/4HHELL,4HO WO, 3HRLD/ (snip) >> How dependent is this scheme on integers having a width of four? > Very. Well, it only depends on it being at least four. There are Fortran compilers with 16 bit default integer type, but they are usually non-standard. Since it is practically impossible to have a useful 16 bit REAL, and the standard requires the default INTEGER and REAL to be the same size, INTEGER should hold at least four 8 bit characters. (Or, I suppose two 16 bit unicode characters.) > Once upon a time, there were systems that didn't use 8-bit characters in > 32-bit words. Terence mentioned DEC's 36-bit words, which held five > 8-bit characters and change. The CDC 6600 had 60-bit words, each of > which held ten 6-bit characters (nobody bothered with lower case in > those days). The Burroughs B5500 had 48-bit words, each of which held > eight 6-bit characters; its eventual successor, the B6700, also had > 48-bit words which each held six 8-bit characters. But in those cases, four characters and A4 format should work. > Porting programs from one system to another was fun. For actually processing characters, not just printing them out, it is usually done with one character per array element, using A1 format to read and write. -- glen
From: glen herrmannsfeldt on 16 May 2010 04:20
Gordon Sande <Gordon.Sande(a)gmail.com> wrote: (snip, someone wrote) >>> How dependent is this scheme on integers having a width of four? (snip) > IBM 7090 class machines had 36 bits for 6 BCD characters of 6 bits. > 7090/7094/7040/7044 from IBM. There were early CDC 3600 as well (IIRC). It was 36 bit words and 6 bit BCD characters at least back to the 704, where Fortran originated. Also, the whole series from 704 though 7094, are sign magnitude for integers. -- glen |