New answers tagged

11

TLDR: most languages in 1969/70 had declarations first. BCPL had data declarations first within a block, and while the reference manuals for B on dmr's (preserved) website only specify declaration before use, (corrected) the tutorial specifically says "all declarations must precede executable statements" (in a function). FORTRAN required ...


1

Early C had to be as small as possible! Remember that Version 7 Unix, released in 1979, and ran on the DEC PDP-11. The PDP-11 had only a 16-bit address bus, and could only address 64KB of memory. Quite simply, the early C compiler had to be as simple as possible! There was not room for anything that might complicate the compiler. Early C was an elegant and ...


24

Some early compilers, such as the ones described in the 1974 C reference manual, required that all automatic object declarations within a function precede the first executable code therein. Imposing this restriction made it possible for compilers to know the stack-relative offset of a function's arguments before it had to process any code that used them. ...


4

The C language was not suddenly specified first and then made. C language was developed based on B language, which was a simplification on BCPL systems programming language, and C evolved a few years with new features that were needed and it became popular. These languages (BCPL, B, C) were used to make the system level tools and utilities and thus were ...


9

TL;DR Too complicated for not much benefit. You ask why not include an execute instruction. The reason is quite simple. Since around the time you observed the absence of this kind of instruction, the CPU's got more and more optimized in their memory access. Code access was separated from data access as the access pattern are quite different. To execute a ...


12

The HP-3000 first introduced in 1972 was a 16-bit stack-based architecture that included an XEQ instruction that would treat a word on the stack (between TOS and 7 words below that as selected in the instruction) as a regular instruction and execute it. This was utilized in some calling conventions where you needed to execute a different version of the EXIT ...


8

What was at 0x0500-0x7bff that caused this convention? Nothing. There is no hard (-ware related) reason. And while loading an OS at top or bottom of memory is more of a philosophical question, it's one the OS to be loaded needs to decide for itself - nothing the BIOS should imply. So lets better look at what are the requirements for a boot location adding ...


10

As the least amount of memory needed to boot from floppy was 32 kilobytes, the first sector of the floppy, the FAT volume boot record, is loaded to just before the 32 kilobyte end of memory. However, it is loaded to 1 kilobyte before the end of memory, but the sector is only 512 bytes, so it could fit two sectors, or the remaining 512 bytes can be used for ...


3

A 1979 strategy memo from Gordon Bell recaps the rationale for the page size choice they made in 1975. From page 14 in the PDF (use the PDF page numbering, it appears to contain multiple documents with their own page numbering): The VAX architecture was designed to permit the building of a range of machines with sizes that are important to us. Our targeted ...


-1

Symbol table space was the most likely culprit. Integers and floating point values were known sizes. Strings were problematic. The interpreter (or P-code) had to keep track of all the variables and their contents. floating and integer types were easy to store, as they had a known size. strings were trickier and required additional information to store, such ...


8

512 bytes was the size of a block on disk. making page size the same as a disk block made calculating swapping very simple and fast. It was a throwback to the PDP-11. The original VAX 11/780, was meant to be an upgrade from the PDP-11 and had compatibility modes built in. (I remember when most of the utilities for VMS were simply the RSX-11 programs running ...


2

Firstly there is more than one way to assign a value to a variable. Eg input x, y Print x+y If the input is 4 and 2, should the interpreter return 6 or "42"? You need to be able to tell apart strings and numbers. Secondly limited memory space was a major consideration back then. Strings usually reserved 256 bytes, whereas numbers required much ...


5

Section 7.1 of the ANSI X3.60-1978/EMCA-55 Minimal BASIC Standard specifies that string variable names end in the "$" character. That particular string variable naming specification allowed the Standard to be backwards compatible with the 1968 implementation of Dartmouth BASIC (and with DEC BASIC, et.al.). So support for that type of string ...


3

Any answer to this question is going to be somewhat a matter of opinion, since there certainly are languages that are designed with dynamic typing, and BASIC could have been done that way. Unless someone comes up with a memoir or historical article explaining some of these design decisions, we won't really have a conclusive answer. I disagree with the ...


Top 50 recent answers are included