Advertisement
Zeda

DispStr1

Jan 28th, 2019
561
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include "ti83plus.inc"
  2. .db t2ByteTok,tAsmCmp
  3. .org $9D95
  4.     bcall(_ClrLCDFull)
  5.     ld hl,Str1Name
  6.     rst rMov9ToOP1
  7.     rst rFindSym
  8.     ret c           ;exit if the string doesn't exist
  9.     ex de,hl
  10.     ld c,(hl)       ;Get the size of the string
  11.     inc hl          ;
  12.     ld b,(hl)       ;
  13.     inc hl          ;
  14.  
  15. loop:
  16.     ld a,(hl)
  17.     ld e,(hl)       ;Load the token into DE. First assume a 1-byte token
  18.     ld d,0
  19.     bcall(_IsA2ByteTok);Check if first token is 2 bytes z=two bytes
  20.     jr nz,_
  21.     inc hl      ;Need to fetch next byte into D
  22.     dec bc      ;Need to remove 1 from the number of bytes left
  23.     ld d,(hl)
  24. _:
  25.     push hl
  26.     push bc
  27.     bcall(_PutTokString)
  28.     pop bc
  29.     pop hl
  30.     cpi         ;Increments HL, decrements BC
  31.     jp pe,loop  ;Loops until BC is 0
  32.     ret
  33. Str1Name:
  34.     .db StrngObj,tVarStrng,tStr1,0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement