Re: LZ: my new prog


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

Re: LZ: my new prog



On Mon, 23 Sep 96 23:35:29 UT, you wrote:
>Hey was up i am new to zshell programming.. i tried to make a program =
that=20
>would draw pixels corresponding to the keys pressed... (like etch a=20
>sketch).... here it is... it dont work.... if someone can help let me =
know=20
>(jblaze77@msn.com)...
>
>> #include "ti-85.h"
>> .org 0
>> .db "By Frank Apap",0
>> Init:
>>  ld a,4
>>  out (5),a
>>  ROM_CALL(CLEARLCD)
>>  ld b,40                   ; x start
>>  ld c,30                   ; y start
>> Start:
>>     call GET_KEY   ; get a key
>>     cp $04         ; up ?
>>     CALL_(up)
>>     cp $01         ; down?
>>     CALL_(down)
>>     cp $02           ; left?
>>     CALL_(left)
>>     cp $03        ; right
>>     CALL_(left)
>>     cp $37              ;exit
>>     CALL_(exit)
>>     JUMP_(Start)    ; loop
>> up:
>>   inc b  ; x=3Dx+1
>>   CALL_(PlotPixel) ; draw it
>>   ret
>> down:
>>      dec b ; x=3Dx-1
>>      CALL_(PlotPixel)
>>      ret         =20
>> right:
>>   inc c  ; y=3Dy+1
>>   CALL_(PlotPixel) ; draw it
>>   ret               ; go back
>> left:
>>   dec c  ; y=3Dy-1
>>   CALL_(PlotPixel) ; draw it
>>   ret               ; go back
>> PlotPixel:
>>     ROM_CALL(FIND_PIXEL)
>>     ld de,$FC00
>>     add hl,de
>>     or (HL)
>>     ld (HL),a
>>     ret
>> exit:
>>      ROM_CALL(CLEARLCD)
>>      ld hl,$1A1A
>>      ld ($8333), hl
>>      ld hl, (PROGRAM_ADDR)
>>      ld de,bye
>>      add hl,de
>>      ROM_CALL(D_ZM_STR)
>>      ret z
>> bye: .db "BYE THANKS FOR TESTING",0
>> .end
>=20
I made a program EXACTLY like this it is in Zteach2.zip at
www.ticalc.org
Eric Linenberg
elinenbe@umich.edu


for information on EVERYBODY from High School go to
http://www.umich.edu/~elinenbe/


im that kid in the corner all fucked up and i wanna so im gonna=20
take a piece of the pie why not im not quittin think im gonna change
up my style just to fit in
-Beastie Boys


References: