Advertisement
invisibowl

diaeresis and @ symbols

Jul 3rd, 2015
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Monochrome screen- AsmPrgm21AE9DE7D73803EF5143210400EF274321B39D010600EDB0C904AA0000000400BB9CBBD1
  2. C Silver Edition- Asm84CPrgm2124A6E7D73803EF4843210400EF1E432129A6010600EDB0C904AA0000000400BB9CBBD1
  3.  
  4. ;-------- below is the original assembly code (fairly straightforward, as the system routines do all the important work) --------
  5. ; documentation of the b_call()s can be downloaded at http://education.ti.com/~/media/01E6AF2CADF84171B6F2E2039357BAAC
  6. .nolist
  7. #include "ti84pcse.inc"     ;ti83plus.inc for monochrome calculators
  8. .list
  9.     .org UserMem - 2
  10.     .db tExtTok,tAsm84CCmp  ;if using ti83plus.inc, change this to `.db t2ByteTok, tAsmCmp`
  11.     ld hl, name
  12.     rst rMov9ToOP1      ;_FindSym and _CreateStrng expect the variable's name to be in OP1. Same as b_call(_Mov9ToOP1), but smaller and a bit faster
  13.     rst rFindSym        ;resets the carry flag (c) if the variable exists, and sets it otherwise
  14.     jr c, NotFound      ;skip the call to _DelVar if the variable exists
  15.     b_call(_DelVar)
  16. NotFound:
  17.     ld hl, 4        ;size of string
  18.     b_call(_CreateStrng)    ;Output: HL pointing to the VAT entry (not important right now), DE pointing to the data
  19.    
  20.     ld hl, string       ;hl now points to the string variable, allowing ldir to properly insert the string data
  21.     ld bc, 6        ;size of string including size bytes
  22.     ldir
  23.     ret
  24.    
  25. name:
  26.     .db StrngObj,tVarStrng,tStr1,0,0    ;copy/pasted from 83psysroutines.pdf
  27. string:
  28.     .dw $0004, $9CBB, $D1BB     ;two bytes for size, diaeresis token, @ token
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement