| | |
I need help with matrix color
![]() |
•
•
Join Date: Dec 2008
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 1:36 pm. Reason: Added code tags
![]() |
Similar Threads
- 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: 647 | Replies: 0
| Thread Tools | Search this Thread |
Tag cloud for Assembly
68hc11 6811 80386 :( adress array asm assembler assembly boot bootloader buffer call compression cursor directory display div division docs dos emulator endtask error exceptions file int10h integer intel interrupt interrupts language loop main mmx multiple newbie nohau osdevelopment print program range read remainder string text theory tsr x86





