Re: A83: Help with my rpg


[Prev][Index][Thread]

Re: A83: Help with my rpg




reading from a "list" is really simple.

  ld hl,var      ; hl is a pointer to memory label "var"
  ld a,(hl)      ; returns the element stored at hl

  ; to get an element farther down the list

  ld de,2        ; register de= length
  add hl,de      ; move the pointer "de" spaces down the list
  ld b,(hl)      ; returns element at hl (you can load into most registers)

for more information i suggest you check out asm guru.  If you are planning 
on implementing a tilemap routine, i have a fairly simple one that fills a 
8x12 grid with 8x8 sprites.  That is located at 
http://void.calc.org/programming/

-harper


At 03:45 PM 8/31/00 -0400, you wrote:

>To jedrake: Thanks for the code.
>
>To gte172i: I would try to write it in asm, but the problem is, What i want
>to know, (loading info from list type stuff) i can't find any tutorials about
>it.  And i also need something to do during some of my classes....
>I plan to eventually change it all into asm but for now this seems like the
>best option for me....
>
>Oh and if anyone has any tutorials for reading a list(something like this:
>var:
>     .db 5,5,6
>and get the 3rd number )
>please tell me
>
>Thanks




References: