Quote:
Originally Posted by Garrick
Assembly infers type? Is there no end to this madness.
Well that shows how much I know. I thought assembly would be super dupa strict and make you be explicit about everything.
|
Haha, I more meant Smalltalk, but you got me thinking about this
In a way assembly does have a notion something like type deduction sometimes, here's an example of what I mean.
In our old quirky friend Intel 8088 we can say something like:
Mov AL, SUM // where AL is the lower half (8 bits) of AX therefore 1 byte is moved
Mov AX, SUM // where AX is the whole 16 bit register therefore 2 bytes are moved.
Now, this isn't really typing, you can treat the 8 bits in AL as a character, set of bit flags, or any other data type, and similar for the 16 bits in AX.
So in a way there is some notion of types in at least some assemblers.
Other than that assembler (in vonNeumann architecture processors) is the opposite of strict, it allows you to point to any memory location and treat it as a value, a pointer, code that can be executed, or anything else you can dream up.
Assembly is an extremely powerful and dangerous place, the wild west of anarchy, if you will, no restrictions whatsoever