Exercises
- Install the free Visual Studio Community edition, available at https://visualstudio.microsoft.com/vs/community/, on a Windows PC. Once installation is complete, open the Visual Studio IDE and select Get Tools and Features… under the Tools menu. Install the Desktop development with C++ workload.
In the Windows search box in the Task bar, begin typing
Developer Command Prompt for VS 2022
. When the app appears in the search menu, select it to open Command Prompt.Create a file named
hello_x86.asm
with the content shown in the source listing in the x86 assembly language section of this chapter.Build the program using the command shown in the x86 assembly language section of this chapter and run it. Verify that the output Hello, Computer Architect! appears on the screen.
- Write an x86 assembly language program that computes the following expression and prints the result as a hexadecimal number: [(129 – 66) × (445 + 136)] ...