I am having issues getting any output from this program ~unless~ it is run directly from DCS. I have checked, homerun is on.


Code:

#INCLUDE "ti83plus.inc"
#INCLUDE "dcs7.inc"
.ORG    userMem - 2
.DB     $BB,$6D
   XOR D
   RET
   JR Start
;Description
.DW Descrip
.DB 7,0               ;still wondering what this is for...
;Icon
.DW Icon
;ALE
.DW $0000            ;May implement later, but not now.
Start:

   B_CALL(_ClrLCDFull)      ;ready text buffer by clearing it
   LD HL,0
   LD (CurRow),HL   

   B_CALL(_RclAns)         ;Get data in Ans (which should be a progname!)
   LD HL,(OP1)         ;Transfer it to a more permanent spot
   LD (Ram1),HL
   B_CALL(_PutS)         ;Display Ans to check and make sure copy is working

Quit:
   RET

;Data

Ram1:
.DB 0,0,0,0,0,0,0,0
.DB 0
Descrip:
.DB "Ignition Engine",0
Icon:
.db $EE,$97,$4A,$D2,$4E,$B2,$E2,$97,$0E,$00,$00,$00,$FF,$FF,$00,$00

.db $FF,$FF,$00,$00,$00,$00,$00,$00,$4B,$40,$AB,$43,$EA,$65,$AA,$57


   RET


any thoughts?
Can you be more specific than "issues"? Does the text appear for a second and then instantly disappear? Do you not see anything at all? Try setting textwrite,(iy+sgrflags) at the beginning and see if it makes a difference.
What in the world are you trying to do?

First, LD HL,(OP1) \ LD (Ram1),HL isn't going to work. It's clear from the context you want to copy all nine bytes, but that only copies 2. Use the Mov9FrOP1 BCALL to copy 9 bytes.

Second, RclAns isn't going to recall a STRING into OP1. (What if the string is more than 11 bytes?) If you want to pass an argument string to your program in OP1, you'll need something more complicated. Here's some code from a program I wrote that converts programs into appvars. Note that it won't accept a name that contains any multicharacter tokens, like "ZDecimal" or "Str1".

Code:
   ; Convert Ans into string and store result into OP1+1
   ; Get the location of the data in Ans
   b_call(_AnsName)
   rst   10h   ; rFINDSYM
   jr   c, error
   ; Is Ans a string?
   ld   a, (hl)
   cp   StrngObj
   jr   nz, error
   ; Check Ans data
   ex   de, hl
   ld   a, (hl)
   inc   hl
   or   a   ; Ans length must be more than zero
   jr   z, error
   cp   16   ; And less than 16
   jr   nc, error
   ld   b, a
   ld   a, (hl)
   inc   hl
   or   a   ; If high byte of length is non-zero, Ans length is more than 255 and way too big
   jr   nz, error
   ; Ans will be a string of TOKENS, so we need to ASCIIize it.
   ld   de, OP1+1
_:   push   de
   push   bc
   push   hl
   b_call(_Get_Tok_Strng)   ; Token into string
   pop   hl
   ld   a, c
   cp   1      ; String should only have 1-character-long tokens
   jr   nz, errorTwoPops
   ld   a, (hl)
   b_call(_IsA2ByteTok)   ; Some tokens are two bytes long, namely the lowercase letters
   jr   nz, +_
   inc   hl
_:   inc   hl
   pop   bc
   pop   de
   ld   a, (OP3)
;   b_call(_PutC)
   ld   (de), a
   inc   de
   djnz   --_
   ; Name is converted; now you can do whatever you want with it
; Do stuff here


errorTwoPops:
   pop   af
   pop   af
error:
; Show error message, or something
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement