Re: A82: The Speed82 Competition
[Prev][Next][Index][Thread]
Re: A82: The Speed82 Competition
In a message dated 98-01-28 21:03:09 EST, you write:
> CURRENT STANDINGS:
> 0 Asm82@aol.com
> 0 Your name here
>
> Welcome to the Speed82 competition!
>
> Every week, I will post a problem that you must solve. Those who
> participate
> will get their names posted in the next mailing of this letter and on a web
> page whose address is yet to be announced. Next to their email address
will
> be their total score (keep reading to find out how the points work).
>
> THE POINT SYSTEM:
> 1 point for participating
> 5 points for the most creative approach to solving the problem
> 10 points given to the person who submits the smallest amount of working
> code
> 10 points given to the fastest working code
>
> THE PROBLEM:
> You must create a subroutine that takes a value in register A. A has
either
> the value 1,2, or 3. Depending on the input in A, you must fill the screen
> with one of three different characters, depending on what the value in A
is.
>
> Example:
> if A has the value 1, the screen is completely filled with 'A's
> if A has the value 2, the screen is filled with 'B's
> if A has the value 3, the screen is filled with 'C's
>
Ok-- I will do it the easy way
thing:
cp 1
jr z, filla
cp 2
jr z, fillb
cp 3
jr z, fillc
ret
filla:
ld hl, texta
ROM_CALL(D_ZT_STR)
ret
fillb:
ld hl, textb
ROM_CALL(D_ZT_STR)
ret
fillc:
ld hl, textc
ROM_CALL(D_ZT_STR)
ret
texta:
.db "AAAAAAAAAAAAAAAA"
.db "AAAAAAAAAAAAAAAA"
.db "AAAAAAAAAAAAAAAA"
.db "AAAAAAAAAAAAAAAA"
.db "AAAAAAAAAAAAAAAA"
.db "AAAAAAAAAAAAAAAA"
.db "AAAAAAAAAAAAAAAA"
.db "AAAAAAAAAAAAAAAA",0
textb:
.db "BBBBBBBBBBBBBBBB"
.db "BBBBBBBBBBBBBBBB"
.db "BBBBBBBBBBBBBBBB"
.db "BBBBBBBBBBBBBBBB"
.db "BBBBBBBBBBBBBBBB"
.db "BBBBBBBBBBBBBBBB"
.db "BBBBBBBBBBBBBBBB"
.db "BBBBBBBBBBBBBBBB",0
textc:
.db "CCCCCCCCCCCCCCCC"
.db "CCCCCCCCCCCCCCCC"
.db "CCCCCCCCCCCCCCCC"
.db "CCCCCCCCCCCCCCCC"
.db "CCCCCCCCCCCCCCCC"
.db "CCCCCCCCCCCCCCCC"
.db "CCCCCCCCCCCCCCCC"
.db "CCCCCCCCCCCCCCCC",0
Follow-Ups: