[Coco] ASM Coders - please help!

Gene Heskett gene.heskett at verizon.net
Tue Aug 29 05:54:29 EDT 2006


On Monday 28 August 2006 23:47, Robert Gault wrote:
>David Roper wrote:
>><snip>
>> CLRSCRN ldy HSCLEN
>>        ldx HRESSCRN
>> CLRLOOP clr ,X+
>>        leay -1,Y
>>        bne CLRLOOP
>> ENDLOOP jmp ENDLOOP
>>   HRESSCRN equ $2000
>> HSCLEN   equ $2000
>>
>>         end START
>>
>> So!
>>
>> What I end up seeing (in MESS, at least) is a screen of alternating
>> vertical black and green lines.. and not much else
>>
>> I'm missing something, or messed something up, or generally on the
>> wrong track *somewhere*, and I'm sure someone out there will have much
>> more luck explaing where, and why I've gone wrong!
>>
>> Any takers to place me under their wing?
>>
>> Kind regards,
>> David
>
>Here's the problem. Note the ldx and ldy values which are equivalent to
>    ldy  $2000
>    ldx  $2000
>That is not what you wanted or need. What you actually will get is
>unknown since the contents of $2000-$2001 will vary depending on what is
>present on the hi-res graphics screen.
>
>You really need
>    ldy  #$2000
>    ldx  #$2000
>because regX is a pointer to the start of the screen and regY is a
> counter.
>
>And by the way, the value for regY is not large enough to clear the
>entire screen if that was intended. A 320x200x16 screen requires $7D00
>bytes.

Ignore my wanderings, Robert is dead on here.

-- 
Cheers, Gene
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Yahoo.com and AOL/TW attorneys please note, additions to the above
message by Gene Heskett are:
Copyright 2006 by Maurice Eugene Heskett, all rights reserved.



More information about the Coco mailing list