Device: TI-83 Plus
OS: TI-OS 1.19

So, I keep getting this ERR:DATA TYPE with this code

Code:
If not(D
Then
28->B
Else
real(5,1->B
End
Output(7,11,B
B:Asm(prgmθCNTRST

The error occurs on the last line. The odd part is, it works fine anywhere in the entire calculator. The problem only occurs on that one line, even though it runs fine on a TI-84 Plus and in Doors CS 7, and even when the identical line is executed in the same program. BUT, if you successfully call the assembly program and then you run the problem line in the program, it freezes for a second and the calculator crashes. This problem has NEVER occurred before. I have reset ALL memory and it still is unresolved.

Even MORE info:
B=28
B is a real number.
No hooks or anything of the like were installed.
Asm(prgmθCNTRST only accepts whole number real values from -39 to 39. Anything else will NOT result in ERR:DATA TYPE, but instead, the contrast is set to 0.
Asm is squished but here is the code

Code:
AsmPrgmABEFD74AEFEF4AC6D8D8D3107B324784C9

The bug is not in Doors (because it isn't installed) but in the OS itself. Why only now?
Can you please present the ASM program as assembly source code rather than hex?
I'm 99% sure that ASM code is wrong. Disassembling gives me this:

Code:
   xor e
   B_CALL(_RclAns)
   B_CALL(_ConvOP1)
   add a,$D8
   ret c
   out ($10),a
   ld a,e
   ld ($8447),a
   ret

First of all, it doesn't set the contrast to 0 if B>39, it just returns and doing nothing. Second, the "xor e" seems unusable to me, since you don't know the value of e. I would try this code instead:

Code:
bcall(_RclAns)
bcall(_ConvOP1)  ; e=contrast
ld a, $D8
add a, e
jr nc, $+4
ld e, 0
ld a, e
ld (contrast), a
add a, $C0
out ($10), a
ret
Comments2010 wrote:

Code:
real(5,1->B


?? wuts dis
EDIT
Comments2010 wrote:
TI-83 Plus

Oops, I forgot that the commands changed in the newer versions of Doors, I'm really used to using DoorsCSE, in which real(5,1 loads a pic. Let's pretend this never happened xD
PT_ wrote:
I'm 99% sure that ASM code is wrong. Disassembling gives me this:

Code:
   xor e
   B_CALL(_RclAns)
   B_CALL(_ConvOP1)
   add a,$D8
   ret c
   out ($10),a
   ld a,e
   ld ($8447),a
   ret

First of all, it doesn't set the contrast to 0 if B>39, it just returns and doing nothing. Second, the "xor e" seems unusable to me, since you don't know the value of e. I would try this code instead:

Code:
bcall(_RclAns)
bcall(_ConvOP1)  ; e=contrast
ld a, $D8
add a, e
jr nc, $+4
ld e, 0
ld a, e
ld (contrast), a
add a, $C0
out ($10), a
ret

The xor e (AB) is there to prevent it from showing on the Doors CS desktop
mr womp womp wrote:
Comments2010 wrote:

Code:
real(5,1->B


?? wuts dis

That is the XLib command for ChngConstrast, it stores the current contrast value to ans. This only executes if D≠0. D=1 only if 1337=det([[42 (to save bytes by doing that once and just checking the value when needed instead of calculating) which means Doors CS Basic Library is enabled. This essentially stores the contrast level to B.
I SOLVED IT!
The problem is odd. It only affects the 83 Plus, but not the 84 Plus. It was something that wasn't supposed to be there.

Code:
BB6DAB1200BB6D
I think I need to work on a secret program of mine...
Comments2010 wrote:
PT_ wrote:
[...]Second, the "xor e" seems unusable to me, since you don't know the value of e.[...]

The xor e (AB) is there to prevent it from showing on the Doors CS desktop
Yeah, I was going to mention this too. It's a handy trick to keep ASM subprograms from showing up on the Doors CS desktop, and it works on all versions of Doors CS. There's also Ans and rand for the beginning of TI-BASIC subprograms to prevent them from showing up.
  
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