350 likes | 474 Vues
Explore the intricacies of Level Asmb5 assembly language programming, covering topics such as the Pep/7 instruction set, unimplemented opcode instructions, and pseudo-operations. This chapter details various assembly programs, including input/output operations, adding values, and interpreting data in different number systems. It also discusses the roles of assemblers and compilers in translating programs into machine language. Enhance your comprehension of programming concepts through practical examples and exercises with real assembly programs.
E N D
The Pep/7 instruction set at Level Asmb5 • Please click on the following link Programs\c05t02.GIF to view the instruction set.
An assembly language program to input two characters and output them in reverse order Assembler Output D9 00 0D D9 00 0E E1 00 0E E1 00 0D 00 00 00 zz
An assembly language program to add 3 and 5 and output the single-character result
Immediate addressing • Oprnd = OprndSpec
A program to add 1 to a decimal value. It illustrates decimal I/O
A program to add 1 to a decimal value. It illustrates decimal I/O (Cont’d)
A program that interprets a value as decimal and as hexadecimal
A program that interprets a value as decimal and as hexadecimal (Cont’d)
Two assembly language programs that produce the same object code and, therefore, the same output
Two assembly language programs that produce the same object code and, therefore, the same output (Cont’d)
A program that interprets a value as decimal and as hexadecimal
A program that interprets a value as decimal and as hexadecimal (Cont’d)
A nonsense program that illustrates the underlying von Neumann nature of the machine
The assignment statement at Level HOL6 and Level Asmb5 • Please click on the following link Programs\c05p207_prog.GIF to view the appropriate program.
A program translating a C++ constant to machine language and illustrating the ASRR statement • Please click on the following link Programs\c05p211_prog.gif to view the appropriate program.