Discussion 03.1: Operations and Operands
Every computer must be able to perform some basic arithmetic calculations. Within assembly, there are specific instructions that can be used with a specific number of operands being used for each instruction. Create a simple assignment statements using a high-level language based on the instructions in your readings this week. Using that assignment statement, break down the operations and operands using assembly. How do your assembly statements relate to the underlying registers?
Discussion 03.2: Instruction Set
Most developers are more familiar with using a high-level language such as Java or C over Assembly. These high-level languages are generally translated into the language of the hardware first. Research how the hardware executes the resulting programs. What would be the purpose of the instruction set?
Discussion 3.1&3.2
Discussion 03.1: Operations and Operands
The operations and operands in the registers are grouped into three categories, the general, control, and segment registers. The processor registers include ten 32-bit and a six 16-bit processor. Data registers are general registers used in arithmetic, logical, and other operations. The pointer registers are another set of genera registers, which are 32-bit EIP, ESP, and EBP registers corresponding with 16-nit right portions IP, SP, and BP (Tutorialspoint, 2020). Another form of general registers is the 32-bit index registers, ESI and EDI, which also contain 16-bit rightmost portions. The control registers contain 32-bit flags register combined with a 32-bit instruction pointer. Control registers instructions compare mathematical calculations and change the status of the flags. The last assembly statement related to underlying registers is the segment registers, which are specific areas that contain data, code, and stack within a program. The code segment holds instructions that can be executed. The starting address of the code segment is stored in the 16-bit code segment register. The data segment contains data, work areas, and constants, with the starting address being stored in the DS register. The stack segment is the last segment, which holds the subroutine data and returns addresses. The starting address of the stack is stored in the SS register.
Discussion 03.2: Instruction Set
The instructions are fetched by the computer hardware that is designed to execute programs written in the machine language. The high-level language programs are then translated into machine language by the compiler. The translated machine language is then executed by the interpreter. The instruction set, also known as the instruction set architecture (ISA), play the purpose of providing command s to the processor regarding different aspects of programming (Computer Hope, 2018). The commands incorporated in the ISA include addressing modes, registers, interrupt, external I/O, instructions, memory architecture, exception handling, and native data types.
References
Computer Hope. (2018). Instruction set. Retrieved from https://www.computerhope.com/jargon/i/instset.htm
Tutorialspoint. (2020). Assembly – Registers. Retrieved from https://www.tutorialspoint.com/assembly_programming/assembly_registers.htm