Reforming Assembly Language Teaching Based on Kunpeng Processor

0 Introduction

Assembly language is a low-level programming language related to computer hardware. Since the Intel 80×86 processor and its compatible machines are the mainstream processors for personal computers, the current assembly language teaching in domestic universities mainly focuses on Intel processors and their development tools. Due to national information security considerations, establishing an independent information industry has become a fundamental policy in China. The Kunpeng 920 processor is a 64-bit multi-core processor chip developed independently in China, compatible with the ARMv8-A architecture, and widely used in mobile computing, embedded systems, and cloud servers. Mastering ARM assembly language is significant for embedded system development and is also necessary for the development of the Information and Communication Technology (ICT) industry. ARM assembly and Intel assembly are typical representatives of reduced instruction set and complex instruction set architectures, respectively, and involve different processor architectures, necessitating a reasonable integration of both assembly language teaching content in education.

1 Current Status of Assembly Language Teaching

Assembly language is a low-level programming language closely related to machines, capable of writing efficient programs that can directly control computer hardware, serving as a bridge between computer software and hardware. Assembly language is an important foundational course for computer-related majors such as software engineering and computer science and technology. Through learning assembly language, students can gain a deeper understanding of the working principles of computer systems, enhance their high-level language programming abilities, and establish a computer system thinking.

Intel processors are currently the mainstream processors in personal computers, so assembly language teaching generally uses Intel processors and personal computers as the hardware platform, with a 32-bit or 64-bit Windows operating system as the software platform, implementing teaching with MASM assembly programs or Visual Studio as development tools. The teaching objectives primarily aim to help students understand the characteristics of low-level programming languages, familiarize themselves with commonly used instructions and MASM pseudo-instructions of Intel processors, master the basic methods of MASM assembly language programming and development tools, and be able to analyze, design, write, and debug assembly language programs according to requirements. The teaching content includes the basics of assembly language, commonly used processor instructions, assembly language pseudo-instructions, as well as structures for sequence, branching, loops, and subroutines. It also includes extended Windows and DOS programming, mixed programming with C++, input-output instructions, and programming. Some assembly language courses have added MIPS instruction programming to align with their professional teaching plans.[1].

Zhengzhou University’s assembly language teaching adheres to the teaching philosophy of “goal-oriented, student-centered, and continuous improvement,” emphasizing practice and the cultivation of abilities and qualities. It has adopted a four-stage personalized online-offline blended teaching model, completing four learning stages of independent learning, classroom guidance, project practice, and summarization evaluation in three spaces: the learning platform, classroom, and computer lab. In each learning stage, students’ knowledge, skills, and quality levels are progressively enhanced, achieving higher-order and challenging learning objectives. This course is one of the first batch of courses for the Zhengzhou University-Huawei Intelligent Base Construction Program, combining knowledge from Huawei Cloud, Kunpeng, and other technical fields with assembly language teaching practice.

2 Challenges in Assembly Language Teaching Based on Kunpeng Processor

The assembly of Kunpeng processors is compatible with ARM assembly, and teaching ARM assembly in assembly language aligns with the requirements for the autonomy of information technology and the development of the ICT industry in China. Existing assembly language instruction primarily uses Intel processors and their instruction sets as examples, with the development environment mainly being Microsoft’s systems and development tools such as Windows, MASM, and Visual Studio. Teaching ARM assembly based on Kunpeng processors faces challenges such as limited class hours, extensive content, difficulties in configuring experimental environments, and low student motivation.
1) Limited Class Hours, Extensive Content.
Assembly language teaching includes 32 theoretical class hours and 16 experimental class hours, covering hardware fundamentals, commonly used assembly instructions, assembly program design, and mixed programming. Since assembly language is hardware-related, ARM assembly and Intel assembly are based on different processors, and the assembly instructions involve different registers, instruction formats, and mnemonics, increasing the teaching content without increasing the class hours.
2) Difficulties in Configuring Experimental Environments.
Experiments are an important means of combining theory and practice in assembly language. Teaching assembly language using Intel processors generally employs PC machines, Windows systems, and tools like MASM and Visual Studio, but these tools are not suitable for teaching ARM assembly language. Kunpeng processors are mainly used in embedded systems, making configuration difficult for individual learners, thus increasing experimental difficulty.
3) Low Student Motivation.
Assembly language, being hardware-oriented, has numerous instructions, making writing and debugging more challenging. The course’s difficulty is high, and the content is tedious and obscure. Some students do not understand the importance of the course, believing that learning assembly language is not very useful for practical work, leading to low motivation.

3 Practice of Reforming Assembly Language Teaching Based on Kunpeng Processor

3.1 Reconstructing Teaching Content with a Systematic Perspective

According to the Ministry of Education’s requirements for “new engineering” construction, cultivating students’ ability to solve “complex engineering problems” is necessary to meet the new demands of various industries in the new engineering era. Systematic thinking is key to equipping computer majors with the capability to solve “complex engineering problems”. We have aimed to cultivate systematic thinking, deepen understanding of computer systems, and enhance programming abilities in our reform of assembly language teaching. A knowledge map of relevant course content has been constructed based on a systematic perspective, reconstructing the content of assembly language teaching and reforming experimental teaching while strengthening the integration of ideological and political elements in the curriculum.

1) Constructing a Knowledge Map for Multiple Courses.

Assembly language serves as a bridge between computer software and hardware, playing a connecting role in computer architecture, and is related to courses such as C language, computer organization principles, compiler principles, and operating systems. Constructing a knowledge map for multiple courses centered on the goals of assembly language teaching is fundamental to cultivating students’ systematic thinking. Table 1 presents some knowledge points related to the assembly language course and other courses.

Reforming Assembly Language Teaching Based on Kunpeng Processor

2) Reconstructing Teaching Content.

Based on the original teaching content of Intel processors, knowledge points such as multi-platform program running environments, basic ARM assembly instructions, and system calls have been added. Intel assembly and ARM assembly are applied in different operating systems and processors, with the Intel assembly environment being Windows + Intel processors and the ARM assembly environment being Linux + Kunpeng processors. For the ARM assembly environment, this course has adopted Huawei Cloud’s CodeArts Online Kunpeng architecture. The previously used MASM-based development tools are only suitable for Intel processor assembly language programming, so the introduction of open-source tools like GCC and NASM has been included. ARM assembly and Intel assembly belong to different types of instruction sets, and the assembly program code for accomplishing the same function has different instruction formats and registers. The teaching content has been expanded to include basic ARM instructions and directives. This course has added relevant third-level knowledge points related to Kunpeng processor assembly teaching in most corresponding secondary knowledge points (see Table 2). Additionally, first-level knowledge points on input-output program design and second-level knowledge points on system calls have been included, which encompass third-level knowledge points such as Linux system calls, Windows API calls, and DOS system calls, balancing programming examples under both Windows and Linux.

Reforming Assembly Language Teaching Based on Kunpeng Processor
3) Adopting an Online-Offline Blended Teaching Model.
To address the issue of limited class hours and extensive content, we continue to adopt an online-offline blended teaching model, completing four learning stages of independent learning, classroom guidance, project practice, and summarization evaluation in three spaces: the learning platform, classroom, and computer lab, adjusting the learning focus of each stage. Students independently study the learning materials for Kunpeng processors, and teachers explain key and difficult points during classroom guidance, organizing discussions on how to port Intel assembly examples to ARM assembly. After class, students conduct code porting tests on Huawei Cloud, mastering the use of ARM assembly through experiments, enhancing their independent learning and hands-on abilities. Finally, learning evaluations are conducted through flipped classrooms or experimental reports to achieve learning objectives.
3.2 Reforming Experimental Teaching to Enhance Student Innovation Abilities
Experimental teaching is an important means of understanding and applying theoretical knowledge. By operating computers and engaging in programming, simulation, integration, and other practical operations, students improve their hands-on and application abilities. To meet the needs of teaching assembly language based on Kunpeng processors, we have supplemented experiments with Kunpeng processor assembly experiments.
1) Designing Experimental Tasks Integrating Multiple Knowledge Points.
Based on the constructed multi-course knowledge map, experimental tasks are designed mainly around this course’s knowledge points while integrating knowledge points from related courses. For example, using disassembly of C language programs on both Kunpeng and Intel processors to understand data representation and definition, comparing the assembly instructions of different processors, and understanding the machine-related characteristics of assembly language. Implementing array processing with different addressing modes to comprehend the implementation principles of C language arrays, and using assembly language to perform alternating division calculations to understand the logical consistency between software and hardware.
2) Diversifying Experimental Task Platforms.
Students are encouraged to complete experimental tasks on different experimental platforms. For instance, in the program development experiment, the project involves writing a program to display “hello assembly.” First, students input example code for execution, then they are required to write a C language program to achieve the same functionality. Students are encouraged to complete the same task on Windows, Linux systems, x86, and Kunpeng processors using MASM, NASM, LINK, LD, GCC, and other tools, viewing assembly code through disassembly on both Kunpeng and Intel processors, analyzing the differences between C language and assembly input-output, and comparing the assembly instructions and characteristics of different processors, experiencing the hardware-related characteristics of assembly language. In the input-output subroutine library experiment, students can complete experimental tasks in three environments: Linux+x86, Linux+Kunpeng processor, and Windows+x86, experiencing concepts such as computer operating modes and system calls, thereby cultivating a view of computer systems.
3) Grading Experimental Tasks.
Each experiment is assigned a fixed score, with different difficulty levels and types of experimental tasks included, allowing students to choose autonomously. As long as they meet the required score, students can select tasks based on their learning situations or interests, encouraging them to tackle challenging problems and innovate, thus stimulating their enthusiasm.
A total of 8 assembly language experiments have been designed, each including verification-type, design-type, optimization-type, and open-type experimental tasks. Each experiment comprises multiple tasks, with varying scores for different tasks, but the maximum score is 100 points. For example, the purpose of the DOS application development experiment is to master the programming application of system function calls and input-output instructions. This experiment includes 5 experimental tasks, with the types, scores, and difficulties of each task detailed in Table 3, where Task 5’s score is based on completion using the Kunpeng processor. Students can autonomously choose experimental tasks and platforms, but the maximum score remains 100 points.

Reforming Assembly Language Teaching Based on Kunpeng Processor

3.3 Stimulating Learning Motivation through Ideological and Political Education
To stimulate students’ learning motivation, we integrate ideological and political elements into the course content and characteristics. Our established educational objectives are to understand the position of assembly language in computer systems, enhance professional confidence and a sense of mission, cultivate national spirit and patriotism; foster awareness of autonomous learning, and develop good professional qualities such as attention to detail and rigor, teamwork spirit, craftsmanship spirit, and innovation spirit.
During the course introduction, cases such as C language program analysis and hardware control are used to emphasize the characteristics of assembly language, helping students understand its role and increasing their interest in learning. Through education on international situations, the development of domestic processors, and explanations of various real-world problem demands, students are reminded of the belief in “technological power” and maintain patriotism, strengthening their aspirations to contribute to the nation, thus stimulating interest in learning and understanding the significance of learning ARM assembly language for future employment and knowledge system enhancement.
In the process of teaching ARM assembly language, the Huawei Cloud (Kunpeng) computing framework and development tools are utilized, familiarizing students with domestic software usage and stimulating national spirit and patriotism, instilling the ideal of contributing to the localization of chips and software.
In assembly language experiments, real-world application cases have been added, such as developing new Kunpeng processor programs, encryption/decryption software, and analyzing and preventing computer viruses, encouraging students to participate in academic competitions, publish papers, and apply for software copyrights, enhancing students’ sense of achievement.
By learning the statement formats, program frameworks, and development methods of assembly language, students are guided to develop good programming habits and cultivate a careful and rigorous work attitude. Based on the blended learning approach of this course, students are guided to plan their independent learning time wisely, enjoy online discussions, and actively participate in classroom activities. Students are encouraged to form study groups during programming exercises to discuss, analyze, and help each other, fostering a spirit of teamwork and mutual assistance. By checking the effectiveness of online learning, students enhance their ability for autonomous learning and cultivate self-discipline.

4 Reform Outcomes

Zhengzhou University’s assembly language course has participated in the Huawei Intelligent Base Project since the fall semester of 2020. After years of teaching practice, it has accumulated rich resources for Kunpeng processor assembly language teaching, including 37 additional ARM assembly extension resources on the online learning platform, developed Kunpeng processor assembly courseware, published a textbook, and constructed a knowledge map encompassing over 140 knowledge points related to ARM assembly language. The course employs an online-offline blended teaching model, increasing classroom discussions, experiments, and teaching related to Kunpeng processor programming. The teaching outcomes have received positive feedback from students and school supervisors, and the course has been rated as a national top course.

Students’ abilities in autonomous learning, hands-on skills, and innovation have all improved, with the proportion of students achieving good and excellent results in the final exam significantly increasing, and participation in open-type experiments rising year by year. Three students designed and completed an IO subroutine library based on x86 under Linux and an IO subroutine library based on the Kunpeng processor, filling gaps in the original assembly development package, with two of them obtaining software copyright. Four students participated in the Kunpeng development board competition, all reaching the semifinals.

5 Conclusion

ARM assembly represents a different instruction set architecture from Intel assembly, with extensive application value in embedded systems and mobile computing, making it an important direction for reform in assembly language courses to adapt to technological development. As a leader in domestic processors, the Kunpeng processor is very suitable for foundational hardware development of ARM assembly. Integrating Intel assembly and ARM assembly content based on a cross-course knowledge map and employing a blended teaching approach can effectively address the challenges of limited class hours and extensive content while also exercising students’ autonomous learning abilities. Huawei’s CodeArts Online (Kunpeng) computing environment provides a convenient development environment for teaching, resolving difficulties in configuring experimental hardware. The reforms involving ideological education and graded experimental tasks on multiple platforms have also significantly promoted student motivation to tackle challenging problems and enhance enthusiasm for learning.

References:

[1] Xuetang Online. Assembly Language Program Design[EB/OL]. (2017-02-20)[2019-12-15]. https://www.xuetangx.com/course/THU08091000320/21553982.

[2] Mu Lingling, Qian Xiaojie. Thoughts and Practices of Blended Teaching Based on MOOCs[J]. Computer Education, 2017(9): 82-86.

[3] Ministry of Education. Notice on the Research and Practice of New Engineering by the Higher Education Department of the Ministry of Education[EB/OL]. (2017-02-20)[2019-12-15]. http://www.moe.gov.cn/s78/A08/A08_gggs/A08_sjhj/201702/t20170223_297158.html.

[4] Sun Dawei, Zhang Yuqing. Exploring the Mode of Cultivating Systematic Thinking Ability in Computer Under New Engineering Background[J]. Computer Education, 2020(7): 94-97.

Funding Project: National Level Online-Offline Blended Top Course Assembly Language (2023241116); Henan Province Online-Offline Blended Top Course (202013173); Henan Province Online Top Course (202012860); Zhengzhou University-Huawei Intelligent Base Course Project.

First Author Profile: Mu Lingling, Female, Zhengzhou University Associate Professor, Research Direction Natural Language Processing, [email protected].

Citation Format: Mu Lingling, Zhang Qing, Zhang Xingjin, et al. Reform of Assembly Language Teaching Based on Kunpeng Processor[J]. Computer Education, 2024(12):244-248.

Article Header Image Created by “Zhizhu Qingyan”.

(End)

More Exciting:

Yan Ten│The Impact of Generative AI on Computer Major Education and Countermeasures

Principal Interview|Rooted in Border Minority Areas, Focusing on Teacher Education Mainstream to Cultivate High-Quality Applied Talents——Interview with Principal Chen Benhui of Lijiang Normal University

Yan Ten│Review and Prospects of Cultivating Computer System Abilities

Discussion on the Concept of “Student-Centered” Teaching and Its Implementation Path

Principal Interview|Promoting Interdisciplinary Integration to Cultivate Innovative Talents in the New Era——Interview with Professor Ni Mingxuan, Founding Principal of Hong Kong University of Science and Technology (Guangzhou)

New Year Message from the Seventh Editorial Board

Teaching Guidelines for Ideological and Political Education in Computer Disciplines

Academician Chen Guoliang|Cultural Construction of Virtual Teaching and Research Room for Computer Course Ideological and Political Education

Professor Chen Daoxu of Nanda|Change and Constancy: The Dialectics in the Learning Process

Yan Ten│Reflections and Suggestions on the “Dilemma” of Young Teachers in Universities

XU Xiaofei et al.|Metaverse Education and Its Service Ecosystem

【Directory】Computer Education Issue 11, 2024

【Directory】Computer Education Issue 10, 2024

【Directory】Computer Education Issue 9, 2024

【Directory】Computer Education Issue 8, 2024

【Editorial Board Message】Professor Li Xiaoming of Peking University: Thoughts Arising from the “Year of Classroom Teaching Improvement”……

Professor Chen Daoxu of Nanda: Which is more important, teaching students to ask questions or teaching students to answer questions?

【Yan Ten Series】: Trends in Computer Discipline Development and Their Impact on Computer Education

Professor Li Xiaoming of Peking University: From Interesting Mathematics to Interesting Algorithms to Interesting Programming——A Path for Non-Majors to Experience Computational Thinking?

Reflections on Several Issues in Building a First-Class Computer Discipline

New Engineering and Big Data Major Construction

Other Stones Can Attack Jade——Compilation of Research Articles on Computer Education at Home and Abroad

Reforming Assembly Language Teaching Based on Kunpeng Processor

Reforming Assembly Language Teaching Based on Kunpeng Processor

Leave a Comment