home *** CD-ROM | disk | FTP | other *** search
/ ticalc.org / ticalc_org_rev_b.iso / archives / 83 / asm / source / sos / charmap.asm < prev    next >
Encoding:
Assembly Source File  |  2001-07-01  |  767 b   |  66 lines

  1. #define EQU .equ
  2. #define end .end
  3.  
  4. #include "ti83asm.inc"
  5. .org     9327h
  6.  
  7.  
  8.   ccf
  9.   jr    Start
  10. .dw    $0000
  11. .dw    Title
  12.  
  13. KeyLoop:
  14.  call    $4014
  15.  or    a
  16.  jr    z,KeyLoop
  17.  sub    2
  18.  ld    c,a
  19.  ld    a,(Loc)
  20.  jr    z,Decrease
  21.  dec    c
  22.  jr    z,Increase
  23.  ret
  24.  
  25. Start:
  26.  set 3,(iy+$05)
  27.  call _homeup
  28.  ld hl,Title
  29.  call _puts
  30.  res 3,(iy+$05)
  31.  
  32.  call _newline
  33.  call _newline
  34.  ld hl,Char
  35.  call _puts
  36.  
  37. Increase:
  38.  inc    a
  39.  inc    a
  40. Decrease:
  41.  dec    a
  42. DispIt:
  43.  ld    (Loc),a
  44.  push    af
  45.  cp    214
  46.  jr    nz,CharGood
  47.  ld    a,' '
  48. CharGood:
  49.  ld    hl,12*256+3
  50.  ld    (currow),hl
  51.  call    _putc
  52.  ld    hl,8*256+4
  53.  ld    (currow),hl
  54.  pop    af
  55.  ld    h,0
  56.  ld    l,a
  57.  call    _disphl
  58.  jr    KeyLoop
  59.  
  60. Title:  .db "CharMap v1 by AE",0
  61. Char:     .db "Charecter:      "
  62. Number:    .db "Number:",0
  63. Loc:    .db    0
  64.  
  65. .end
  66.