jagomart
digital resources
picture1_Assembly Language Pdf 186691 | 02 Proglangnotes


 166x       Filetype PDF       File size 0.08 MB       Source: plg.uwaterloo.ca


File: Assembly Language Pdf 186691 | 02 Proglangnotes
a short history of programming languages 1940sb50s programming is done directly in machine language and later a few notes on c and assembly language programming languages 1950s first high level ...

icon picture PDF Filetype PDF | Posted on 02 Feb 2023 | 2 years ago
Partial capture of text on file.
                                                                                                                                                                                                                    A"short"history"of""
                                                                                                                                                                                                          programming"languages"
                                                                                                                                                                                   •    1940sB50s:"""
                                                                                                                                                                                          –  Programming"is"done"directly"in"machine"language"and"(later)"
                                             A"few"notes"on"C++"and"                                                                                                                          assembly"language"
                                             programming"languages"                                                                                                                •    1950s:""
                                                                                                                                                                                          –  First"“high"level"languages”:"FORTRAN,"LISP,"and"COBOL"
                                                               Supplementary"notes"                                                                                                              •  All"are"sUll"in"common"use!"
                                                                                                                                                                                                 •  FORTRAN"designed"for"science,"LISP"(Scheme/Racket)"for"CS,"COBOL"for"
                                                                                    "                                                                                                               business"
                                                                     CS246"Fall"2012"                                                                                              •    1960s:""
                                                                       Mike"Godfrey"                                                                                                      –  First"aXempt"to"define"clean,"abstract"imperaUve"languages"
                                                                                                                                                                                                 •  esp."Algol,"which"has"many"descendents"(Pascal,"Turing)"
                                                                                                                                                                                          –  First"objectBoriented"language:"Simula67"(for"simulaUons)"
                                                           A"short"history"of""                                                                                                                                     A"short"history"of""
                                                programming"languages"                                                                                                                                    programming"languages"
                          •    Early"1970s,"on"big"UmeBsharing"computers:"                                                                                                         •    Meanwhile,"in"the"late"1970s"on"the"first"micros:"
                                –  C"and"Unix"coBdeveloped"at"AT&T"Bell"labs"                                                                                                             –  BASIC"(designed"in"1960s,"but"came"into"use"in"1970s)"
                                       •  Kernighan,"Ritchie,"Thompson,"…"                                                                                                                –  Small,"simple"procedural"language"designed:"
                                –  C"is"a"breakthrough!"(as"is"Unix)"                                                                                                                            •  to"be"very"easy"to"learn"
                                       •  Can"write"very"efficient"code"directly"                                                                                                                  •  to"run"on"small"computers,"small"RAM,"slow"chip"
                                       •  Can"think"of"C"as"being"reasonably"portable"highBlevel"assembly"                                                                                –  Usually"interpreted,"not"compiled"
                                           language"                                                                                                                                      –  A"breakthrough"is"the"burgeoning"new"micro"market"of"the"late"
                                                                                                                                                                                              1970s"(pre"IBMBPC/Microsoe),"esp."games"
                                –  C"is"a"simple"but"very"powerful"language,"but"                                                                                                                •  Altair,"Apple"][,"Commodore"PET,"TRSB80,"etc"
                                       •  No"support"for"userBdefined"higherBlevel"abstracUons"                                                                                                   •  Microsoe’s"first"product"was"a"BASIC"interpreter"wriXen"largely"by"Bill"
                                       •  Very"easy"to"make"hardBtoBfind"bugs"                                                                                                                       Gates"and"Paul"Allen"…"they"had"to"buy"an"OS"(QDOS)"from"someone"
                                                                                                                                                                                                    else"when"IBM"wanted"something"to"run"on"their"new"PC"
                                                                       A"short"history"of""                                                                                                                                                                        A"short"history"of""
                                                           programming"languages"                                                                                                                                                                     programming"languages"
                               •     Early"1980s:""                                                                                                                                                                        •     Early"1990s:"
                                        –  C++"at"AT&T"Bell"labs"[Stroustrup]"                                                                                                                                                     –  Java"at"Sun"Microsystems"[Gosling]"
                                                •  ASNI"std"1998,"updated"2003,"C++0X"coming"real"soon"now"
                                        –  Create"a"powerful"and"efficient"OO"language""                                                                                                                                             –  Idea:""
                                                •  …"that"is"backward"compaUble"with"ANSI"C"(unlike"ObjecUveC)"                                                                                                                            •   OO"language"that"will"work"“everywhere”"
                                                •  Can"roll"your"own"strongly"typed"abstracUons!"                                                                                                                                          •   Take"best"ideas"of"C++,"remove"complicated"and"error"prone"features"
                                                •  Built"on"experience"with"other"OO"langs"(Simula,"Smalltalk)"                                                                                                                            •   Remove"many"lowBlevel"decisions"from"programmer"
                                        –  C++"is"a"big,"powerful,"and"very"complicated"language"                                                                                                                                  –  Portability"is"achieved"through"a"“virtual"machine”,"like"a"
                                                •  It's"the"Swiss"army"knife"of"OOP"                                                                                                                                                    special"OS"that"sits"on"top"of"the"real"OS"
                                                •  WriUng"a"good"compiler"for"it"is"very,"very"hard"                                                                                                                                       •   Need"to"port"the"VM"to"mulUple"plaqorms,"but"only"once"
                                                •  Most"programmers"use"only"a"subset"of"the"features"                                                                                                                                             –  …"no"need"to"port"the"applicaUon"code"
                                                •  “Shoot"yourself"in"the"foot"less"oeen"…"but"…”"                                                                                                                                                 –  Java"programs"should"work"the"same"on"any"VM"
                                                                                                                                                                                                                                           •   But"performance"is"always"a"concern"with"virtualizaUon"
                                                                       A"short"history"of""                                                                                                                                                                        A"short"history"of""
                                                           programming"languages"                                                                                                                                                                     programming"languages"
                               •  Late"1990s:"                                                                                                                                                                             •  Industrial"programming"today:"
                                        –  Microsoe".NET"and"C#"                                                                                                                                                                   –  Old"days:""design"a"monolithic"system"to"run"on"top"of"a"
                                                •  Roughly,"try"to"do"the"same"thing"as"Java,"but"with"several"years"of"                                                                                                                desired"OS"on"parUcular"hardware"
                                                    hindsight"and"experience"in"watching"Java"                                                                                                                                     –  These"days:""Design"a"piece"of"a"component"that"interacts"
                                        –  Emergence"of"the"idea"of"plaqorm"/"framework"as"the"                                                                                                                                         with"a"bunch"of"other"peer"components"across"various"
                                             deployment"target,"not"the"raw"OS"and"hardware"                                                                                                                                            networks"and""the"cloud""
                                                                                                                                                                                                                                           •  Underlying"OS"is"(mostly)"irrelevant!"
                                                                                                                                                                                                                                           •  J2EE,"web"services,"CGIs,"scripUng"langs,"SOA"
                                                                                                                                                                                                                                           •  InteracUon"is"assumed"via"APIs,"services,"XML,"hXp"
                                                                   ScripUng"languages:""                                                                                                                                           We’re"going"to"study"C++"cos"…"
                                    Python,"Perl,"PHP,"BASH,"and"friends"
                                                                                                                                                                                                                           •     The"C/C++/Java"memory"model"dominates"all"others"in"
                               •     In"the"old"days:"                                                                                                                                                                           industry""
                                        –  Monolithic"programs"did"heavy"lieing"
                                        –  CoBordinaUon"/"interacUon"is"ad"hoc,"oeen"using"“shell"scripts”"to"                                                                                                             •     C++"supports"full"objectBbased"and"objectBoriented"styles"
                                             move"files"around,"start"processes,"etc"                                                                                                                                             of"programming"(as"does"Java)"
                               •     These"days,"scripUng"languages"are"much"more"powerful,"                                                                                                                               •     C++"is,"roughly"speaking,"a"superset"of"C,"so"it’s"less"
                                     support"OO"and"modules"                                                                                                                                                                     stress"for"you"to"learn"
                                        –  Easy"to"create"small"to"medium"sized"programs"(<100"KLOC)"
                                                •   Much"of"the"game"CivilizaUon"is"in"Python!"                                                                                                                            •     C++"supports"lots"of"interesUng"language"design"features"
                                        –  But"are"typically"weakly"typed"(hard"to"debug)"and"slow"…"                                                                                                                              –  Raw"pointers,"mulUple"inheritance,"templates"
                                        –  They"are"popular"because"many"“scriptBlike”"tasks"can"be"done"much"                                                                                                                     –  Java"has"limited"or"so"support"for"these"by#design#
                                             more"quickly"and"simply"than"a"tradiUonal"HLL"like"C"or"Java."
                                                 What"you"have"seen"so"far"                                                                                                                                                                                     Some"free"advice"
                               •  CS136"(or"similar)"                                                                                                                                                                      •  General"rules"of"thumb"for"C++"programming:"
                                        – Basic"C"programs,"CBlike"syntax"(for"loops),"compiling"                                                                                                                                  – Find"a"set"of"basic"language"features"that"get"you"
                                             C"in"Unix"with"gcc"                                                                                                                                                                        where"you"want"to"go,"and"use"those"
                                                                                                                                                                                                                                           •  “There’s"more"than"one"way"to"do"it”"is"a"terrible"way"to"
                               •  C++"this"term"                                                                                                                                                                                               design"a"language"(Perl)"
                                        – Hello"world,"compiling"in"Unix"with"g++"                                                                                                                                                 – Stay"away"from"complex,"subtle,"powerful,"“cool”"
                                        – Basic"types,"int"vs"double,"[file/formaxng]"IO"                                                                                                                                                features"as"they"will"make"your"life"difficult"in"the"long"
                                        – FuncUons,"decls,"params,"locals,"callBbyBref/value,"                                                                                                                                          term"
                                             overloading"
                                        – Arrays"[are"evil;"pls"use"vectors]"                                                                                                                                                              e.g,,"comma"operator,"mulUple"inheritance"
                                        – Classes/structs"[they’re"the"same"in"C++**]"                                                                                                                                                     But"learn"how"to"use"them"judiciously"later"on"
                                                                                                                                                                                                                                           "
                                              Some"free"advice"                                                                                                            Some"free"advice"
                     •   Always"use"curly"brackets"for"if/switch/for/                                                                             •  struct"or"class?"
                         while bodies,"even"if"they"are"only"one"liners"                                                                               – If"you’re"going"to"program"in"a"procedural"style"and"
                     •   Use"++,"BB"operators"as"a"standalone"stmt,"not"part"of"                                                                           not"define"methods"per"enUty"kind,"then"use"
                         some"long"expression"                                                                                                             structs"to"organize"you"data"
                                                                                                                                                       – If"you’re"going"to"program"in"an"OO"style"and"define"
                     •   Prefer"for"over"while"for"loops,"if"a"for"“makes"                                                                                 methods"per"enUty"kind,"then"use"classes"to"
                         sense”"                                                                                                                           organize"your"data"and"operaUons"on"them"
                               for (int i=0; i
						
									
										
									
																
													
					
The words contained in this file might help you see if this file matches what you are looking for:

...A short history of programming languages sbs is done directly in machine language and later few notes on c assembly s first high level fortran lisp cobol supplementary all are sull common use designed for science scheme racket cs business fall mike godfrey axempt to dene clean abstract imperauve esp algol which has many descendents pascal turing objectboriented simula simulauons early big umebsharing computers meanwhile the late rst micros unix cobdeveloped at t bell labs basic but came into kernighan ritchie thompson small simple procedural breakthrough as be very easy learn can write ecient code run ram slow chip think being reasonably portable highblevel usually interpreted not compiled burgeoning new micro market pre ibmbpc microsoe games powerful altair apple java sun microsystems asni std updated x coming real soon now create oo idea that backward compauble with ansi unlike objecuvec will work everywhere roll your own strongly typed abstracuons take best ideas remove complicated ...

no reviews yet
Please Login to review.