AT&T 630 terminal - software ??

Wonderly gregg at ihlpb.ATT.COM
Fri Jan 20 13:31:34 AEST 1989


>From article <8794 at alice.UUCP>, by debra at alice.UUCP (Paul De Bra):
> }
> }1
> }70000
69999 sigh...
> }
> }Your C compiler wins my award for effort otherwise you won't get any
> }words of sympathy from me...
> }
> } [program using unsigned ints and malloc deleted]
> 
> You seem a bit confused. The 630 is a nice terminal for creating a few
> windows and such, but according to your standards its programmability
> is lousy, because it won't run your little program. It uses 16 bit ints
> and malloc (actualla called alloc) can only allocate 64k, using an
> unsigned.

Yes, that is true.  I guess I should just say the whole thing next time.
Programs such as the one I showed could be transformed to the following
on the 630 and they wouldn't refuse to compile with such error messages
as

	"foo.c", line 1: 'a', allocation greater than 64k
or
	"foo.c", line 12: common area greater than 64k

long a[70000];

main ()
{
 	long *p = a, i;

	for (i=0;i < 70000; ++i)
		*p++ = i;

	printf ("%ld\n%ld\n", a[0], a[69999]);
}

It is not the size of an int that bothers me, it is the stupid segmentation
of the address space.  One would think that after people got tired of
writing fragments like the following on the 808x

#  Convert a linear address to a segment reg/offset reg pair.
#  Sorta Intel assembler...
#  Input DS/BX as a long
#  Output DS:BX as segment offset
	mov	ax,ds
	mov	cl,12
	sla
	mov	ds,ax

when Intel designed the 286 protected mode, they would have
thought to put the gosh darn LDT/GDT indicator and access level bits
else where and make the segment selector work as a LDT/GDT selector
without needing to be shifted and masked and otherwise abused.

I like the idea of segments because they provide a very logical way
to get rid of objects that a process is not needing.  I.e. either
you need the function or you don't.  Same thing for arrays and other
data objects.

Enough said...

-- 
Gregg Wonderly                             DOMAIN: gregg at ihlpb.att.com
AT&T Bell Laboratories                     UUCP:   att!ihlpb!gregg



More information about the Comp.unix.wizards mailing list