Re: Does anyone know how to do this
From: Beth (BethStone21_at_hotmail.NOSPICEDHAM.com)
Date: 12/24/03
- Next message: Beth: "Season's Greetings"
- Previous message: Bx. C: "Re: I have a problem on how to print the PSP seg."
- In reply to: Rally: "Re: Does anyone know how to do this"
- Next in thread: Nathan C. Baker: "Re: Does anyone know how to do this"
- Reply: Nathan C. Baker: "Re: Does anyone know how to do this"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 24 Dec 2003 10:22:57 -0000
Rally wrote:
> Beth wrote:
> >...Linux only needs "line feed" (taking the attitude of
> > ignoring "carriage return" because a computer doesn't have a
> > "carriage" so "what possessed ASCII to put that character in is
> > anyone's guess!")...
>
> I suspect it was because in thoe days computers (well, the teletypes
used as
> terminals) did have a carraige to return.
Yeah, but, then again, we're abstracting 7-bit binary values into
rotations of a drum of characters and another different drum for some
characters which moves the paper...and so on and so forth...
Why abstract one set of things but then insist that another set can't
be abstracted?
And, as I mentioned, "carriage return" itself mocks this idea, anyway,
because we _are_ back-tracking with that character when it's
alone...hence, why not "line return" which spins the paper drum
backwards one line...why not "cursor right" which moves the carriage
and / or character head across (certainly not asking too much here
because the tab '\t' character already does this, just without precise
control...there's another ***-up in ASCII...no "official line" on how
tab is supposed to be interpreted...which still leads to this day with
source code indented all wrongly because, yes, I usually use _3_
spaces for a tab (yes, an _odd_ number! The very thought of this is
sending shivers down the spines of "it must be a power of two!!"
coders ;) while everyone else does spacings of 2, 4 and 8
usually...luckily, I set my IDE to automatically convert these to
spaces before posting code...although, of course, that does mean they
are taking up slightly more bytes here and there...but, in my opinion,
the "readability" is worth those extra bytes here and there :)...a
"cursor left" character would be a "carriage return" that just doesn't
go all the way back to the start (in fact, on a "teletype", the
"delete" character _is_ basically a "cursor left" character :)...
If you're "not getting" what I'm talking about then you have to get
familiar with Commodore's PETSCII and their novel way of allowing
control characters to be input directly from the keyboard (the control
characters are editing controls _until_ you type an opening quotation
marks - " - and then pressing these keys instead puts a "cursor right"
or "clear screen" (yes, a CLS _character_ in PETSCII ;) characters
into the string...delete still functions normally, though, because you
might, indeed, make a mistake (either print the ASCII with BASIC's
CHR$() or use "cursor left, space, cursor left" which is an extra few
characters but does much the same thing :)...admittedly, when you're
not used to these two different "input modes", it'll drive you batty
initially (whacking "cursor up" and only getting a string of
characters rather than it actually moving the cursor up ;)...but it
certainly was a novel way of allowing "invisible" characters to be
input straight into strings in programs...and with characters like
"clear screen", "cursor up", "cursor right" and the infamous "keyboard
graphics" (these were a bit like IBM's "box drawing characters" but a
lot more versatile...circles, diamonds, crosses, box-drawing,
etc...there was basically two character sets - uppercase and lowercase
(which you could switch between but only one could be displayed at a
time) - and, therefore, there was tons of useful graphics characters
and control codes :)...
Of course, this stuff probably wouldn't work too well today...because
with the Commodore and its BASIC interpreter, you typed in one line at
a time (line numbers)...so the lack of cursor control whilst inside
strings wasn't a big deal...but it would be with the editors used
today where the file is shown completely and you move around to edit
it in-place...
Mind you, of interest here, is that Commodore's BASIC was actually
written by Microsoft...hence, the BASIC on Commodore machines was
effectively the _worst_ implementation of BASIC ever to have
existed...but, in a sense, that actually worked out okay because most
BASIC programs consisted of a series of "POKE" commands, which just
put values directly into hardware registers...so, anyone who started
coding with a Commodore was really learning how to program machine
code without particularly realising that's what was
happening...probably all the Commodore BASIC coders of that time
who're still playing around with coding are now ASM coders on the PC
(or know ASM coding well, even if their job insists they use C++
:)...it's what's known as "karma"...unintentionally, Microsoft created
a generation of "to the wire coders" that are comfortable enough to be
POKE-ing around the innards of a machine that, well, they are probably
working on the Linux kernel or their own OS or a free Email program
that works twenty times better than Outlook as we speak...as I say,
"karma"...if Microsoft are ever "defeated", then you can bet that the
generation of coders they "let down" with a BASIC that was "machine
code using PEEK and POKE" will probably be involved, as Microsoft
taught them how to _ignore_ the pathetic facilities of the OS and do
things themselves (practically every serious commercial program would
map out the BASIC ROM from memory immediately to free up space and
then do it all themselves - fixed configuration hardware _does_ have
real benefits that this is totally acceptable practice as you _know_
what hardware they have to write directly to it in total comfort that
it _will_ work without needing "DirectX" and OS layers and device
drivers and other things getting in the way slowing it all down...the
PC has advantages and _disadvantages_ in the way the architecture
works - that the OS and BASIC was only there to give you the initial
"LOAD" command for getting the programs off the tape deck...although,
you could play around with the BASIC to quickly test out "ideas" of
tricks to do with the hardware and then when you were sure they
worked, you could boot up the ASM monitor instead to "code it up
properly"...a practice that I'd still often recommend today...use a
HLL to just test out if you're barking up the right tree with your
algorithm and then, if it works okay and as expected (and you've used
the HLL to "tweak" any variables that need to be discovered
"empirically", as the HLL will be brilliant for this :), then you can
code it all up in ASM "properly" so that it uses the machine resources
as best as possible too ;)...
Another cool thing I once saw was a text editor on some Sillicon
Graphics workstation that would print up control characters using
special graphics...basically, this more or less worked like how Word
can be switched to show dots for spaces and that paragraph symbol for
returns and so forth...except that it would show "CR" or "LF" or "TAB"
in the editor, sort of all "scrunched up" into one character's width
(going diagonally across the "character cell" :)...presumably there
was also a way - perhaps pressing Ctrl + some key - of also entering
these control characters too...so that you could actually _see_
control characters and edit them directly...
I was impressed enough by this idea that I am going to include this
feature (but, like Word, you switch it "on" and "off" using a menu
option :) into my "proper programmer's editor"...basically, I've
started to just get pissed off at all the editors and IDEs I'm using
that I'm probably going to just have to code up my own "Notepad" that
includes all the features I find to be "missing" on other
editors...for instance, Notepad has only recently been "upgraded" to
show the "line number" of where the cursor is...well, that's one of
those "non-optional" thing for a programmer's text editor...being able
to see and edit control characters is also a feature that could come
in useful...and I'd prefer an editor that is only "fixed width" (like
Notepad where you can only choose "courier"-like fonts :) and,
therefore, takes advantages of this...for example, most of the
Windows-based editors don't allow you to move the cursor into the
blank space to the right of text...when you press the down arrow on a
long line - where the next line is shorter - the cursor "jumps" to the
end of that line...well, no, it would be good to have a more direct
way of doing things where "cursor down" simply moves the cursor
directly down...you get the idea, I think...something that's
delibrately simple, like Notepad (not some full blown "bells and
whistles" IDEs ;), but is targetted specifically at programming
tasks...
> However, I enjoyed your summary overall. Nicely done.
Ah, well...even if I'm totally wrong, I at least make it an
interesting read that I might get away with it that none of you
particularly care if it's wrong or not...hehehe ;)
Beth :)
- Next message: Beth: "Season's Greetings"
- Previous message: Bx. C: "Re: I have a problem on how to print the PSP seg."
- In reply to: Rally: "Re: Does anyone know how to do this"
- Next in thread: Nathan C. Baker: "Re: Does anyone know how to do this"
- Reply: Nathan C. Baker: "Re: Does anyone know how to do this"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]