Mips2c


Book Description

Programming in C is close to the machine and the language was originally designed to code an operating system. The approach I take is to start from the machine layer, though in less detail than in a computer organization or logic design book, using the MIPS instruction set to illustrate principles. The first part of the book uses C syntax as "pseudocode" while demonstrating how to convert high level language code to MIPS assembly language. The second part of the book introduces C in more detail, building on the MIPS part. While using C as "pseudocode" is not strictly in keeping with the spirit of pseudocode, which is meant to be sketchy and leave out a lot of detail, the idea is to introduce those not familiar with C-style languages to the notation ahead of the second part of the book where C is introduced properly. Why MIPS? The MIPS architecture is simple and relatively easy to understand, and in wide use in embedded systems. The SPIM simulator is a handy and free learning tool. Why C? It is in wide use, and closer to the machine than other popular languages with similar syntax. Learning the hardware-software interface in C is a lot easier than in a language with a managed memory system and complications like classes and objects. Topics covered in the MIPS part include memory organization, alternative approaches to stack frames, local and global variables, the heap and dynamic allocation, function calls including parameter passing and recursion, how C relates to machine code (e.g., arrays as pointers) and - a brief segue out of C space - how objects and methods are implemented. I cover objects because they provide a useful example of a dispatch table, and a basic understanding of how method calls could be implemented is useful given how widespread object-oriented languages are. The C part builds on this, introducing C in a little more detail including how formatted input and output work, basic C constructs, the UNIX command line (basics of scripting and make), program structure, calling library functions with function pointers and bit manipulations. The book is tested on a second-year class whose prior courses used C#, but it could be used in an introductory class. The machine organization component is not very detailed; the idea is to present just enough to support the programming concepts. The principle aims of the book are provide a foundation for understanding deeper programming concepts like recursion and the background for courses that require an understanding of the hardware-software interface like compilers and operating systems. The index contains separate entries for exercises so you do not waste time looking up a concept only to find the index entry points to an exercise. The test of how well this works is in how well students do in follow-up courses - so far, my experience has been positive and I hope yours is too.







Real-Time UNIX® Systems


Book Description

A growing concern of mine has been the unrealistic expectations for new computer-related technologies introduced into all kinds of organizations. Unrealistic expectations lead to disappointment, and a schizophrenic approach to the introduction of new technologies. The UNIX and real-time UNIX operating system technologies are major examples of emerging technologies with great potential benefits but unrealistic expectations. Users want to use UNIX as a common operating system throughout large segments of their organizations. A common operating system would decrease software costs by helping to provide portability and interoperability between computer systems in today's multivendor environments. Users would be able to more easily purchase new equipment and technologies and cost-effectively reuse their applications. And they could more easily connect heterogeneous equipment in different departments without having to constantly write and rewrite interfaces. On the other hand, many users in various organizations do not understand the ramifications of general-purpose versus real-time UNIX. Users tend to think of "real-time" as a way to handle exotic heart-monitoring or robotics systems. Then these users use UNIX for transaction processing and office applications and complain about its performance, robustness, and reliability. Unfortunately, the users don't realize that real-time capabilities added to UNIX can provide better performance, robustness and reliability for these non-real-time applications. Many other vendors and users do realize this, however. There are indications even now that general-purpose UNIX will go away as a separate entity. It will be replaced by a real-time UNIX. General-purpose UNIX will exist only as a subset of real-time UNIX.




C++


Book Description

A primer for C programmers transitioning to C++ and designed to get users up to speed quickly, this book tells users just what they need to learn first. Covering a subset of the features of C++, the user can actually use this subset to get familiar with the basics of the language. The book includes sidebars that give overviews of advanced features not covered.




RF Circuit Design


Book Description

Summarizes the schemes and technologies in RF circuit design, describes the basic parameters of an RF system and the fundamentals of RF system design, and presents an introduction of the individual RF circuit block design. Forming the backbone of today's mobile and satellite communications networks, radio frequency (RF) components and circuits are incorporated into everything that transmits or receives a radio wave, such as mobile phones, radio, WiFi, and walkie talkies. RF Circuit Design, Second Edition immerses practicing and aspiring industry professionals in the complex world of RF design. Completely restructured and reorganized with new content, end-of-chapter exercises, illustrations, and an appendix, the book presents integral information in three complete sections: Part One explains the different methodologies between RF and digital circuit design and covers voltage and power transportation, impedance matching in narrow-band case and wide-band case, gain of a raw device, measurement, and grounding. It also goes over equipotentiality and current coupling on ground surface, as well as layout and packaging, manufacturability of product design, and radio frequency integrated circuit (RFIC). Part Two includes content on the main parameters and system analysis in RF circuit design, the fundamentals of differential pair and common-mode rejection ratio (CMRR), Balun, and system-on-a-chip (SOC). Part Three covers low-noise amplifier (LNA), power amplifier (PA), voltage-controlled oscillator (VCO), mixers, and tunable filters. RF Circuit Design, Second Edition is an ideal book for engineers and managers who work in RF circuit design and for courses in electrical or electronic engineering.




C++ Primer Plus


Book Description

If you are new to C++ programming, C++ Primer Plus, Fifth Edition is a friendly and easy-to-use self-study guide. You will cover the latest and most useful language enhancements, the Standard Template Library and ways to streamline object-oriented programming with C++. This guide also illustrates how to handle input and output, make programs perform repetitive tasks, manipulate data, hide information, use functions and build flexible, easily modifiable programs. With the help of this book, you will: Learn C++ programming from the ground up. Learn through real-world, hands-on examples. Experiment with concepts, including classes, inheritance, templates and exceptions. Reinforce knowledge gained through end-of-chapter review questions and practice programming exercises. C++ Primer Plus, Fifth Edition makes learning and using important object-oriented programming concepts understandable. Choose this classic to learn the fundamentals and more of C++ programming.




Head First C


Book Description

Learn key topics such as language basics, pointers and pointer arithmetic, dynamic memory management, multithreading, and network programming. Learn how to use the compiler, the make tool, and the archiver.




C++ Pointers and Dynamic Memory Management


Book Description

Using techniques developed in the classroom at America Online's Programmer's University, Michael Daconta deftly pilots programmers through the intricacies of the two most difficult aspects of C++ programming: pointers and dynamic memory management. Written by a programmer for programmers, this no-nonsense, nuts-and-bolts guide shows you how to fully exploit advanced C++ programming features, such as creating class-specific allocators, understanding references versus pointers, manipulating multidimensional arrays with pointers, and how pointers and dynamic memory are the core of object-oriented constructs like inheritance, name-mangling, and virtual functions. Covers all aspects of pointers including: pointer pointers, function pointers, and even class member pointers Over 350 source code functions—code on every topic OOP constructs dissected and implemented in C Interviews with leading C++ experts Valuable money-saving coupons on developer products Free source code disk Disk includes: Reusable code libraries—over 350 source code functions you can use to protect and enhance your applications Memory debugger Read C++ Pointers and Dynamic Memory Management and learn how to combine the elegance of object-oriented programming with the power of pointers and dynamic memory!




Linux System Programming


Book Description

Write software that draws directly on services offered by the Linux kernel and core system libraries. With this comprehensive book, Linux kernel contributor Robert Love provides you with a tutorial on Linux system programming, a reference manual on Linux system calls, and an insider’s guide to writing smarter, faster code. Love clearly distinguishes between POSIX standard functions and special services offered only by Linux. With a new chapter on multithreading, this updated and expanded edition provides an in-depth look at Linux from both a theoretical and applied perspective over a wide range of programming topics, including: A Linux kernel, C library, and C compiler overview Basic I/O operations, such as reading from and writing to files Advanced I/O interfaces, memory mappings, and optimization techniques The family of system calls for basic process management Advanced process management, including real-time processes Thread concepts, multithreaded programming, and Pthreads File and directory management Interfaces for allocating memory and optimizing memory access Basic and advanced signal interfaces, and their role on the system Clock management, including POSIX clocks and high-resolution timers




Learn C the Hard Way


Book Description

You Will Learn C! Zed Shaw has crafted the perfect course for the beginning C programmer eager to advance their skills in any language. Follow it and you will learn the many skills early and junior programmers need to succeed–just like the hundreds of thousands of programmers Zed has taught to date! You bring discipline, commitment, persistence, and experience with any programming language; the author supplies everything else. In Learn C the Hard Way, you’ll learn C by working through 52 brilliantly crafted exercises. Watch Zed Shaw’s teaching video and read the exercise. Type his code precisely. (No copying and pasting!) Fix your mistakes. Watch the programs run. As you do, you’ll learn what good, modern C programs look like; how to think more effectively about code; and how to find and fix mistakes far more efficiently. Most importantly, you’ll master rigorous defensive programming techniques, so you can use any language to create software that protects itself from malicious activity and defects. Through practical projects you’ll apply what you learn to build confidence in your new skills. Shaw teaches the key skills you need to start writing excellent C software, including Setting up a C environment Basic syntax and idioms Compilation, make files, and linkers Operators, variables, and data types Program control Arrays and strings Functions, pointers, and structs Memory allocation I/O and files Libraries Data structures, including linked lists, sort, and search Stacks and queues Debugging, defensive coding, and automated testing Fixing stack overflows, illegal memory access, and more Breaking and hacking your own C code It’ll Be Hard at First. But Soon, You’ll Just Get It–And That Will Feel Great! This tutorial will reward you for every minute you put into it. Soon, you’ll know one of the world’s most powerful programming languages. You’ll be a C programmer.