asm or to c ???

Chalma

Joined May 19, 2013
54
matter of preference. I don't really care for ASM and I know it's bad but I don't want to invest time in it either. For me it is much easier in C. Also what compiler you link with mplab matters a lot too. For example it takes a bit more work with the free xc8 compiler but you could easily do what said about the 2 PWM outputs. If you invest some money, I have the CSS compiler and it literally does the job for you with predefined functions. Have fun and hope everything works out.
 

ErnieM

Joined Apr 24, 2011
8,377
For my course project on the PDP8, I wrote a program to play chess against the computer.
When required you could request a printout on the Teletype of the chess board and pieces. It took a long time to print.

Total memory on the PDP8/S was 4k.

I don't remember how much memory the program needed but it was all written in ASM.
C wasn't available then. FOCAL would have been the only other option.
Wow, somneone else who used Focal. That was my first programming language.

We're old my friend. Very old.
 

nsaspook

Joined Aug 27, 2009
13,079
Wow, somneone else who used Focal. That was my first programming language.
It's amazing that some of the features from old computer languages still survive in todays stuff. One of the oldest ones I used was called SNOBOL. It was used in what today would be called 'data mining', searching large text files for key words and relationships of persons and things to track activities from intelligence files from mainly transcribed radio and TV broadcasts from a little country famous for cigars, rum and baseball players.

http://www.snobol4.org/
 

MrChips

Joined Oct 2, 2009
30,706
Besides FOCAL, I have programmed in FORTRAN, BASIC, COBOL, SNOBOL, ALGOL, Pascal, Forth and my favorite of all is APL.
 

nsaspook

Joined Aug 27, 2009
13,079
Besides FOCAL, I have programmed in FORTRAN, BASIC, COBOL, SNOBOL, ALGOL, Pascal, Forth and my favorite of all is APL.
Of all the quirky languages I have ever used Forth was the most unique as it could easily modify its run-time source code in the run buffer while executing a task. It still runs deep in a few machines at work for an embedded machine motion scripting language that once in a while I have to pull that nugget out of my brain that says 'Forth' to create a test routine to diagnose some controller problem. I think the language was created by Satan to punish us for our evil ways but there are devotes who seem to worship it. If the only HLL choice was Forth, I would chose toggle switches instead.
 

djsfantasi

Joined Apr 11, 2010
9,156
Besides FOCAL, I have programmed in FORTRAN, BASIC, COBOL, SNOBOL, ALGOL, Pascal, Forth and my favorite of all is APL.
I've coded in FORTRAN (on both IBM and DEC systems), BASIC (many variants), ALGOL, DECSystem20 and Tandy Model II ASM, COBOL, Pascal, RPG, Java, Perl, and C. Plus I'm sure there are some I forgot. LISP just came to mind. I also created my own languages, one similar to XML/XSL for report generation and one called A-Code, for robotic control. The first system I programmed on was an IBM 1130 Model A1.

ASM and C each have their place. I'd start with C and move to ASM. Unlike others, IMHO it's easier to learn programming algorithms in C, and then apply them in ASM.

loop: goto loop
 

ErnieM

Joined Apr 24, 2011
8,377
My history of computing:

First computer experience was summer school between 7th & 8th grade: we had combined junior & senior high school grades 7-12 and I took a class in programming (youngest kid there, still pre algebra, and I aced it). Has a PDP-8L with an 8K pack of core memory. That ran 4 high schools, ours and 3 others thru “acoustic modems” where you literally plugged the handset into a speaker and mic holder. Once a day or so we’d get a call to tap a phone, meaning take it out of the holder and whack it on your hand to loosen up the carbon particles in the phone’s mic. By 9th or 10th grade we got a HP tower relay rack tower) with a magnetic drum.

Languages were Focal, Basic (HP, Quick, Visual, Tiny, Sinclair, many many more), PL1, Fortran, C, C++, Java. I'm sure I've shorted that list.

Assembly on the IBM 36, Z80, COSMAC 1802, 8080, Pentium (with Windows), baseline PICs. I'm sure I've shorted that list too.

Program entry via teletype, video display terminal, punch cards, keyboards. (Yet to try the Scotty method of just speaking “Hello Computer.”)

Storage on paper tape, magnetic drum, punch cards, paper (when "hand assembling" code by looking up opcodes), EPROM , ROM, cassette tape, floppies from 8”, 5¼” 3½”, various hard drives starting in the low megabytes (100?), flash, thumb, the “cloud.”

Most influential machines were the Commodore 64 (a wonderful device way ahead of it’s time) and some raggedy HP(?) tower running Windows 3.11. Bought my first spreadsheet program for the C64 and did good work with it. Windows inspired me to go out and buy not only my first PC (Windows 95 baby!) plus Visual Basic version 3 or so ($300?), and kept it current thru the years.
 

Thread Starter

jimmiegin

Joined Apr 4, 2014
49
Hello Again guys, I have been away from the thread for a while. During this time I have been reading from, pic programming with c, I am vey impressed with this book so far. I have a question about hi-tech c. I would like to know if there is a reference point for what header files should be #include for a given function. Is there such a thing?
 

Thread Starter

jimmiegin

Joined Apr 4, 2014
49
matter of preference. I don't really care for ASM and I know it's bad but I don't want to invest time in it either. For me it is much easier in C. Also what compiler you link with mplab matters a lot too. For example it takes a bit more work with the free xc8 compiler but you could easily do what said about the 2 PWM outputs. If you invest some money, I have the CSS compiler and it literally does the job for you with predefined functions. Have fun and hope everything works out.
Hi I have ccs and mplab and I read somewhere that there is a manual to find relevant .h files a particular function but I cant find it so my question about ccs is similar to my post above. Where is it? Thank you all for your input. I have not even begun to digest all of the posts yet. :)

Ps. I also have a copy of flowcode 4 but this seems to be somewhat of a cop out so I have not even bothered with it.....It just feels like I would be cheating myself. Has anyone ever bothered to use this method?
 
Last edited:

ErnieM

Joined Apr 24, 2011
8,377
I've seen Flowcode, tried a small thing once when helping someone out. It seems to be a rudimentary language intended to give the ability to program to people who don't know how to program. I had the feeling (not proof) it would not scale up to larger projects.

As far as which h files to #include, that should be specified in whatever reference manual/pdf/chm you read to learn about whatever specific function you wish to use.

Those functions that are part of the C standard will turn up in a Google search. For example, if you look up fprint() just about anywhere it will lead you to the stdio.h file.
 

Chalma

Joined May 19, 2013
54
Hi I have ccs and mplab and I read somewhere that there is a manual to find relevant .h files a particular function but I cant find it so my question about ccs is similar to my post above. Where is it? Thank you all for your input. I have not even begun to digest all of the posts yet. :)
I'm not exactly sure what you mean, but my CCS book contains a hugh list of built in functions and libraries. You can browse through select a function which meets your needs and the book tells you which libraries are required (if any) it's syntax and also an example on how to use it. If google doesn't work, once you get bubbled in it usually doesn't. The actual website of theirs has a semi active forum which appears helpful. Good luck and have fun!
 
Top