Making Fatal Hidden Assumptions

A

Alf P. Steinbach

* Keith Thompson:
So you're using the term "portable assembly language" while insisting,
in contradiction to ordinary English grammar, that a "portable
assembly language" is not necessarily an "assembly language".

If it were as want it to be, then "portable assembly" would be a
contradiction in terms... :-o

You cannot extract meaning or conclude from a self-contradiction.

By the rules of logic, that is.

("Portable" is an adjective; "assembly language" is a noun phrase.)
And yet you seem surprised that I'm having trouble figuring out what
you're talking about.

Yes, you have managed to suprise me continuously. Nobody can be that
stubborn, I think. And yet you come through; ignoring logic, ignoring
examples, ignoring established usage, insisting that your own extremely
little irrelevant subset of language rules is what "should" apply.

I'm done here.

Well done, I might add. If not to say roasted.
 
R

Richard Bos

Alf P. Steinbach said:
* Richard Bos -> someone:

Happily I haven't followed this debate, so I don't know what you folks,
good or not, think "portable assembler" means, nor how you can think a
language is a compiler (or whatever).

C was designed as a portable assembly language,

Complete nonsense. Read what dmr himself writes about this:
<http://cm.bell-labs.com/cm/cs/who/dmr/chist.html>.

C was designed as a systems programming language for (then) a single,
new OS, _not_ a portable assembler. In fact, that article explicitly
states that a. one of the reasons that drove the evolution of C's
ancestors, and later C itself, was _not_ to have to use assembler and b.
portability was not yet a concern in the first days.
You can find more information about the C language at e.g. Wikipedia,
<url: http://en.wikipedia.org/wiki/C_programming_language>.

Ah, well, yes, if you get your information from Wikipedia, where any
little fool with a complete misunderstanding of his subject can, and
last time I looked at that page in fact _had_, turned an article into a
mix of some seeds of fact, some serious misconceptions, and quite a bit
of complete bollocks, then I'm afraid I cannot take your opinion on any
subject seriously, certainly not on C.

Richard
 
A

Alf P. Steinbach

* Richard Bos:
Complete nonsense.

This is a fallacy known as "Appeal to Ridicule". To quote one source:

<q>
This sort of "reasoning" is fallacious because mocking a claim does not
show that it is false. This is especially clear in the following
example: "1+1=2! That's the most ridiculous thing I have ever heard!"
</q>


Read what dmr himself writes about this:
<http://cm.bell-labs.com/cm/cs/who/dmr/chist.html>.

Why should I read that yet again? Quote what you think is relevant.

C was designed as a systems programming language for (then) a single,
new OS, _not_ a portable assembler. In fact, that article explicitly
states that a. one of the reasons that drove the evolution of C's
ancestors, and later C itself, was _not_ to have to use assembler and b.
portability was not yet a concern in the first days.

All that is correct and irrelevant. Why do or did you think it should
or would be relevant? Perhaps you're just objecting as best you can to
terminology that seems frightening to you, and even appears new to you;
Ah, well, yes, if you get your information from Wikipedia, where any
little fool with a complete misunderstanding of his subject can, and
last time I looked at that page in fact _had_, turned an article into a
mix of some seeds of fact, some serious misconceptions, and quite a bit
of complete bollocks, then I'm afraid I cannot take your opinion on any
subject seriously, certainly not on C.

The above is several fallacies lumped into one spaghetti fallacy. But
the main top-level fallacy is known as "Poisoning the Well". Don't you
think you should perhaps restrict your usage of fallacious reasoning?
 
F

Flash Gordon

If you can't define what a term means, then it is meaningless and so it
is pointless to use that term with reference to anything.

Well, you don't need to be told what you mean (I assume) so it is
everyone else that needs to know in order to understand what you are
trying to say.

No one has expressed any offence at the term that I've seen, they have
just disagreed.

Suggesting that the people who disagree with you have an inferiority
complex, on the other hand, is insulting.

All completely irrelevant to the discussion at hand.
Apparently I have failed utterly to make myself clear. I'll try one
last time.

You claim that C is, in some sense, an assembly language
(specifically, a "portable assembly language"). I'm assuming here
that any "portable assembly language" is an "assembly language".

I claim that C is not an "assembly language", though it may bear some
resemblance to one.

