The second section of the Introduction Course is a common introduction to programming. This section covers bases of a text editor, operating system (now it is MS DOS) and main concepts of programming with Pascal. The two sections are read simultaneously during first (autumn) semester and presents the first part of the Introduction Course.
The second part of the Introduction includes studying of algorithms and data structures with C language programming in C++ environment. The part is lectured during second (spring) semester of the first year.
As a rule, the AAL course is read for third or fourth year students. For some reasons we prefer to include essential part of the AAL course into the Introduction Course.
First, set of concepts, connected with AAL, is a fundamental achievement of modern applied mathematics. Any knowledge and skills of programmer will not be sound without possessing of computer architecture culture. Professional's ability of self-teaching is strongly restricted by the absence of student's proper skills.
Second, third/fourth years students acquire knack to resolve programming problems without taking into account the architecture considerations after two, three years of programming experience with high level languages. It leads both to forming in the students mind not completely notions about programming, and low motivation and receptivity of the students to study AAL. Additional reason for low motivation is the increasing number of the third/fourth years students, who works part-time and/or try to get a steady job (the phenomena take place not only in Russia [Denn,92]).
Our experience shows, that the motivation and the receptivity of AAL studying are essentially higher for first year students. Most part of them intuitively feel that it is important for their professional formation to understand, how a computer really works on the hardware level. That's why the AAL course is very popular among the students. The experience also shows, that the students, who were introduced in AAL from the first year, study high level languages easier and demonstrate deeper competence in process of problems solving.
Third, subject, called Bases of Informatics, has been common school subject since 1985 in Russia, thanks to of Academician A.P.Ershov's activity [Ershov,82]. That is why almost any first year student has elementary programming experience, which is enough for AAL study to begin with.
We have choose for teaching the Intel 8088/8086 central processors architecture by the following reasons. First, the architecture is simple enough for study. Second, it allows to demonstrate real complexity of computers architecture. Third, it is a kernel of Intel CPU family.
Radices, Binary Arithmetic. Memory, Segmentation, Registers.
First Introduction to the Assembly Language. Symbolic names, Attributes, Named Objects.
Format of the Assembly Language Instruction Allocating Data The Assembling Process and Listing Procedures, Parameter Passing
Why and How to Comment a Program Machine Instruction Structure.
Byte ModR/M. Addressing Modes. Separate Assembling, Object Modules, External
Names. String Instructions.
The first part is introduction and predefined for either learning interaction with the working environments or for inductive leaning simple base AAL notions. This part includes 4 tasks:
T1.1 Enter, compile, link and run ready, well-commented program for
output on the screen consequently 4 text strings via DOS function N 9.
T1.2 Enter, compile, link and run under debugger ready, well-commented program for output on the screen one of 4 text stings (from T1) via DOS function N9. The number of string should be input from the keyboard in answer on prompt via DOS function N 1. There is simple flow control error in the program and a student should find it with debugger and correct.
T1.3 Enter, compile, link and run under debugger ready, uncommented program. The program computes sum of ten numbers using loop by register CX. Register BX is used as index of numbers. A student should understand the program running it command by command with debugger and add to the text good comments.
T1.4 Enter, compile, link and run under debugger ready, well-commented program for input into RAM buffer ASCII codes of only digital keys of the keyboard. If any other key is pressed, then the program outputs the error message. A student should observe with debugger the buffer filling process and presentation of digital symbols in symbolic, decimal and hexadecimal forms.
The second part is predefined for intensive training and consolidation of the techniques, received by a student during execution the first part tasks. The part consist from the following tasks:
T2.1 Develop, debug and test program for computing sum of any quantity
of numbers, containing only one digit. Numbers are input from the
keyboard. The sum should be observed via debugger. The appropriate parts
of previous tasks should be used as prototypes.
T2.2 Enhance T2.1 to compute sum of multidigital numbers, fitting in the word . The program should recognize the integer overflow.
T2.3 Enhance T2.2 to output computed sum on the screen.
T2.4 Develop, debug and test program for finding minimal and maximal values of integer words array for signed and unsigned interpretations of the words. The array should be any length and should be input from the keyboard. Results should be output on the screen. The appropriate parts of previous tasks should be used as prototypes.
The third part is predefined for learning nested procedures and parameter passing through stack techniques. The part consist from the following tasks:
T3.1 Enter, compile, link and run under debugger ready, well-commented
program, where a procedure organization with parameter passing through
stack is demonstrated. A student should observe via the debugger the
stack behavior during the process of parameter passing.
T3.2 Redevelop the program from T2.3 using nested procedures techniques.
T3.3 Redevelop the program from T2.4 using nested procedures techniques.
The fourth part is predefined for learning separate assembling and object modules techniques using the link editor. The part consist from the following tasks:
T4.1 Redevelop the program from T3.2 using separate assembling and
object modules techniques.
T4.2 Redevelop the program from T3.3 using separate assembling and object modules techniques.
After fulfilling the first tasks, student must develop and debug some programs based on previously made tasks. Sequence of the tasks is aimed to widen the beacons using and developing the own students beacons. You can see below some examples of Assembly Language beacons.
; Task 1.4 ; Group: ; Date: ; Author: ; Program for Input of Digit Keycodes into Memory Buffer ; ;____ Beacon 1 Standard Starting _____________________________ ; DOSSEG ; Standard order of the segments .MODEL SMALL ; Standard segments names .STACK 200H ; Stack segment .DATA ; Data segment start ; ;____ END of Beacon 1 _________________________________________ ; INPBUFF DB 200 DUP(?) ; Buffer MESS1 DB 'Not digit. Repeat.',13,10,"$" MESS2 DB 'Digit! Good.',13,10,'$' PROMPT DB 'Enter a digit, my friend.',13,10,'$' .CODE ; Code segment start PROGRAM_START: ; Begin MOV AX,@data ; Load value MOV DS,AX ; to Data Segment Register ; ;____ Beacon 2 Input of Digit Keycodes into Memory Buffer _____ ; SUB BX,BX INPTFROMKBD: MOV DX,OFFSET PROMPT ; Load offset of prompt message MOV AH,9 ; Define DOS function for text output INT 21H ; and invoke it MOV AH,01H ; Define DOS function for INT 21H ; and invoke it CMP AL,"@" ; Is it termination code ? JE STOP ; YES - to termination CMP AL,"0" ; Is it less then code of 0 ? JB PRTMESS1 ; YES - to output of Error Message CMP AL,"9" ; Is it greater then code of 9 ? JA PRTMESS1 ; YES - to output of Error Message MOV INPBUFF[BX],AL ; move current code to buffer INPBUFF INC BX ; increment pointer of the buffer in BX by1 MOV DX,OFFSET MESS2 ; Load offset of success message MOV AH,9 ; Define DOS function for text output INT 21H ; and invoke it JMP INPTFROMKBD ; to input of new code PRTMESS1: ; Output of error message MOV DX,OFFSET MESS1 MOV AH,9 INT 21H JMP INPTFROMKBD ; ;____ END of Beacon 2 _________________________________________ ; STOP: MOV AH,4CH ; Define DOS function for INT 21H ; terminate the program, invoke it END PROGRAM_START ; End of source module with ; the entry point for link editor ; startup point for Link Editor
Labs become semi-supervised, after task T1.2, in the sense, that students develop the programs in accordance with their individual speeds and abilities (but not at their own schedule). However, students can obtain additional computer time out of the labs schedule, if it is needed. During the 15 weeks a student is required to understand with a debugger five prewritten and to develop personally at least seven assembly language programs for passing final semester test.
In general, the motivation strengthening methods should satisfy, support
and develop both sources of the motivation. Students are supposed to
- that AAL is not very hard domain;
- that the Assembly language is usual, although a bit more specific, programming language;
- that his/her understanding of computer inner mechanisms is increasing rather quickly;
- that receiving knowledge is helpful right now.
To fulfill this task we use some empirical psychological techniques to strengthen the inner motivation of the students.
The book is specially structured to demonstrate to student, that AAL is not very complex. The special short contents of the book takes only two pages and allows students to observe the structure of AAL area in whole and to find easily needed divisions. The short content looks like this:
Short Content Index of Instructions 5 Full Contents 7 Tables and Figures 14 Introduction 15 Processors and Computers 18 CPU Intel 8086/8088 System Environment 20 RAM 22 I/O Devices 26 BUS 28 Architecture of Intel 8086/8088 30 Processor Structure 31 Multiprocessing 33 Differences between 8086 and 8088 34 RAM Organization and Segmentation 35 Registers 41 Interrupts 49 Instruction Set 62 Interpretation of RAM Access Units 62 What Is an Instruction 65 Instruction Structure 65 Instruction Description Format 70 Moving data Instructions 74 General 74 Input/Output 76 Addresses Loading 77 Flags 78 Arithmetic Instructions 80 Add, Subtract, Compare 80 Multiply, Divide 83 Increment, Decrement, Complement 86 Sign Extensions 87 Decimal Corrections 88 Bit Instructions 91 Logic Instructions 91 Shifts 93 Rotates 95 String Instructions 97 Flow Control Instructions 103 Procedures 103 Jumps and Loops 105 Interrupts Handling 109 Processor Control 110 Undefined Instruction Codes 115 Abbreviations 116 ASCII Code Table 119 References 120The book has a pocket format and allows us not to give the lectures in detail. By the reason, we have more freedom for picking out main concepts and for thorough discussion of examples. We believe, that frequent use of the book helps students either to put in the active memory knowledge, which is necessary for programming with the assembly language, or to form a good style for references books usage.
The approach has the following advantages:
Due to origin motivation and first successes in AAL understanding, the students begin trying to eliminate the feeling by different means. This strengthen their learning activity, the independent work, and the interaction between lectures and labs processes. As usual, the students make much more deeper experiments with programs by a debugger, read the textbooks more carefully, and ask more different questions.
It is very interesting to observe this struggle of an intellect for inner comfort and the searched means. It is natural, that the harder work may be the cause of the understanding explosion. The explosions once more show the students, that they are able to learn AAL. In its turn, the motivation is increased by the demonstration.
Then different teaching strategies is used inside each of the group. The lab tasks are given for members of leading group in more complex versions and with less explanation. Members of usual groups receive standard versions of the tasks and are under more strict control.
There also exist some additional program specifications for leading students, who develop a program per labs, as a rule, and therefore the students can develop more programs during the course. The students have preferences during final test passing. The leaders shows other students, that it is not very hard to learn AAL, and involve them in competition for the preferences. That is also a motivation's strengthening technique.
1. The students better understand C language constructions. For examples, they consider pointers in connection of known notion of address, or have a good base for understanding memory models, near and far pointers, parameter passing.
2. Number of the students is increased, who undertakes attempts to open protection program, installed on laboratory computers. They feel, that it is not totally impossible for them.
3. The students shows the readiness for more progress in third year course Architecture of Computers. It makes possible to read the course with more depth and breadth.
Acknowledgments. It is our pleasure to express gratitude to N.S. Ruzanova, J.E. Shtivelman, S.M. Krutalevich, O.I. Derbeneva and E.I. Holodkova from Computer Center of the University for carefully supporting of the laboratories. We also thanks the reviewers of the article for useful remarks.
Bogoiavlenski I.A., Pechnikov A.A.
Strategy of Teaching the Architecture and Assembly Language of IBM PC Compatible Computers for First Year Students of Mathematical Faculty. In Abstracts of Conference "New Information Technologies in Education and Management", Petrozavodsk University Press, 1993, pp. 78-79, (in Russian)
Central Process Units Intel 8086/8088.
The Architecture and the Instruction Set. Programmer's Reference, compiled by I.A. Bogoiavlenski and A.A.Pechnikov, Petrozavodsk University Press, 1992 (in Russian)
Computing Curricula 1991.
Report of the ACM/IEEE-CS Joint Curriculum Task Force, ACM Press, 1991
Dao Lanny V.
Mastering the 8088 microprocessor, Moscow, Mir press, 1988 (translated into Russian)
Davies Simon P.
Models and Theories of programming strategy. Int.J Man-Machine Studies (1993), 39, pp. 237-267
Denning Peter J.
Educating a New Engineer, Communications of the ACM, v.35, N12, December 1992, pp. 83-97
Denning Peter J., Comer Douglas E., Gries David, Mulder Michael C.,
Tucker Allen B., Turner A. Joe, and Young Paul R.
Computing as a Discipline, Communications of the ACM, v.32, N1, January 1989, pp.9-23
Programming is a second literacy, Pocit e umela intel., 1982, 1, N6, pp.457-471 (in Russian)
Norton Peter, Socha John Peter Norton's
Assembly Language Book for the IBM PC, Moscow, Finansy and Statistica Press, 1992 (translated into Russian)
The Bachelor Curricula in Computer Science/Applied Mathematics in Petrozavodsk State University on the Base of Computing Curricula 1991, In Abstracts of conference "New Information Technologies in Education and Management" , Petrozavodsk University Press, 1993, pp. 12-15 (in Russian)
Scanlon Leo J.
IBM PC and XT. Assembly Language, Moscow, Radio i Sviaz Press, 1989 (translated into Russian)
Weiner David J.
Teaching of Assembly Language as a Laboratory Science, SIGCSE Bulletin, v.21, N4, December 1989, pp.60-64
Andrew A. Pechnikov
Petrozavodsk State University
Lenin St., 33, Petrozavodsk, 185640, Karelia, Email address phone: (81400 [81422 for Finland]) 7.51.39