Question: 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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!