Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I need to create an ASM program that using the AND, OR, NOT, and XOR operand on

ID: 3603302 • Letter: I

Question

I need to create an ASM program that using the AND, OR, NOT, and XOR operand on 2 hexadecimal operands. The program works perfectly except for the NOT operand. The following is ran using Microsoft Visual Studio and INCLUDE Irvine32.inc

_________________

mov edx, OFFSET msgHex1 ;prompt for first number

call WriteString ;user enters first number

call ReadHex ;program reads first number

mov ebx, eax

mov edx, OFFSET msgHex2 ;prompt for secondnumber

call WriteString ;enter second number

call ReadHex ;reads secondsnumber

not eax, ebx ;NOTs both operands

____________________

not eax, ebx generates the following syntax error for the comma

error A2008: syntax error : ,

So, what should I do to solve the problem, or is there an equivalent code for not eax, ebx that I can replace this with?

Explanation / Answer

// expre_Bitwise_AND_Operator.cpp // compile with: /EHsc // Demonstrate bitwise AND #include using namespace std; int main() { unsigned short a = 0xFFFF; // pattern 1111 ... unsigned short b = 0xAAAA; // pattern 1010 ... cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote