Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Monochrome screen- AsmPrgm21AE9DE7D73803EF5143210400EF274321B39D010600EDB0C904AA0000000400BB9CBBD1
- C Silver Edition- Asm84CPrgm2124A6E7D73803EF4843210400EF1E432129A6010600EDB0C904AA0000000400BB9CBBD1
- ;-------- below is the original assembly code (fairly straightforward, as the system routines do all the important work) --------
- ; documentation of the b_call()s can be downloaded at http://education.ti.com/~/media/01E6AF2CADF84171B6F2E2039357BAAC
- .nolist
- #include "ti84pcse.inc" ;ti83plus.inc for monochrome calculators
- .list
- .org UserMem - 2
- .db tExtTok,tAsm84CCmp ;if using ti83plus.inc, change this to `.db t2ByteTok, tAsmCmp`
- ld hl, name
- 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
- rst rFindSym ;resets the carry flag (c) if the variable exists, and sets it otherwise
- jr c, NotFound ;skip the call to _DelVar if the variable exists
- b_call(_DelVar)
- NotFound:
- ld hl, 4 ;size of string
- b_call(_CreateStrng) ;Output: HL pointing to the VAT entry (not important right now), DE pointing to the data
- ld hl, string ;hl now points to the string variable, allowing ldir to properly insert the string data
- ld bc, 6 ;size of string including size bytes
- ldir
- ret
- name:
- .db StrngObj,tVarStrng,tStr1,0,0 ;copy/pasted from 83psysroutines.pdf
- string:
- .dw $0004, $9CBB, $D1BB ;two bytes for size, diaeresis token, @ token
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement