Re: LZ: MenuText .2b


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

Re: LZ: MenuText .2b



d5w@aegis.nitco.com wrote:
> 
> I successfuly ran tasm on this with 0 errors, can Anyone tell me why this
> crashes my calc?
> #include "TI-85.h"
> 
> .org 0
> .db "MenuText v.1b", 0
> 
> Main:
>          ROM_CALL(CLEARLCD)
>          ld     hl,$0101
>          ld ($8333),hl
> get:
>          call GET_KEY  ;Get the number of the key pressed
>          cp     $37
>          ret    z
>          cp     $0
>          jr     z, get
> gogetsml:
>          JUMP_(getsmall)
> 
> chara:
>           cp     $36   ;check if 2nd was pressed
>           jr     z, gogetsml ;if so goto small text routine
>           ld B, $2E     ;Store the Keycode for "A" into B
>           cp B         ;Compare A & B
>           jr NZ, charb  ;If NZ flag is set goto charb (Check if "A" was
> pressed)
>           ld A, 'A'     ;Load 'A' into A
>           ROM_CALL(M_CHARPUT) ;output 'A' at coord. 1,1
>           JUMP_(get)
> charb
>                   ld B, $26
>                   cp B
>                   jr NZ, charc
>                   ld A, 'B'
>                   ROM_CALL(M_CHARPUT)
>                   JUMP_(get)
> charc:
>                   ld B, $1E
>                   cp B
>                   jr NZ, chard
>                   ld A, 'C'
>                   ROM_CALL(M_CHARPUT)
>                   JUMP_(get)
> Repeat down to Z
> 
> charz:
>                   ld B, $19
>                   cp B
>                   jr NZ, space
>                   ld A, 'Z'
>                   ROM_CALL(M_CHARPUT)
>                   JUMP_(get)
> space:
>                   ld B, $03
>                   cp B  ;see if right arrow pressed
>                   jr NZ, creturn ;if not go on
>                   ld A, ($8334) ;if so store ($8334) -> A
>                   inc A ;add one to A
>                   ld ($8334), A ;put back to address
>                   JUMP_(get)
> creturn:
>                   ld B, $09
>                   cp B ;see if enter pressed
>                   jr NZ, exitprog ;no, quit
>                   ld A, ($8333) ; increase the line by one
>                   inc A
>                   ld ($8333), A
>                   ld A, $01
>                   ld ($8334), A ;store 1 in the column
>                      JUMP_(get)
> exitprog:
>                   ret z
> 
> getsmall:
>          call GET_KEY  ;Get the number of the key pressed
>          cp     $37
>          ret    z
>          cp     $0
>          jr     z, getsmall
> gogetlg:
>          JUMP_(get)
> chara1:
>           cp     $36
>           jr     z, gogetlg
>           ld B, $2E     ;Store the Keycode for "A" into B
>           cp B         ;Compare A & B
>           jr NZ, charb1  ;If NZ flag is set goto charb (Check if "A" was
> pressed)
>           ld A, 'a'     ;Load 'A' into A
>           ROM_CALL(M_CHARPUT) ;output 'A' at coord. 1,1
>           JUMP_(getsmall)
> charb1:
>                   ld B, $26
>                   cp B
>                   jr NZ, charc1
>                   ld A, 'b'
>                   ROM_CALL(M_CHARPUT)
>                   JUMP_(getsmall)
> charc1:
>                   ld B, $1E
>                   cp B
>                   jr NZ, chard1
>                   ld A, 'c'
>                   ROM_CALL(M_CHARPUT)
>                   JUMP_(getsmall)
> repeat down to z
> charz1:
>                   ld B, $19
>                   cp B
>                   jr NZ, space1
>                   ld A, 'z'
>                   ROM_CALL(M_CHARPUT)
>                   JUMP_(getsmall)
> space1:
>                   ld B, $03
>                   cp B  ;see if right arrow pressed
>                   jr NZ, creturn1 ;if not go on
>                   ld A, ($8334) ;if so store ($8334) -> A
>                   inc A ;add one to A
>                   ld ($8334), A ;put back to address
>                   JUMP_(getsmall)
> creturn1:
>                   ld B, $09
>                   cp B ;see if enter pressed
>                   jr NZ, exitprog1 ;no, quit
>                   ld A, ($8333) ; increase the line by one
>                   inc A
>                   ld ($8333), A
>                   ld A, $01
>                   ld ($8334), A ;store 1 in the column
>                      JUMP_(getsmall)
> 
> exitprog1:
>                   ret   z
> 
> .end
> Thanx!
> Nick Leskiw
> d5w@mail.nitco.com
> --
> -The Light at the End of the Tunnel has been permenantly
> disconnected due to financial problems.
> 
> http://ww2.netnitco.net/users/d5w/nick.html
i don't know what your problem is but ticalc.org has a program that does
what you want to do on it.
PCoMP
Visit Maximus Productions home page at: http://www.ntsource.com/~pcomp


References: