Announcement

Collapse

Forum Rules and Etiquette

Our mission ...

This forum is part of our mission to promote the preservation of vintage computers through education and outreach. (In real life we also run events and have a museum.) We encourage you to join us, participate, share your knowledge, and enjoy.

This forum has been around in this format for over 15 years. These rules and guidelines help us maintain a healthy and active community, and we moderate the forum to keep things on track. Please familiarize yourself with these rules and guidelines.


Rule 1: Remain civil and respectful

There are several hundred people who actively participate here. People come from all different backgrounds and will have different ways of seeing things. You will not agree with everything you read here. Back-and-forth discussions are fine but do not cross the line into rude or disrespectful behavior.

Conduct yourself as you would at any other place where people come together in person to discuss their hobby. If you wouldn't say something to somebody in person, then you probably should not be writing it here.

This should be obvious but, just in case: profanity, threats, slurs against any group (sexual, racial, gender, etc.) will not be tolerated.


Rule 2: Stay close to the original topic being discussed
  • If you are starting a new thread choose a reasonable sub-forum to start your thread. (If you choose incorrectly don't worry, we can fix that.)
  • If you are responding to a thread, stay on topic - the original poster was trying to achieve something. You can always start a new thread instead of potentially "hijacking" an existing thread.



Rule 3: Contribute something meaningful

To put things in engineering terms, we value a high signal to noise ratio. Coming here should not be a waste of time.
  • This is not a chat room. If you are taking less than 30 seconds to make a post then you are probably doing something wrong. A post should be on topic, clear, and contribute something meaningful to the discussion. If people read your posts and feel that their time as been wasted, they will stop reading your posts. Worse yet, they will stop visiting and we'll lose their experience and contributions.
  • Do not bump threads.
  • Do not "necro-post" unless you are following up to a specific person on a specific thread. And even then, that person may have moved on. Just start a new thread for your related topic.
  • Use the Private Message system for posts that are targeted at a specific person.


Rule 4: "PM Sent!" messages (or, how to use the Private Message system)

This forum has a private message feature that we want people to use for messages that are not of general interest to other members.

In short, if you are going to reply to a thread and that reply is targeted to a specific individual and not of interest to anybody else (either now or in the future) then send a private message instead.

Here are some obvious examples of when you should not reply to a thread and use the PM system instead:
  • "PM Sent!": Do not tell the rest of us that you sent a PM ... the forum software will tell the other person that they have a PM waiting.
  • "How much is shipping to ....": This is a very specific and directed question that is not of interest to anybody else.


Why do we have this policy? Sending a "PM Sent!" type message basically wastes everybody else's time by making them having to scroll past a post in a thread that looks to be updated, when the update is not meaningful. And the person you are sending the PM to will be notified by the forum software that they have a message waiting for them. Look up at the top near the right edge where it says 'Notifications' ... if you have a PM waiting, it will tell you there.

Rule 5: Copyright and other legal issues

We are here to discuss vintage computing, so discussing software, books, and other intellectual property that is on-topic is fine. We don't want people using these forums to discuss or enable copyright violations or other things that are against the law; whether you agree with the law or not is irrelevant. Do not use our resources for something that is legally or morally questionable.

Our discussions here generally fall under "fair use." Telling people how to pirate a software title is an example of something that is not allowable here.


Reporting problematic posts

If you see spam, a wildly off-topic post, or something abusive or illegal please report the thread by clicking on the "Report Post" icon. (It looks like an exclamation point in a triangle and it is available under every post.) This send a notification to all of the moderators, so somebody will see it and deal with it.

If you are unsure you may consider sending a private message to a moderator instead.


New user moderation

New users are directly moderated so that we can weed spammers out early. This means that for your first 10 posts you will have some delay before they are seen. We understand this can be disruptive to the flow of conversation and we try to keep up with our new user moderation duties to avoid undue inconvenience. Please do not make duplicate posts, extra posts to bump your post count, or ask the moderators to expedite this process; 10 moderated posts will go by quickly.

New users also have a smaller personal message inbox limit and are rate limited when sending PMs to other users.


Other suggestions
  • Use Google, books, or other definitive sources. There is a lot of information out there.
  • Don't make people guess at what you are trying to say; we are not mind readers. Be clear and concise.
  • Spelling and grammar are not rated, but they do make a post easier to read.
See more
See less

Decided to start learnig C

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    I just looked it up and yes..........as I thought....
    even Python interpreter is written in "C"....

    "C" is "C" and there is noooooo substitute.....(or......... what do you think?)

    ziloo

    Comment


      #17
      Originally posted by ziloo View Post
      I just looked it up and yes..........as I thought....
      even Python interpreter is written in "C"....

      "C" is "C" and there is noooooo substitute.....(or......... what do you think?)

      ziloo
      Python is just a collection of other popular languages put in to create Python.

      I would have said there were no substitute for Forth!
      Generic and Amstrad CPC based Programs written in Turbo Pascal 3

      Comment


        #18
        Originally posted by CP/M User View Post
        .....

        I would have said there were no substitute for Forth..
        Just wait for Dwight to read your post!


        ziloo

        Comment


          #19
          Originally posted by Agent Orange View Post
          Back in the day ADA was the thing at the Pentagon. Might be still around in some areas.
          Still is, if you're into mission-critical applications. DoD dropped the Ada mandate in 1997, but there's still a lot of stuff out there written in it; for example, the ISS flight software.

          The problem with Ada was one of availability to the general programming community. I don't think there was a publicly available (free) compiler available until the late 90s. There are a number of Ada for microprocessor initiatives, including at least one RISC-V flavor, so it's doable. But then, you have the vendor's development suite libraries written in C, so it's not really a great option today.

          It's somewhat the same situation as was back in the 1960s with Algol and FORTRAN. Algol is by far the superior language in terms of features and readability, but FORTRAN was "cheap and dirty" and you could get it for just about any platform, including dinosaurs like the IBM 650 (FORTRANSIT). ACM allowed both FORTRAN and Algol in its "Collected Algorithms" periodical to bridge the gap (Europe took more to Algol, while the US was FORTRAN-centric).
          Last edited by Chuck(G); November 7, 2020, 01:39 PM.
          Reach me: vcfblackhole _at_ protonmail dot com.

          Comment


            #20
            Originally posted by ziloo View Post
            Just wait for Dwight to read your post!


            ziloo

            I will admit it's a big transition from 'coding a System' to 'coding for the System'.
            Generic and Amstrad CPC based Programs written in Turbo Pascal 3

            Comment


              #21
              Originally posted by Chuck(G) View Post
              Low-end MCUs are generally best done in assembly, as speed and memory are minimal and you may be counting cycles for timing.
              I'm actually kind of amazed how close C comes to assembly on the AVR 8-bits; if you need cycle *exactness* then, yeah, either pure assembly or slapping in some embedded ASM is a thing you'll need to do. But it's still pretty incredible that you can use a "higher-level" language on an eight-bit CPU and still do "a useful thing" several million times a second.
              My Retro-computing YouTube Channel (updates... eventually?): Paleozoic PCs Also: Blogspot

              Comment


                #22
                Originally posted by Agent Orange View Post
                Last year I bought a C++ book from Amazon and it came from Walmart. It was supposed to have the CD/DVD with it but I never received it. Still going round and round with Amazon and I don't think I'm going to win.
                what is the name of the book? there's the possibility I have the cd/dvd.

                yeah buying used books and expecting to get the disk usually results in melancholy. Once in a while I'm presently surprised though. That is if it/they don't wind up cracked in half!

                Comment


                  #23
                  someone mentioned Herb Schildt. In iirc C the Complete Reference he builds a C interpreter. Pretty groovy. It's real basic (not BASIC), but still pretty interesting.

                  Comment


                    #24
                    Originally posted by ibmapc View Post
                    I've played around with BASIC since about 1979 but never really got super deep into it. A few years ago, I bought a book about assembly, but couldn't stay awake reading it. So, late in September, I started looking for Online Courses for programming. I stumbled accross "C Programming with Linux" from Dartmouth College. I'm now three courses into a seven course program and learning a LOT! Has anyone here checked this out or completed all seven courses? I'd love to hear feedback and suggestions as to were to go after completion. C++? Python? Java? Other C courses?

                    If you click the picture, you'll see my progress so far.
                    I really like C for programming on old boxen and for gnawing on the bare metal. It's low-level enough that you can kind of intuit how it's going to look in assembly language as you write it, but it's a lot easier to read and way more portable.

                    The good ol' K&R book was updated for ANSI C some years (decades?) ago. That was the book that I cut my C-teeth on, and I still like it best. It's a no-nonsense book that just tells you what you need to know in an understandable and straightforward way, without a bunch of extra stuff.

                    Do take care with pointers and buffer overflows, though. There are some compilers that can somehow insert a piece of protected memory at the end of all your arrays/etc, so if you overflow them it will raise a segmentation fault instead of just randomly smashing other variables and continuing. I can't remember what it was called or how it worked, though.

                    And be careful and systematic with your dynamic memory allocation. I find it useful to use a malloc replacement that keeps track of all your allocations and then complains at exit if you forgot to deallocate anything.

                    (Both of these debugging aids to be removed in production builds, of course.)

                    C doesn't try to save you from yourself in either of these regards. I read somewhere that like 90% of C debugging time is spent dealing with memory allocation and buffer overflow issues, so if you can avoid them to begin with or make them easier to notice, you'll save yourself a lot of time and hair-pulling.
                    Last edited by bladamson; November 7, 2020, 06:08 PM.
                    -- Lee

                    If you get super-bored, try muh crappy Odysee channel: Old Computer Fun!

                    Looking For: QBus SCSI Controller, Type 4 HDC for Tandy II/12/16/6000, Mac IIci drive sled, PC-era Tandy stuff, Old Unix Stuff, Serial Terminals (HP and DG in particular)

                    Comment


                      #25
                      Originally posted by Agent Orange View Post
                      Back in the day ADA was the thing at the Pentagon. Might be still around in some areas.
                      I still have nightmares about Ada. Oh god. Such an unpleasant language named after such an interesting historical figure. Poor Ms. Lovelace's legacy is now forever tainted by the language. :3
                      -- Lee

                      If you get super-bored, try muh crappy Odysee channel: Old Computer Fun!

                      Looking For: QBus SCSI Controller, Type 4 HDC for Tandy II/12/16/6000, Mac IIci drive sled, PC-era Tandy stuff, Old Unix Stuff, Serial Terminals (HP and DG in particular)

                      Comment


                        #26
                        Originally posted by bladamson View Post
                        I still have nightmares about Ada. Oh god. Such an unpleasant language named after such an interesting historical figure. Poor Ms. Lovelace's legacy is now forever tainted by the language. :3
                        CUTLASS was much easier to write real time control programs in, shame that wasn't widely promoted either. So easy to use and read.

                        A task could be scheduled to run on a clock and a three term controller was as simple as writing a=INCPID(Gain,IAT,DT). It automatically handled setting up all the dependant histories for the control functions and provided simple to code state machines for sequence controls, filters, I/O handling etc.

                        Still in use too.
                        Current fleet
                        TRS80 Model 4 - BBC B - Tatung Einstein - PCW9512 - PET 3032 - C64 - ZX81 - Spectrum 48K - Amiga A500 - Apple II europlus - Apple iMAC G3. Sharp MZ-80K. - IBM 5160 XT - Multibus 286/10 - Micro PDP 11/73 - Rainbow PC100A - MicroVax II - MicroVAX 3100, 3300, VAX 4000 VLC & 4000 Model 96 - AlphaStation 225 Apricot PC - Apple Performa 6200 - Apple Mac IIcx - Osborne 1 - ACT Sirius 1

                        Comment


                          #27
                          Originally posted by tipc View Post
                          what is the name of the book? there's the possibility I have the cd/dvd.

                          yeah buying used books and expecting to get the disk usually results in melancholy. Once in a while I'm presently surprised though. That is if it/they don't wind up cracked in half!
                          What I have is "Visual C++ 6" for Dummies (meaning me). It's written by Michael Hyman & Bob Amson (WTFRT2 anyway?). There is a chapter that explains the CD usage and a number to call at Hungry Minds Customer Care", which I just now discovered. I know I know, everyone is going to say I got the wrong book, but my tutor was off that day.
                          Surely not everyone was Kung-Fu fighting

                          Comment


                            #28
                            Originally posted by bladamson View Post
                            I still have nightmares about Ada. Oh god. Such an unpleasant language named after such an interesting historical figure. Poor Ms. Lovelace's legacy is now forever tainted by the language. :3
                            Well, the ISS hasn't fallen out of the sky yet and Nvidia is coding its automotive stuff in Ada, so it's still around. It's not a language that lends itself to coding "quickies". It's not a bad language for mission-critical stuff, unlike, say C.

                            C has been described by many people as a "high level assembly language" and indeed the original K&R is a good match to the PDP-11 instruction set. It's C and its descendants that's had a strong influence on computer architecture. For example, ISAs without a stack architecture used to be quite common. Not today. Legacy FORTRAN certainly doesn't require one.

                            Any JOVIAL programmers out there? That was another good one for embedded stuff--and easy to read and program, but mostly used by the military. Sad that it's fallen out of favor.
                            Reach me: vcfblackhole _at_ protonmail dot com.

                            Comment


                              #29
                              OP Here! Wow. Lots of great replies here. Thanks guys!! I've only quickly skimmed over all of them! One of the questions that came up was asking what hardware I wanted to program for. The answer to that is, well, mostly older stuff like PC XT and AT such as my 5155 and my 5162. The 5162 dual boots to DOS and ZENIX. I have played a very little with a C compiler on ZENIX and would like to do more there. Also, I've been playing with Arduino and other Micro controllers. Lately, I've been playing with Soarer's converter on a Pro-Micro converting a model F-XT keyboard to USB. In fact, that's what I'm typing on now. I found reverse engineered source code for Soarer's converter and have been able to compile it perfectly for the Pro-micro. I would like to tweak it so that it can also convert to AT protocol as well as USB so that I can connect the same XT keyboard to an AT computer or a newer USB capable machine without replacing the firmware completely on the Pro-Micro.

                              Someone mentioned that I wouldn't learn much C from seven classes. I think he misunderstood. It's not seven classes. It's SEVEN COURSES. Each course has a bunch of lectures and tests with a Final exam in each course. The EdX Program that Dartmouth College is using is pretty cool. The lectures are done with Code Cast. If you click that link I provided and cut and paste the following tiny bit of code, you can compile and run it to see the output.

                              Code:
                              #include<stdio.h>
                              int main(){
                                  printf("hello, world\n");
                                  return 0;
                                  }

                              It's a pretty good teaching tool. The main reason for going with an online course is that I need some structure and some goals to strive for to try to get a good foundation to build upon. The great thing about the Dartmouth program is that they get the student coding right away and keep building to more advanced programming problems. I don't yet understand enough to play manipulate the code for Soarer's converter, but I think I'm making headway.

                              Greg

                              Comment


                                #30
                                Originally posted by Chuck(G) View Post
                                ... It's not a bad language for mission-critical stuff......r.
                                Would you please explain what "mission-critical" means as far as
                                programming is concerned?

                                ziloo

                                Comment

                                Working...
                                X