I need help with matrix color
Please support our Assembly advertiser: Programming Forums
![]() |
•
•
Posts: 1
Reputation:
Solved Threads: 0
Problem: Write a program that displays a single character in all possible combinations of foreground and background colors (16x16 = 256). The colors are numbered from 0 to 15, so you can use a nested loop to generate all possible combinations.
Here is what I tried, but it doesnot come out right. Could anyone help me, please?. I am a newbie at this language.
Here is what I tried, but it doesnot come out right. Could anyone help me, please?. I am a newbie at this language.

asm Syntax (Toggle Plain Text)
INCLUDE Irvine32.inc .data text BYTE "Hello!" .code main PROC ;mov ecx,17 mov cx,17 mov ch,1 mov cl,4 ; right L1: mov ax,blue mov ax,cx call setTextColor mov ah,ch ;dec ah call setTextColor mov al,cl call setTextColor ;mov ax,cx + (blue*27) call setTextColor ;mov eax,ecx ;call setTextColor mov edx,offset text call writeString loop L1 exit main ENDP END main
Last edited by cscgal : Dec 5th, 2008 at 12:36 pm. Reason: Added code tags
![]() |
Similar Threads
Other Threads in the Assembly Forum
- Transpose matrix (w\ pointers) (C)
- Vector of vectors & magic square issues (C++)
- How to make matrix? (Perl)
- is this matrix code working? (C++)
- Homework assistance (C++)
- Dynamic Memory Allocation - offset pointers (C)
- Great Server (Web Hosting Deals)
Other Threads in the Assembly Forum
- Previous Thread: Need help in LC# code
- Next Thread: NEED HELP! (hex to decimal output)
•
•
•
•
Views: 358 | Replies: 0 | Currently Viewing: 1 (0 members and 1 guests)





Linear Mode