• Re: Low-level vs. High-level programming (was My First Computer)

    From wildstar@wildstar128@hotmail.com to comp.sys.cbm on Tuesday, July 01, 2003 08:50:50
    From Newsgroup: comp.sys.cbm

    "Randy McLaughlin" <randy@nospam.com> wrote in news:Kn8Ma.67890$XE4.36276@fe05.atl2.webusenet.com:


    This is no troll, just a quick lesson in program developement:

    I stick by what I said, in a "standard" C program and it's compiled
    files all are computer programs: The original (source) file is a
    program that the C compiler uses to compile (generate) an asm object
    file. The original file is the C program, the next file is an asm
    source file, but is still the object file of the C compiler (at least normally even if it is hidden) this file is "owned by the C programmer
    but is in fact an asm program. This file is "assembled" by the
    assembler into another object file (usually a binary relocatable file)
    which is a "machine language" program that is normally "executed" by
    a linker which combines it with both specified and unspecified other
    files to create another "object" file (with windows it's usually an
    exe file). This final file (i.e. windows exe) is a program, but is
    still just a "data file" that windows reads, interprets (mainly just
    the header) and loads into memory according to the description of the
    header and then finally can execute.

    At every point the program being executed has an "ownership" that
    follows the original C program, but only the first file is a C
    program. Every other object file should fail in it's structure to be
    defined as a C program.

    The point is that calling a program just a text file or a "data" file
    is ignoring the truth: People falsely assume that the program they
    write (in this case a C program) is a program the CPU executes
    directly. Almost without exception no program that programmers write
    are directly executed, I can say I have written programs that are
    directly executed but not often.


    In Windows, its takes a little more perhaps than with a simple Commodore
    64 that runs on a Commodore 64 is pretty simple. You compile the files
    from text to 6502 machine language binary. Listen very carefully, once
    the code is compiled from the text file (source file), the end product is
    an Assembler object that is then Assembled into actual machine language binary. Essentially the process is converting LDA into
    Hexadecimal/binary. Since LDA is still text. The step now, is to convert
    the text into the actual opcode. Which would read out as any of the
    following, $A9,$A5,$B5,$AD,$BD,$B9,$A1,$B1 (This is precisely based on
    6500 series Instruction set). So once we have that, then the program is
    an executable program by the CPU.

    It really doesn't matter. In order for ASCII text files to be executed,
    one should have a conversion process to convert text to machine before execution. If you go about directly executing text, You must use the
    exact character codes that in hexadecimal is the same as the machine
    opcode and carry all the associated information that an opcode requires.

    Ok, before I proceed - I'll pause here. Are you following what I am
    getting at. I don't want to proceed unless you are following what I am
    getting at here and fully understand to this point.

    --- Synchronet 3.18b-Win32 NewsLink 1.113
  • From wildstar@wildstar128@hotmail.com to comp.sys.cbm on Tuesday, July 01, 2003 08:57:11
    From Newsgroup: comp.sys.cbm

    pausch@saaf.se (Paul Schlyter) wrote in news:bdqake$2cta$1
    @merope.saaf.se:


    We do have the term "locomotor" though -- it's a small locomotive,
    driven by a (comparatively small) diesel engine. It's intended use
    is to push around a fairly small number of railway cars at a time in
    a station area, to hook up and unhook trains.

    A locomotive is a rail vehicle with the sole purpose to provide
    traction power to pull (railway) cars. The locomotive carries
    neither passengers nor cargo -- to do that, you must hook up cars to
    the locomotive.

    If we combine a locomotive and a (railway) car in one the same
    vehicle, we'll get a "railmotorcoach" or "motorcar": it produces
    traction _and_ carries passengers and/or cargo.

    Therefore the trolley isn't a locomotive: it carries (a few)
    passengers.

    Finally, we have the "rail-car": it's an ordinary road car which has
    been rebuilt: its rubber wheels have been replaced by rail wheels.
    Its main purpose is to take inspection tours on the railway --
    consider it a special case of a motor-driven trolley.


    Actually it is. A passenger train would not be a locomotive if it
    followed your statement. A locomotive is any motive in the form of
    locomotion. A locomotive engine is used to push/pull the car. An engine
    does not have to have an operator on the unit. Come to Astoria, Oregon
    and ride the trolley someday. This is one of the classic and original trolleys. This is a real piece of history so it might enlighten you. Well
    if not, it will be for fun I guess.



    --- Synchronet 3.18b-Win32 NewsLink 1.113
  • From wildstar@wildstar128@hotmail.com to comp.sys.cbm on Tuesday, July 01, 2003 17:56:45
    From Newsgroup: comp.sys.cbm

    "Randy McLaughlin" <randy@nospam.com> wrote in news:4GiMa.473$eW6.196@fe03.atl2.webusenet.com:

    I used windows as an example of a full development cycle of a language
    such as C. I also stated that the process can and does vary. The
    point is that the assumption that the machine language compiled
    program is a C program is wrong, it is a "compiled" C program (as are
    all of the intermediate files). The most interesting part is in
    understanding what about the object files makes them programs: In a
    full system cycle the asm text file like the original C text file is a program that consists of a sequence of instructions for the assembler
    to interpret into an object file (usually relocatable binary file).
    The relocatable binary file is a program that the linker interprets
    into the final object file.

    What most people do not realize is the relocatable binary file program
    is not the $A9..$B1 (LDA), but instead is the binary codes that
    specify what libraries to search, what modules to call, what is internal/external etc. The binary machine code ($A9 etc.) is treated
    just as "text" except where relocation is needed. This in effect
    makes the relocatable program a binary markup language.

    All of the object files from the original C to the final executable
    are programs (notice I stated object to exclude list files etc.).



    Not unless it is binary. For example $AD (is just a hex code but take the
    $ away and convert AD to binary - it will be a series of 0s and 1s. But
    $AD is also $173 which in CBM's PETSCII character chart a funny looking
    90 degree angle ( like a lower left corner of square). Since I can not
    display it in standard ASCII. It is a CBM graphic character. So if you
    had 3 bytes as stated with a LDA instruction for absolute addressing in
    the form of LDA $65535 (Which will fall as an equivelent of PEEK(65535))
    Then $AD,$FF,$FF would be the code so the three character will have to be
    the lower-left corner of a square looking character plus characters with
    the CHR$(255) value. So if the text file does indeed follow the rules of
    the Instruction Set of the CPU then it can be executed from machine level right away for the most part. Ordinarily, text files will not execute
    properly in machine level and will often lock up the computer which will result in turning off the computer and restarting it. Even the most
    advance P4 processors from Intel still must follow this rule.

    That was part of what I was stating and aiming at. Yes, I understand your point about the source being the program. Well, it can be constued that
    way but ultimately the "real" program is the one that is readable and executable by the computer. C source is only the source code of the
    program. This is from a technical point as a computer can only
    read/execute one language and that is machine language. Other than that,
    we can construe all this higher level stuff written in text form as a
    program and is absolutely fine and correct to assume in the field but yet
    it will also be a mistake to not really know that CPUs can only read one language and execute. That language is called "machine language". This language is never the same from one series of processor to the next but
    is universal as all CPUs have its native tongue and that is its machine language. In short, machine language is native language of a computer.

    So I was simply noting that which may be the obvious but often overlooked
    and forgotten until something so basic as that hits someone across the forehead. Anyway, I wasn't trying to construe that source code should not
    be consider a program from an industry point of view but from a realistic point of view, one would need to take a step to lower level and
    understand the basics of computer hardware. It is hardly more the
    christmas lights that you can control which light turns on and which
    lights turns off. Just like on a billboard of lightbulbs.

    --- Synchronet 3.18b-Win32 NewsLink 1.113
  • From wildstar@wildstar128@hotmail.com to comp.sys.cbm on Tuesday, July 01, 2003 20:11:13
    From Newsgroup: comp.sys.cbm

    "Randy McLaughlin" <randy@nospam.com> wrote in news:l%jMa.156$AK1.109@fe04.atl2.webusenet.com:


    You are putting a definition on a computer program that does not
    exist. When you write a basic program on a commie it is not directly executed, it is just a "data file" to the interpreter yet it is a
    computer program. Remember that a computer program is a program that
    runs on a computer and a program is "a sequence of coded instructions
    that can be inserted into a mechanism (as a computer)" (quoted from www.webster.com). This may include, but not limited to the machine
    language of the target computer. The coded instructions may be
    tokens, ascii strings, or whatever as long as it it a sequence of instructions.


    I am not exactly putting a definition on a computer program. A computer program is a sequence of instructions that is processed. The fact is that
    any program must be processed down into machine language in order for the
    CPU to execute the task. So if it was written in high-level then it needs
    to come to the lowest level before it can be executed. In order for a
    text file to be directly executed without a "compiler" or "interpreter".
    It essentially has to be an ML program in the first place. A text editor
    can in theory write an ML program. If you know Assembly and how to read
    an ML monitor then you care carefully associate letters/characters with
    the correct CHR$ value to equal the decimal value of the opcode which is
    in hexadecimal. One can convert Decimal to Hexadecimal. Just a little of
    math. If you want to Load the Accumalator then you must associate it with
    a memory address or a value to the Opcode. I have done some ML in the
    past. In Assembly, LDA can be converted to several types of LDA opcodes
    and that is what the Hexadecimal codes are as shown earlier. LDA can be
    in several forms and uses and when an Assembly language file is saved (um Assembled), the end result is an ML executable. Just make sure the file
    name is correct and the file-type is correct when saving. In Windows,
    that would be an .EXE type file. In CBM, there is no .(extension). Just
    make sure its a PRG file according to CBM DOS. Otherwise, you would have
    to use a command like: LOAD"filename,s,r",8,1 (8 = device number, 1 =
    Drive number). Then type RUN.

    I am still familiar with the basics of it.

    Now, next time - read a little more carefully to what I wrote. It is very
    fine to consider source code (As in C/C++ and the actual BASIC text or
    its Tokenized File) a program but it can not be executed until it is at machine level. Machine Language files are directly executable.

    In reality, a machine language is technically the only computer
    "programming" language but from a very technical point but it doesn't
    matter. Since programs are what is executed by a processor. As it is the
    only language that creates lists of instructions that can be executed by
    a CPU. But only until they created high-level languages that takes text
    to represent whole series of routines in ML and develop a conversion
    process where keywords (as in BASIC,C/C++ and any other forms of high-
    level languages) and convert them into ML instructions. I am talking
    Machine Language. Now, this quickly made the statement that ML is the
    only way obsolete because high-level languages made it easier for us to instruct a computer in a more human-like form. Since we do not talk in hexadecimal or 0s and 1s. We talk in words so we developed a process or several processes to be exact to take text (words) and convert them down
    to words that computers can understand and that is series of 0s & 1s. A
    word for an 8 bit is often 8 bit wide. Now this became the beginning of high-level programming. Finally a new way to program computers in an
    indirect way. Since if you wanted to directly program computers (well in
    the most direct way), you would use Machine Language.

    Now, lovely it is now to talk directly to a Pentium 4. Just imagine how
    lovely it is to talk to one of those chips in machine language.



    --- Synchronet 3.18b-Win32 NewsLink 1.113
  • From Exegete@millers@noneofyourbusiness.com to comp.sys.cbm on Tuesday, July 01, 2003 22:42:24
    From Newsgroup: comp.sys.cbm



    wildstar wrote:
    "Randy McLaughlin" <randy@nospam.com> wrote in news:CzPLa.50998$XE4.8469@fe05.atl2.webusenet.com:


    "Exegete" <millers@noneofyourbusiness.com> wrote in message >>news:3EFFC282.9000308@noneofyourbusiness.com...
    <snip>
    A truck on a railroad car is the platform containing the wheels
    (including the wheels). Of course being totally off subject I have
    seen railroad cars that share trucks.




    Keep in mind that we are talking in the words of automotive not
    locomotives. Words are clearly using different meanings in different
    similar but different fields. In the field of automotives. A car is generally refers to a type of automobile.

    Chortle. And you presume to instruct us in the use of words after
    writing that???

    Roy

    Truck simply refers to a
    different type of automobile.

    I think we need to not cross-reference locomotive with automotive terms here. Otherwise, we will be mixing topics and add confusion. Anyway, we
    are rather off-topic for comp.sys.cbm.

    Just keep in mind there is no term call locomobile. Locomotives simply
    refer to both the field and the name that refers to trains, trolleys and
    all just as automobile referes to cars and trucks. Anyhow, a train and a trolley are both locomotives. I have at least a personal experience of
    being able to see both where I am at since they now have a riverfront trolley and a little passenger train that comes from Portland, Oregon on
    the weekend.




    -----= Posted via Newsfeeds.Com, Uncensored Usenet News =----- http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
    -----== Over 80,000 Newsgroups - 16 Different Servers! =-----
    --- Synchronet 3.18b-Win32 NewsLink 1.113
  • From Sam Gillett@samgillett@msn.com to comp.sys.cbm on Wednesday, July 02, 2003 22:58:08
    From Newsgroup: comp.sys.cbm


    Exegete wrote ...

    Chortle. And you presume to instruct us in the use of words after
    writing that???

    If I followed this thread right... Paul is a retired railroader. I also
    found it funny that wildstar would challenge him about railroad terms.

    IMHO, wildstar reads too little before writing too much. ;-)

    Best regards,

    Sam Gillett aka Mars Probe @ Starship Intrepid 1-972-221-4088
    Last 8-bit BBS in the Dallas area. Commodore lives!





    --- Synchronet 3.18b-Win32 NewsLink 1.113
  • From wildstar@wildstar128@hotmail.com to comp.sys.cbm on Thursday, July 03, 2003 09:19:33
    From Newsgroup: comp.sys.cbm

    "Sam Gillett" <samgillett@msn.com> wrote in news:4sJMa.12663$JY1.11720@nwrddc01.gnilink.net:


    Exegete wrote ...

    If I followed this thread right... Paul is a retired railroader. I
    also found it funny that wildstar would challenge him about railroad
    terms.

    IMHO, wildstar reads too little before writing too much. ;-)

    Best regards,

    Sam Gillett aka Mars Probe @ Starship Intrepid 1-972-221-4088
    Last 8-bit BBS in the Dallas area. Commodore lives!


    Well, this trolley is very clearly a locomotive Trolley. It is one that
    is VERY Historical. Anyway, I seen this thing. I been on this thing. Now
    we have a little passenger train thing coming into town. Locomotor is a motorized locomotive. The locomotive pushes and pulls the trolley. This
    is not a modern trolley but a classic and very historical trolley.

    It is not really a challenge to him about the term. Just the fact that
    it is not one of these modern trolleys. It is really old. Most of the
    original engineers who worked on these things are clearly very old or
    dead by now. It was simply restored and brought back to service for
    historic purposes. Anyway, this trolley is on a railroad. Since Astoria
    stills has the Northern Burlington railroad itself. The trolley was
    built in 1913. God knows when the railroad was placed in but it is
    clearly known that it was there in the 1920s. It was the only way to
    take out the big fire in Astoria then.

    A picture can be found at the following links: http://www.astoria-usa.com/astoria_trolleycar.html http://www.oldoregon.com/Pages/AstoriaRiverfrontTrolley.htm http://www.oregonvos.net/~cmarcone/Pages/Astoria-Shipyard-Theater-Downtow n-Trolley.htm

    It uses a small locomotive engine. Anyway a locomotor is a type of
    locomotive engine. An engine is aka motor when it is electrically or gas powered. A steam engine in just another type of locomotive engine.
    Locomotive has to do with push/pull. The Astoria trolley is clearly a locomotive as it is definitely rail road based and goes both direction.
    Like any of the old early 1900s trolleys. The trolley does not just turn around.

    This trolley is clearly based on the locomotive concepts of trains. It
    just happens to use an Electric locomotive motorized-generator in
    contrast to a diesle. To a degree, he may be correct but just sounded a
    little bit awkward on the statement which was interpreted as saying a
    locomotor is not a locomotive. I apologize if I construed the statement
    that way and he wasn't meaning it that way.

    I would constue this as a motorized locomotive in constrast to a steam locomotive. Anyway, this thread has been offtopic for some time.


    --- Synchronet 3.18b-Win32 NewsLink 1.113
  • From David Newman@davidnewman9@nospayahoo.com to comp.sys.cbm on Friday, July 04, 2003 21:15:30
    From Newsgroup: comp.sys.cbm

    Ouch... wow, guys. Painful!


    "Peter Karlsson" <petekarl@online.no> wrote in message news:oprq001mqvqawxb3@news.online.no...
    Randy McLaughlin <randy@nospam.com>:

    At least I know how to read a dictionary.

    Well, that doesn't help unless you understand the contents of it.

    HTML is not programming, not even with the dictionary definition you
    brought forward. Live with it. You don't have to be ashamed of having been proved wrong, you're not the only one.

    --
    \\//
    Peter - http://www.softwolves.pp.se/

    I do not read or respond to mail with HTML attachments.


    --- Synchronet 3.18b-Win32 NewsLink 1.113
  • From M. Pender@mpender@hotmail.com to comp.sys.cbm,comp.sys.apple2,rec.games.video.classic,comp.os.cpm on Wednesday, July 16, 2003 17:22:02
    From Newsgroup: comp.sys.cbm

    Randy McLaughlin <randy@nospam.com> wrote in message news:Pp_Ka.616$Im5.226@fe03.atl2.webusenet.com...

    There are lots of strange (and weird) computer programming languages, most all of these languages are history, RPG and others that had big enough support (IBM in the 60's and 70's is as strong as it got) continue to be
    used in one way or another.

    Look at LOGO, a non computational computer programming language
    that was little more than a toy (the same basic language was written into some toys).

    LOGO had a very stable and efficient implementation for recursion that
    allowed it to run on very limited microcomputers. IMHO it would be
    difficult or impossible to find any "serious" language of the day that could handle recursive algorithms as efficiently with the limited memory space,
    stack and CPU speed of the 1980s Apple II.

    There were other implementations of LISP available for the Apple II (e.g.
    Owl Lisp), but they were not nearly as stable.

    - Mike


    --- Synchronet 3.18b-Win32 NewsLink 1.113