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

Write a program that draws an 8 x 8 chessboard, with alternating gray and white

ID: 3563433 • Letter: W

Question

Write a program that draws an 8 x 8 chessboard, with alternating gray and white squares. You can use the SetTextColor and Gotoxy procedures from the Irvine32 library. Avoid the use of global variables, and use declared parameters in all procedures. Use short procedures that are focused on a single task.

Please note that this must be written using Irvine32. For example:

INCLUDE Irvine32.inc

.data (data variables/members go here)

.....................

.....................

.code

main PROC (main code goes here)

.....................

.....................

main ENDP

END main

Explanation / Answer

TITLE Chess Board INCLUDE Irvine32.inc .data text BYTE "___" loopCnt DWORD 8 .code main PROC mov ecx, 8 L1: mov eax, gray mov eax, ecx call setTextColor mov edx, OFFSET text call writeString mov eax, black mov eax, ecx call setTextColor mov edx, OFFSET text call writeString loop L1 exit main ENDP END main

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