Dale - Computer Science Illuminated 224

Dale - Computer Science Illuminated 224 - it into location...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
7.3 Machine Language 197 The contents of the operand specified in the second and third bytes of the instruction (location 020A) are added into the A register. The contents of the operand specified in the operand specifier (020A in hex) are added to the X register. 11011 Subtract the operand This instruction is just like the Add opera- tion except the operand is subtracted from the specified register rather than added. Like the Load and the Add, there are variations of this instruc- tion depending on the register specifier and the addressing mode. 00100 Character input to operand This instruction allows the program to enter an ASCII character from the input device while the program is running. Only direct addressing is allowed, so the character is stored in the address shown in the operand specifier. This instruction reads an ASCII character from the input device and store
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: it into location 000A. 00011 Character output from operand This instruction sends an ASCII character to the output device while the program is running. The register specifier is ignored, but the addressing may be either immediate or direct. Because immediate addressing is specified, this instruction writes out the ASCII character stored in the operand specifier. The operand specifier contains 1000001, which is 41 in hex and 65 in decimal. The ASCII char-acter corresponding to that value is , so the letter A is written to the screen. Instruction specifier Operand specifier 1 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 Instruction specifier Operand specifier 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 Instruction specifier Operand specifier 1 1 1 0 0 0 0 0 0 1 0 0 0 0 0 1 0 1 0 1...
View Full Document

Ask a homework question - tutors are online