June 14, 2009
June 14, 2009
June 17, 2009
Computers in Education
14.1112.1 - 14.1112.15
Synergies of Teaching Assembly and C in a Junior Microprocessors Course Abstract
As part of an effort to update its core computer engineering courses, Boise State University has developed course material to effectively transition students in a Microprocessors course through both the assembly and C languages. It was found that teaching both languages in the same course provides benefits not found in teaching them separately. The material has been developed to promote both a thorough understanding of microprocessors, and greater productivity that allows students to do more intriguing and relevant projects. The course presents just enough C, at a very low level and in a specific topic order, to enable the students to better comprehend microprocessors and how they can control a broad range of devices. The updated Microprocessors course is currently in its fourth iteration.
The C programming language is increasingly being utilized in development of embedded systems and ultra-small microcontrollers that were previously the domain of assembly language- only programming. Teaching assembly only in a Microprocessors course does not provide students the skills they are likely to need in the workplace , and the time required to produce code for each new device in assembly results in the course becoming more software-oriented rather than focusing on the hardware and devices. However, using the C language only is not considered practical for teaching microprocessors since assembly is the language of the processor and thus is necessary for understanding how the microprocessor works. Simply rewriting device code in C without applying software engineering principles  yields poor quality code that is difficult to maintain and cannot be readily targeted to other platforms. However, by selectively applying some of the object oriented principles  that can be found in the Linux kernel and device drivers, the C programming language can provide an effective solution for programming many of these small devices. Principles of layering, data encapsulation and abstraction can help make the code more readable, maintainable and portable.
It should be noted that the intent is not to write C code as translated assembly, which is hard to read, hard to maintain and offers little benefit over assembly code. By effectively utilizing the facilities of the C language, many assembly language routines can be reduced to very small and elegant solutions. For students lacking the insight into how to write assembly programs but are proficient at C or Java, compiling a program in C is a method of seeing how a program can be written in C. Writing code at the lowest level to access devices is generally very tedious in either language, but by providing appropriate abstractions this code can be isolated in layers to allow the higher level more freedom to solve problems with less consideration for hardware details. This also provides for easier retargeting to other platforms.
Consequently, Boise State University (BSU) decided to update its junior level Microprocessors course by incorporating the C programming language in addition to assembly. It was not practical - or necessary - to teach the entire C programming language in order to significantly enhance software skills beyond what is achieved with the assembly language alone. Following a
Planting, A., & Loo, S. M. (2009, June), Synergies Of Teaching Assembly And C In A Junior Microprocessors Course Paper presented at 2009 Annual Conference & Exposition, Austin, Texas. 10.18260/1-2--5757
ASEE holds the copyright on this document. It may be read by the public free of charge. Authors may archive their work on personal websites or in institutional repositories with the following citation: © 2009 American Society for Engineering Education. Other scholars may excerpt or quote from these materials with the same citation. When excerpting or quoting from Conference Proceedings, authors should, in addition to noting the ASEE copyright, list all the original authors and their institutions and name the host city of the conference. - Last updated April 1, 2015