I'll give some attributes that I consider essential to an assembler, and
whether or not C has them:
- The ability to write Interrupt Service Routines
- Not possible in C since there is no mechanism to specify that a
routine is an ISR and some processors use different calling
conventions for IRSs.
- The ability to access the status flags of the processor, including
such flags as overflow flags
- Not possible in C, if a calculation overflows you invoke undefined
behaviour
- The ability to access IO ports on the processor
- Not possible in C. You can access memory mapped devices, but not IO
mapped devices.

I could go on.

Consider that there is an inherent conflict beween "portable" and
traditional meanings of the term "assembly language". [...]
Something must therefore give, rather radically, if the term "portable
assembly" is to be meaningful, if we are to make sense of what someone
means when he or she cries "portable assembly!".

I agree. It does not follow from this, though, that the term
"portable assembly language" is necessarily meaningful, or that it
applies to C even if it is meaningful.

If someone cries "portable assembly", I can either figure out what
they mean, or I can decide they're crying nonsense. I'm content to do
either or both.

So, finally, what do you mean by "assembly language"?

Indeed, since C does not come close to any definition I would use. Also,
what do you mean by "portable assembler".

BTW, I've done embedded programming, including writing interrupt service
routines, accessing IO ports (as opposed to memory mapped devices),
accessing memory mapped devices etc all in a few different extended
versions of Pascal. So from my perspective Pascal is about as close to
assembler as C is.
 
F

Flash Gordon

Alf said:
* Keith Thompson:

Nope, as you know I haven't claimed that. Whenever you're referring to
a claim, be sure to quote that claim. Especially when your previous
attempt at making the claim-making stick has been shown as fallacious.



That assumption does not hold.

Then tell us what you *do* mean.
However, that was explained twice, in detail, in the posting you now
replied to, and yet here you are making the same nonsense assumption.

You have not explained what you mean by Portable Assembly Language
anywhere that I can see.
OK, example.

Example 1.

Cheery Unstoppable Keith: "How's your cycle, by the way?"
Puzzled Maria: "Fine, just fine?"
Cheery Unstoppable Keith: "So you don't share it with others?"
Puzzled Maria: "That happened five years ago, when we all
lived together. You want to borrow it?"
Cheery Unstoppable Keith: "Huh, you think I'm transsexual!?!"
Puzzled Maria: "/What/?"
Cheery Unstoppable Keith: "Don't try that on me! I know what you're
thinking! What you're /implying/!"
Puzzled Maria: "Uh oh... Keith, say, you'd like a beer or
something? I'll go fetch it. Right back!"

In this highly educational example, note that the "MotorCycle" that
Puzzled Maria is thinking of, is not a "Cycle" that Cheery Unstoppable
Keith is thinking of. Just chopping off the word "Motor" does not make
a "MotorCycle" into a "Cycle". Well, OK, it does, but not /that/ kind.

I have numbered this example in case more examples will be needed; then
the numbers may make it easier to refer unambigiously to the examples.

A closer example would be:
You: "Cats are ambulatory rocks"
Keith: "That doesn't make any sense. Cats are not any form of rock. What
do you mean be ambulatory rock?"
You: "I didn't say cats are rocks."
[snip]
There should be some definition of the phrase "assembly language".

Try <url: http://en.wikipedia.org/wiki/Assembly_language>; although not
a reference nor of reference-quality, it's good enough for any novice
level in-practice discussion or just learning what the term means very
roughly.

Many of us have been in the computer industry for many years. I spent
many years programming in various forms of assembly language. I also
posted else where in this thread a number of things that you can easily
do in one of those that you can't even come close to in C. No one
contradicted my assertions there that this meant C was no where near
being any form of assembly language.
No, I don't disagree; it's fine on its own, and it's irrelevant.

So you consider "portable assembly language" to have nothing to do with
"assembly language?" In that case I'll define "portable assembly
language" as the language spoken by workers in a mobile factory. Now we
can all go home since C clearly does not meet that definition.

Alternatively define what you meen by the term.
[...]
Consider that there is an inherent conflict beween "portable" and
traditional meanings of the term "assembly language". [...]
Something must therefore give, rather radically, if the term "portable
assembly" is to be meaningful, if we are to make sense of what someone
means when he or she cries "portable assembly!".

I agree. It does not follow from this, though, that the term
"portable assembly language" is necessarily meaningful, or that it
applies to C even if it is meaningful.

If someone cries "portable assembly", I can either figure out what
they mean, or I can decide they're crying nonsense. I'm content to do
either or both.

