Re: A85: Re: newbster. :-P VERIFY this, advanced programmers...


[Prev][Next][Index][Thread]

Re: A85: Re: newbster. :-P VERIFY this, advanced programmers...




In a message dated 98-06-17 01:04:03 EDT, you write:

> Hmm... well, at the risk of being flamed (just kidding ;P) for being only an
>  intermediate programmer I THINK I may know your problem--s--.
>  
>  First of all...
>  
>  ld b,32
>   ld c,32
>  ld hl,&A_shape
>  This is fine... I think. I'm still programming in ZShell, but that looks 
> cool
>  from what little I know of usgard.
That is fine
>  
>  But whoa...
>   ld a,4
>   out (5),a
>  THIS should be done only ONCE and at the VERY beginning (or initialization)
> of
>  your program... continuing:
>  
>  This is fine... (from what I know...)
>   #fncall PSPR_NR
that's fine
>  But...
>  
>  DITCH this... I have never reset that value for any reason... from what I 
> know
>  it should stay as "4" through the whole program... guys, am I missing out
on
>  something?
>   ld a,0
>   out (5),a
>  
>  Sprite data always (in my programs) goes at the End of a program... AFTER 
> your
>  routines and before .end . . . never in the middle. Now that I think of it,
> I
>  don't think putting it in your code messes anything up, but it makes for an
>  extremely jumbled program...
It would be fine to put it there, but messy and not ny faster, or smaller
>  A_shape:
>   .db 8,8
>   .db %00000000
>   .db %11111110
>   .db %10000010
>   .db %10000010
>   .db %10000010
>   .db %10000010
>   .db %10000010
>   .db %11111110
>  There's my reasons for your fixed code that's coming right up...
>  
>  Modified code(from what I know):
>  InitProgram:  ;wherever the beginning of your program is, only once.
period.
>  LD A, 4
>  OUT (5), A
>  
>  DisplayA_shape:
>   ld b,32
>   ld c,32
>   ld hl,&A_shape

>   ;someone elaborate on whether he has to LD DE, (PROGRAM_ADDR)
>   ;ADD HL, DE
You don't need to do these 2 lines in usgard.^^^
ld hl,&A_shape gets the absolute address of A_shape in hl, not the offset like
in ZShell, so you don't have to add PROGRAM_ADDR to it.


>   #fncall PSPR_NR
>  
>  Sprite data at the end of your executable code is desirable...
>  A_shape:
>   .db 8,8
>   .db %00000000
>   .db %11111110
>   .db %10000010
>   .db %10000010
>   .db %10000010
>   .db %10000010
>   .db %10000010
>   .db %11111110
>  
>  I really hope that helped.. maybe it did, maybe not. :D
>  
>  -Josh Morris
>   DorkReMi@aol.com
>