Re: LZ: zshell programming


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

Re: LZ: zshell programming



Will Stokes (3D Diamond productions) wrote:
> 
>                                    wstokes@vertex.ucls.uchicago.edu
>                                    http://www.uic.edu/~hhstokes/index.html
>                                    Will Stokes
> 
>         I'm new at programming in zshell and could always use some help it
> seems. at the moment I'm having two major problems, the first being
> implementing pictures in my assembly code. I conver my .85i picture into
> .db's and get it into my assembly code but after I compile it and run it
> on the calc it draws up an empty screen.
check the file NIBBLES.ASM at TICALC.ORG it has a converted .85i file in
it so look at that code.


>         my second problem has to do with those "if-like" thingies in
> assembly. lets say depending on what register a is I want to load
> different strings to de, say if a=1 string p1, if a=2 string p2, if a=3
> string p3 and so on for values of a 1, 2, 3, 4, and so on up to and
> including 9. how exactly would i test a and then load the correct string
> to de? this is what I have come up with so far:
> 
>         ld b, 1
>         cp b
>         ld de, p1
> 
>         ld b, 2
>         cp b
>         ld de, p2
> 
>         ld b, 3
>         cp b
>         ld de, p3
> 
>         ld b, 4
>         cp b
>         ld de, p4
> 
change the above to this
>         ld b, 1
>         cp b
	  CALL_Z(up1)
>         ld de, p1
> 
>         ld b, 2
>         cp b
	  CALL_Z(up2)
>         ld de, p2
> 
>         ld b, 3
>         cp b
	  CALL_Z(up3)
>         ld de, p3
> 
>         ld b, 4
>         cp b
	  CALL_Z(up4)
>         ld de, p4


up1:
	ld de, p1
	ret
up2:
	ld de, p2
	ret
up3:
	ld de, p3
	ret
up4:
	ld de, p4
	ret
  ..and so on, get the idea?
> ..and so on, get the idea? can anybody help me?
>                         Will Stokes


Peter Cordes of Maximus Productions
Visit Maximus Productions home page at: http://www.ntsource.com/~pcomp


References: