; *** Chartest ver 1.1 (C) 1997 by Dines Justesen *** ; ; This program will let you show all the characters ; in the TI82's 5x7 font, and the small font. Press ; up/down to chose which char to show and mode to exit. ; The program will not show small chars for chars >226 ; because these are not included in the font. Press ; mode to exit. #include "ti82.h" ; Std. include file .ORG START_ADDR .DB "Chartest ver 1.1 by DJ",0 TEXT_START ; Std text intro SET 3,(IY+05) ; Display white on black LD HL,TitleStr ; Display title ROM_CALL(D_ZT_STR) LD HL,$0007 ; Goto 7,0 LD (CURSOR_POS),HL LD HL,NameStr ; Display name ROM_CALL(D_ZT_STR) LD HL,$0003 ; Goto 3,0 LD (CURSOR_POS),HL RES 3,(IY+05) ; Display black on white LD HL,CharStr ; Display char line ROM_CALL(D_ZT_STR) LD HL,$0005 ; Goto 5,0 LD (CURSOR_POS),HL LD HL,NumStr ; Display num line ROM_CALL(D_ZT_STR) LD HL,$2000 ; Goto x,y LD (8215h),HL ; Set graph cursor LD HL,SmallStr ; Display Str ROM_CALL(D_ZM_STR) LD A,0 ; Initialize char number to 0 Main: LD B,A ; Save char in b LD HL,$0805 ; Goto position (5,8) LD (CURSOR_POS),HL LD H,0 ; Show number of char LD L,B ROM_CALL(D_HL_DECI) LD A,B ; Display char LD HL,$0C03 ; Goto position (3,C) LD (CURSOR_POS),HL ROM_CALL(TR_CHARPUT) LD HL,$0C04 ; Delete previus small char LD (CURSOR_POS),HL LD A,32 ROM_CALL(TR_CHARPUT) LD A,B ; Get char CP 227 JR NC,Keyloop LD HL,$2048 ; Set graph cursor LD ($8215),HL ROM_CALL(M_CHARPUT) ; Display char Keyloop: CALL GET_KEY ; Get key CP 1 ; Was down pressed JR Z,Decchar ; Yes get char below CP 4 ; Was up pressed JR Z,Incchar ; Yes get char above CP $37 ; Was mode (quit) pressed? JR NZ,Keyloop ; No loop until a key has been pressed TEXT_END RET Decchar: LD A,B ; Restore char number OR A ; Set flags JR Z,Main ; If at char #0 then loop DEC A ; Get next char JR Main ; Loop Incchar: LD A,B ; Restore char number INC A ; Get next char JR NZ,Main ; If no overflow then loop LD A,$0FF ; Set to last char JR Main ; loop TitleStr: .DB "Chartest ver 1.1",0 CharStr: .DB "Char : ",0 NumStr: .DB "Number : ",0 NameStr: .DB " Dines Justesen ",0 SmallStr: .DB "Small char:",0 .END