Yes, you can either assume some meaning, in which case you'll end up
with essentially my analysis (perhaps differing in some detail), and

Or we will end up with a completely different result, as we seem to have
done.
will be able to understand e.g. that Wikedia article referred to earlier
in the thread, which used that (to you) troublesome term.

The Wiki article only says some people use the term, it makes no claim
as to either its correctness or meaning. Therefore, in this respect, the
Wiki article is correct beacause people do use the term with reference
to C. That does not make such people correct or tell us what they mean
by it.
Or, you can say, I regard this term as meaningless, I refuse to consider
any meaning, I want to be forever ignorant except as enlighened by some
of my chosen Holy Books (e.g. the C and perhaps C++ standards).

Flooglewobbit.

That term means you are talking complete rubbish. You can either accept
that or forever remain ignorant except as enlightened by some of your
chosen holy books.

At least, unlike you, I'm telling you what the term means.
I think that should be clear since I've now used the term, but one
important difference from the Wikipedia definition is that I do regard
e.g. "CLR assembly language" (CIL, Common Intermediate Language) as an
assembly language, i.e. I include assembly languages for virtual
machines among the assembly languages, and I do not exclude assembly
languages that have some OO features, such as TASM had and CIL has.

However, note well again for the umpteenth time (some time it must sink
in, I hope) that that's irrelevant: I only answer it because you ask.

So in your world the definition of what a computer is has no relevance
to the meaning of the term "portable computer?"
 
P

Paul Burke

Flash said:
I'll give some attributes that I consider essential to an assembler, and
whether or not C has them:
- The ability to write Interrupt Service Routines
- Not possible in C since there is no mechanism to specify that a
routine is an ISR and some processors use different calling
conventions for IRSs.

Every C compiler I've used for the last 2exp(N) years (apart from
perhaps the ones for specific OSs like Windows, where I've simply not
looked) has had this facility. It's not C- it's an extension, and it's
very annoying that they are all different- but it's there.
- The ability to access IO ports on the processor
- Not possible in C. You can access memory mapped devices, but not IO
mapped devices.

Same as above.

Plus necessary constructs to direct unchanging objects to ROM, again all
compilers different.


But you're right (whoever said it), it's nowt like an assembler. It's
just a quick and dirty middle- level language, and to use it you really
need to know the hardware yoiu're operating on in many cases.

It seems that the little embedded stuff is considered simply below the
radar for the standards committees. Perhaps that's a good thing.

Paul Burke
 
A

Alf P. Steinbach

* Flash Gordon:
Then tell us what you *do* mean.

If you can quote whatever passage is mystifying to you, I'll try to
clear that up, but I can't clear up an unlimited amount of things: be
specific.
So in your world the definition of what a computer is has no relevance
to the meaning of the term "portable computer?"

Huh?
 
C

Chris Dollin

Flash said:
If you can't define what a term means, then it is meaningless

I don't think that's true, if only because you have to start with
/some/ terms that don't have definitions.

Meaning is prior to definition.
and so it is pointless to use that term with reference to anything.

Clarity and/in communication, that's the ticket.
 
F

Flash Gordon

Paul said:
Every C compiler I've used for the last 2exp(N) years (apart from
perhaps the ones for specific OSs like Windows, where I've simply not
looked) has had this facility. It's not C- it's an extension, and it's
very annoying that they are all different- but it's there.


Same as above.

Plus necessary constructs to direct unchanging objects to ROM, again all
compilers different.

You snipped the part where I pointed out that you can do all this in the
various forms of extended Pascal I've used, so if you allow extensions
Pascal is just as low a level language as C ;-)
But you're right (whoever said it), it's nowt like an assembler. It's
just a quick and dirty middle- level language, and to use it you really
need to know the hardware yoiu're operating on in many cases.

Agreed. Despite my comment above, I would say that Pascal was a higher
level language than C.
It seems that the little embedded stuff is considered simply below the
radar for the standards committees. Perhaps that's a good thing.

Well, those odd little corners in my experience are only a small
fraction of the code, so I don't see it as a big issue.
 
F

Flash Gordon

Alf said:
* Flash Gordon:

If you can quote whatever passage is mystifying to you, I'll try to
clear that up, but I can't clear up an unlimited amount of things: be
specific.

What do you mean by "portable assembly language". A question you have
already been asked.

You claim the definition of "assembly language" has no bearing on the
definition of "portable assembly language". By this argument the
definition of "computer" should not have anything to do with the
definition of "portable computer."
 
F

Flash Gordon

Alf said:
* Flash Gordon:
[snipped anonymous babble]

I don't know why you call it anonymous, since I am not posting
anonymously. Or if I am, it is about the worst attempt ever at being
anonymous.
What is the question?

I wasn't asking a question, I was refuting points you raised and
pointing out why C is not any form of assembler, including a portable
assembler. It's not my fault if you don't understand a lot of the things
I spent many years using assembler for, or the various things you cannot
do in C that you can easily do in assembler.
 
I

Ian Collins

Flash said:
BTW, I've done embedded programming, including writing interrupt service
routines, accessing IO ports (as opposed to memory mapped devices),
accessing memory mapped devices etc all in a few different extended
versions of Pascal. So from my perspective Pascal is about as close to
assembler as C is.

Just about any language than isn't pure OO (I'm not 100% sure on that
point, I just can't imaging pure Java in this role) can be extended to
do this. DEC even sold an operating system written in BASIC.

So what is the point of this discussion? No language can replace
assembler without extensions, any attempt to standardise a hardware
layer would be doomed.

If C was intended as an assembler, the original PHP UNIX would have been
pure C, which it wasn't.
 
N

niklasb

Seems resonable enough, but since "portable assembly language"
taken literally is an oxymoron, I assume the originators of the
term were being metaphorical.

Hee hee hee. I've enjoyed this discussion.
What do you mean by "portable assembly language". A question you have
already been asked.

I'll try. I'd say "portable assembly language" is a sort of short-hand,
semi-metaphorical way of saying a language has certain properties
that make it (more so than other HLLs) a viable alternative to
assembly language in many cases.

I also think it says as much about how the language is used, or
intended to be used, as about the language itself. For example,
if some assembly language programmers switch to C purely for
the sake of portability (as opposed to, say, increased productivity)
then they're using C as a sort of portable assembly language.

For an example of use of the term by people who presumably know what
"assembly language" means, see http://www.cminusminus.org/
 
C

CBFalconer

Flash said:
Alf P. Steinbach wrote:
.... snip ...

What do you mean by "portable assembly language". A question you
have already been asked.
.... snip ...

You claim the definition of "assembly language" has no bearing on the
definition of "portable assembly language". By this argument the
definition of "computer" should not have anything to do with the
definition of "portable computer."

How about knocking it off. I am on the edge of plonking both of
you for this ridiculous argument.

--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
More details at: <http://cfaj.freeshell.org/google/>
Also see <http://www.safalra.com/special/googlegroupsreply/>
 
R

RSoIsCaIrLiIoA

....
Apparently I have failed utterly to make myself clear. I'll try one
last time.

You claim that C is, in some sense, an assembly language
(specifically, a "portable assembly language"). I'm assuming here
that any "portable assembly language" is an "assembly language".

I claim that C is not an "assembly language", though it may bear some
resemblance to one.

i don't know what "portable assembly language" is (because for an
assembly there is a cpu and "<=" [even a virtual cpu]),
but C language can be assembly language for example for 386 cpu if
0) it is used the right subset of the language
1) registers and sub registers have C names
2) have the "push" instruction and a set of macros for all 386 cpu
instructions

for example

#include <stdio.h>
#include <string.h>
#include <cpu_386.h>

int main(int argc, char** argv)
{push _ebx
_ebx=argv; if(!(_ebx==0)) goto c1;
c0: {pop _ebx; _eax^=_eax; return;}
c1: _ebx= *ebx_; /* ebx= argv[0]*/
if(_ebx==0) goto c0;
strrchar(_ebx, "prog.exe");
if(_eax==0) goto c0;
_ebx=_eax; _ebx+=sizeof("prog.exe"); _ebx=*_ebx;
if(!(_ebx==0)) goto c2;
{printf("i nomi sono uguali\n"); }
c2: {printf("il nome è più lungo \n");}
goto c0;
}

could be assembly
 
S

santosh

RSoIsCaIrLiIoA said:
but C language can be assembly language for example for 386 cpu if
0) it is used the right subset of the language
1) registers and sub registers have C names
2) have the "push" instruction and a set of macros for all 386 cpu
instructions

Nonsense. C is not and cannot be an assembly language, portable or
otherwise. Now *your* implementation of C might provide extensions, or
you might create them yourself to access specific features of the
target processor, but that is beside the point.

Standard C is not an assembly language, portable or otherwise. Anyone
who thinks so has a dilute conception of assembly language.

< snipped wierd inline assembly code >
 
R

RSoIsCaIrLiIoA

#include <stdio.h>
#include <string.h>
#include <cpu_386.h>

int main(int argc, char** argv)
{push _ebx
_ebx=argv; if(!(_ebx==0)) goto c1;
c0: {pop _ebx; _eax^=_eax; return;}
c1: _ebx= *ebx_; /* ebx= argv[0]*/
if(_ebx==0) goto c0;
strrchar(_ebx, "prog.exe");
if(_eax==0) goto c0;
_ebx=_eax; _ebx+=sizeof("prog.exe"); _ebx=*_ebx;
if(!(_ebx==0)) goto c2;
{printf("i nomi sono uguali\n"); }
c2: {printf("il nome è più lungo \n");}
goto c0;
}

could be assembly

but this seems to compile and to run here (Borland C compiler)

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(int argc, char** argv)
{ asm{push ebx;}
/* printf("arg0=%s\n", argv[0]); */
_EBX=argv; if(!(_EBX==0)) goto c1;
c0: {asm{pop ebx;} _EAX^=_EAX; return;}
c1: _EBX = *(int*)_EBX; /* ebx= argv[0]*/
if(_EBX==0) goto c0;
strstr((char*)_EBX, "prog.exe");
if(_EAX==0) goto c0;
_EBX=_EAX; _EBX+=strlen("prog.exe");
_BL = *(char*)_EBX;
if(!(_BL==0)) goto c2;
{printf("i nomi sono uguali\n"); goto c3;}
c2: {printf("il nome e' piu' lungo \n");}
c3: goto c0;
}
 
C

CBFalconer

RSoIsCaIrLiIoA said:
#include <stdio.h>
#include <string.h>
#include <cpu_386.h>

int main(int argc, char** argv)
{push _ebx
_ebx=argv; if(!(_ebx==0)) goto c1;
c0: {pop _ebx; _eax^=_eax; return;}
c1: _ebx= *ebx_; /* ebx= argv[0]*/
if(_ebx==0) goto c0;
strrchar(_ebx, "prog.exe");
if(_eax==0) goto c0;
_ebx=_eax; _ebx+=sizeof("prog.exe"); _ebx=*_ebx;
if(!(_ebx==0)) goto c2;
{printf("i nomi sono uguali\n"); }
c2: {printf("il nome è più lungo \n");}
goto c0;
}

could be assembly

but this seems to compile and to run here (Borland C compiler)

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(int argc, char** argv)
{ asm{push ebx;}
/* printf("arg0=%s\n", argv[0]); */
_EBX=argv; if(!(_EBX==0)) goto c1;
c0: {asm{pop ebx;} _EAX^=_EAX; return;}
c1: _EBX = *(int*)_EBX; /* ebx= argv[0]*/
if(_EBX==0) goto c0;
strstr((char*)_EBX, "prog.exe");
if(_EAX==0) goto c0;
_EBX=_EAX; _EBX+=strlen("prog.exe");
_BL = *(char*)_EBX;
if(!(_BL==0)) goto c2;
{printf("i nomi sono uguali\n"); goto c3;}
c2: {printf("il nome e' piu' lungo \n");}
c3: goto c0;
}

PLONK

--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
More details at: <http://cfaj.freeshell.org/google/>
Also see <http://www.safalra.com/special/googlegroupsreply/>
 
K

Keith Thompson

RSoIsCaIrLiIoA said:
but this seems to compile and to run here (Borland C compiler)

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(int argc, char** argv)
{ asm{push ebx;}
/* printf("arg0=%s\n", argv[0]); */
_EBX=argv; if(!(_EBX==0)) goto c1;
c0: {asm{pop ebx;} _EAX^=_EAX; return;}
c1: _EBX = *(int*)_EBX; /* ebx= argv[0]*/
if(_EBX==0) goto c0;
strstr((char*)_EBX, "prog.exe");
if(_EAX==0) goto c0;
_EBX=_EAX; _EBX+=strlen("prog.exe");
_BL = *(char*)_EBX;
if(!(_BL==0)) goto c2;
{printf("i nomi sono uguali\n"); goto c3;}
c2: {printf("il nome e' piu' lungo \n");}
c3: goto c0;
}

Please stop posting this non-portable non-standard crud in comp.lang.c.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,888
Messages
2,569,964
Members
46,294
Latest member
HollieYork

Latest Threads

Top