Convert to 83asm!!


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

Convert to 83asm!!



This is the source to the small, usefull utility called program hider.
All it does is display text, it would be soo easy to convert.  I need it
for the 83 because everybody else at my school has an 83 and they need
it for class.
D_ZT_STR = displays a zero termination string in normal text at current
location
set 3,(iy+05) = write inverse text
res 3,(iy+05) = write normal text
Somebody, please convert this! It is easy!!

#INCLUDE "ti82.h"

STATUS = TEXT_MEM+1  ;the only variable

 .ORG START_ADDR
 .DB "Program Hider",0

        jp FIRST
          ld a,1
        ld (STATUS),a
MAIN:
        HALT
        call GET_KEY  ;get key press into a
        cp $03
        jr z,RIGHT
        cp $02
        jp z,LEFT
        cp 15
        jr z,QUIT
        jr MAIN
QUIT:
        RET
RIGHT:
        ld a,(STATUS)
        inc a
          ld (STATUS),a
        cp 4
        jp z,FIRST
        cp 3
        jp z,LAST
        cp 2
        jp z,MIDDLE
LEFT:
        ld a,(STATUS)
        dec a
        ld (STATUS),a
          cp 0
        jp z,LAST
        cp 1
        jp z,FIRST
        cp 2
        jp z,MIDDLE
FIRST:
        ROM_CALL(CLEARLCD)  ;clear screen
        ld a,1
        ld (STATUS),a
        ld hl,$0000
        ld (CURSOR_ROW),hl  ;screen row
        ld hl,EXEC
        SET 3, (IY+05)
        ROM_CALL(D_ZT_STR)
        RES 3, (IY+05)
        ld hl,$0500
        ld (CURSOR_ROW),hl
        ld hl,EDIT
        ROM_CALL(D_ZT_STR)
        ld a,10
          ld (CURSOR_COL),a  ;screen column
          ld a,0
          ld (CURSOR_ROW),a
        ld hl,NEW  ;string to display
        ROM_CALL(D_ZT_STR)
        jp MAIN
MIDDLE:
        ROM_CALL(CLEARLCD)
        ld hl,$0000
        ld (CURSOR_ROW),hl
        ld hl,EXEC
        ROM_CALL(D_ZT_STR)
        ld hl,$0500
        ld (CURSOR_ROW),hl
        SET 3, (IY+05)
        ld hl,EDIT
        ROM_CALL(D_ZT_STR)
        RES 3, (IY+05)
        ld a,10
          ld (CURSOR_COL),a
          ld a,0
          ld (CURSOR_ROW),a
        ld hl,NEW
        ROM_CALL(D_ZT_STR)
        jp MAIN
LAST:
        ROM_CALL(CLEARLCD)
        ld a,3
        ld (STATUS),a
        ld hl,$0000
        ld (CURSOR_ROW),hl
        ld hl,EXEC
        ROM_CALL(D_ZT_STR)
        ld hl,$0500
        ld (CURSOR_ROW),hl
        ld hl,EDIT
        ROM_CALL(D_ZT_STR)
        ld a,10
          ld (CURSOR_COL),a
          ld a,0
        ld (CURSOR_ROW),a
        SET 3,(IY+05)
        ld hl,NEW
        ROM_CALL(D_ZT_STR)
        ld hl,$0001
        ld (CURSOR_ROW),hl
        ld hl,NUMBER1
        ROM_CALL(D_ZT_STR)
        RES 3,(IY+05)
        ld hl,$0201
        ld (CURSOR_ROW),hl
        ld hl,CREATE
        ROM_CALL(D_ZT_STR)
        jp MAIN


EXEC:
        .db "EXEC",0
EDIT:
        .db "EDIT",0
NEW:
        .db "NEW",0
NUMBER1:
        .db "1:",0
CREATE:
        .db "Create New",0

.end
.end