scAFwATLxpKzRCmVaHv wrote:
Thanks for your help!
When I tried ld.sis, the compiler says "value too large for 16-bits, truncation required". Should I just ignore it, or am I doing something wrong?
When I tried ld.sis, the compiler says "value too large for 16-bits, truncation required". Should I just ignore it, or am I doing something wrong?
Nah; that's just a native spasm thing. I'll ask calc84 about it.
EDIT: It might just be a better idea to just do this:
Code:
#define MBASE_OFFSET $D00000
; And usage example:
ld.sis (drawFGcolor-MBASE_OFFSET),hl
scAFwATLxpKzRCmVaHv wrote:
Why is _SetTextFGBGColors being used incorrectly? Because I don't have a background color?
Yeah; that's about it. Sorry; should have explained more.
scAFwATLxpKzRCmVaHv wrote:
I meant the _VPutS and all of the related commands, because I want my email to display in small, navy blue text.
Oh whoops; sorry about that! I wasn't quite sure what was happening. I changed it back.
scAFwATLxpKzRCmVaHv wrote:
On the TI-84+CSE, the resetting of onInterrupt was unnecessary. Are you sure that it's necessary here?
No; it's not at all necessary; it just makes sure that the Err:Break message doesn't appear when exiting your program.
scAFwATLxpKzRCmVaHv wrote:
The loading of 1 onto $E00005 was a trick that I have successfully tested to make the calculator run faster. It is from a program in Cemetech archives called "Faster". I also have a question about this: will long-term usage of this trick damage the calculator?
No; there shouldn't be any adverse affects from this. DrDnar and his tricks.
Also, please disregard my previous statements about penCol only being two bytes in width; I've spent too much time in the OS, and that is how TI loads it every time, which is rather silly. It's actually 24-bit, so you can save to it just fine. Of course, penRow is located at penCol+3 now. *Mateo facepalms*
Anywho, here's some updated code: (You may want to update the include file; I fixed a couple things here and there)
Code:
.nolist
#include "ti84pce.inc"
#define PutMapFlags $4A
#define RED $F800
#define NAVY $0010
#macro bcall(x)
call x
#endmacro
#define MBASE_OFFSET $D00000
.list
.org userMem-2
.db tExtTok,tAsm84CeCmp
PasswordStart:
bcall(_EnableAPD)
ld a,1
ld (apdTimer),a
ld (apdSubTimer),a
set apdRunning,(iy+apdFlags)
bcall(_ClrScrnFull)
bcall(_HomeUp)
ld hl,PressText
bcall(_PutS)
bcall(_NewLine)
bcall(_NewLine)
ld de,RED
ld.sis (textBGcolor-MBASE_OFFSET), de
set 4,(iy+PutMapFlags)
bcall(_PutS)
res 4,(iy+PutMapFlags)
bcall(_NewLine)
bcall(_PutS)
ld bc,$03
ld (penCol),bc
ld a,$50
ld (penRow),a
ld bc,NAVY
ld.sis (drawFGColor-MBASE_OFFSET),bc
bcall(_vPutS)
ld bc,$400
ld hl,Password
KeyPress:
call GetKey
cp (hl)
inc hl
jr z,Asterisk
inc c
Asterisk:
ld a,'*'
bcall(_PutC)
djnz KeyPress
dec c
inc c
jr nz,WrongPassword
bcall(_ClrScrnFull)
res onInterrupt, (iy + onFlags)
ret
WrongPassword:
ld hl,WrongPasswordMsg
bcall(_NewLine)
bcall(_PutS)
bcall(_NewLine)
bcall(_PutS)
call GetKey
jp PasswordStart
GetKey:
push hl
bcall(_GetCSC)
pop hl
or a
jr z,GetKey
ret
PressText:
.db "This calculator belongs to****** ***********.",0
.db "(***) ***-****",0
.db "Password: ",0
.db "******.***********@*******.com",0
WrongPasswordMsg:
.db "Wrong password!",0
.db "Press a key to turn off the calculator.",0
Password:
.db sk0
.db sk0
.db sk0
.db sk0