Thread: C++17
View Single Post
Old 08-27-2017, 03:57 AM   #9
Geoff Waddington
Human being with feelings
 
Geoff Waddington's Avatar
 
Join Date: Mar 2009
Location: Dartmouth, Nova Scotia
Posts: 11,252
Default

Quote:
Originally Posted by Garrick View Post
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
__________________
To install you need the CSI Software and Support Files
For installation instructions and documentation see the Wiki
Donate -- via PayPal to waddingtongeoff@gmail.com
Geoff Waddington is offline   Reply With Quote