Omnimaga

Calculator Community => TI Calculators => ASM => Topic started by: aeTIos on March 23, 2011, 06:14:45 am

Title: Is this supposed to happen?
Post by: aeTIos on March 23, 2011, 06:14:45 am
Okay, I made this code:
Code: [Select]
#include "ti83plus.inc"
.org 40339
.db $BB,$6D
B_CALL _ClrLCDFull
B_CALL _BufClr
B_CALL _getKey
ret
It turns off the calc, is this supposed to happen?
Title: Re: Is this supposed to happen?
Post by: Ikkerens on March 23, 2011, 06:20:59 am
The origin looks weird to me, but still
Does it turn the screen off? Do you get a RAM-clear or anything?
Title: Re: Is this supposed to happen?
Post by: aeTIos on March 23, 2011, 06:26:00 am
nothing else, only hooks are turned off ( homerun hook of DCS doesnt work until you restart DCS). I dont get any error message

EDIT: It has to do with
Code: [Select]
B_CALL _BufClr
Title: Re: Is this supposed to happen?
Post by: Deep Toaster on March 23, 2011, 06:29:08 am
nothing else, only hooks are turned off ( homerun hook of DCS doesnt work until you restart DCS). I dont get any error message

EDIT: It has to do with
Code: [Select]
B_CALL _BufClr

You sure the calc's off?
Title: Re: Is this supposed to happen?
Post by: aeTIos on March 23, 2011, 06:30:15 am
yes, it only reacts on [On], not on any other keypress
Title: Re: Is this supposed to happen?
Post by: Xeda112358 on March 23, 2011, 08:59:07 am
You will want B_Call _ClrLCDFull. _BufClr clears 768 bytes of memory depending on where the pointer points it to. :D
Title: Re: Is this supposed to happen?
Post by: aeTIos on March 24, 2011, 04:07:06 am
aha lol. so the pointer isnt intialized correctly?
Title: Re: Is this supposed to happen?
Post by: Xeda112358 on March 24, 2011, 10:38:44 am
No, but I am pretty sure there is a GrBufClr or something of that nature. The reason this was include was because the code probably looked something like this:
Code: [Select]
GrBufClr:
 ld hl,plotSScreen
BufClr:
 <<code>>
So it will smaller and the same speed to do bcall(_GrBufClr) than to do ld hl,plotSScreen \ bcall(_BufClr)
Title: Re: Is this supposed to happen?
Post by: Deep Toaster on March 24, 2011, 10:55:45 am
aha lol. so the pointer isnt intialized correctly?

You never initialize HL anywhere in your code. But yeah, use grBufClr or write your own quick routine to clear plotSScreen.