Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write an Assembly program that prints an ASCII art version of a right triangle to the screen. For example, for size 5, we would get:
Write an Assembly program that prints an ASCII art version of a right triangle to the screen. For example, for size 5, we would get: USE THIS CODE AS A REFERENCE! .data prompt BYTE "Enter size of triangle to dran: ",0; count DNORD dword? x dword? ; size of triangle ;nurber of SPACEs to print ;nuber of 'x's to print .code main proc mov edx, offset prompt call WriteString call ReadDec ;put address prompt string into EDX - for WriteString iwrite 3tring starting at EDX ; read from keyboard into EAX mov ecx, count ; counter for outer loop L2: ; inner loop mov al, '.' ; write spaces call MriteChar Loop 12 ; repeat the inner loop mov al, 'x'2nd int loop call KriteChar ; rite spaces loop L3 loop 11; repeat the outer loop
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started