This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's z80 & ez80 Assembly subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. Z80 & 68k Assembly => z80 & ez80 Assembly
Author Message
Xeda112358


Active Member


Joined: 19 May 2009
Posts: 520

Posted: 16 Jan 2012 03:59:42 pm    Post subject:

How did you enter the opcode? Did you remember that addresses are little endian? Here is the code I got (I haven't tested it yet):

Code:


AsmPrgm   ;this is the header for uncompressed ASM programs
21B69D    ;ld hl,interrupt (the location is at 9DB6
119A9A    ;ld de,9A9Ah
010001    ;ld bc,0100h
EDB0      ;ldir
210099    ;ld hl,9900h
110199    ;ld de,9901
010001    ;ld bc,256
369A      ;ld (hl),9Ah
EDB0      ;ldir
F3        ;di
3E99      ;ld a,99h
ED47      ;ld i,a
ED5E      ;im 2
FB        ;ei
C9        ;ret
;
08D9      ;ex af,af' \ exx
3EFF      ;ld a,$FF
D301      ;out (1),a
3EFD      ;ld a,FDh
D301      ;out (1),a
0000      ;nop \ nop
DB01      ;in a,(1)
CB4F      ;bit 1,a
C23A00    ;jp nz,3Ah
21B69A    ;ld hl,$$9A9A+msg-interrupt
EF0A45    ;bcall(_PutS)
C33A00    ;jp 3Ah
;
48455900  ;.db "HEY",0


EDIT: Tested and it works fine for me Smile
EDIT2: If you want a faster and smaller routine to setup the interrupt, you can do this (4 bytes smaller):

Code:

AsmPrgm   ;this is the header for uncompressed ASM programs
21B29D    ;ld hl,interrupt (the location is at 9DB2)
119A9A    ;ld de,9A9Ah
7A        ;ld a,d
010001    ;ld bc,0100h
EDB0      ;ldir                 ;bc is 0000 after this
3D        ;dec a                ;a is 99
6967      ;ld l,c \ ld h,a      ;hl is now 9900h
04        ;inc b                ;bc is now 256
5758      ;ld d,a \ ld e,b      ;de is now 9901h
369A      ;ld (hl),9Ah
EDB0      ;ldir
F3        ;di
ED47      ;ld i,a
ED5E      ;im 2
FB        ;ei
C9        ;ret


Last edited by Guest on 16 Jan 2012 04:24:11 pm; edited 1 time in total
Back to top
jammasterz


Advanced Newbie


Joined: 28 Nov 2011
Posts: 72

Posted: 17 Jan 2012 02:52:01 am    Post subject:

I edited it a little bit, and then run on the TI emulator. You can see the OPcodes when disassembling. This is what i got:
http://imageshack.us/photo/my-images/80/disassembly1.jpg/
There is also:


Code:
327298    ;LD (AppBackupscreen), A
C33A00    ;JP 003A
48455900  ;HEY


But there wasnt enough space on the screen.
Back to top
asdf


Advanced Newbie


Joined: 17 Aug 2008
Posts: 73

Posted: 17 Jan 2012 04:13:53 am    Post subject:

Where is it loaded to? It seems to start at $9DC3.
And what happens with that code, it doesn't display anything?


Last edited by Guest on 17 Jan 2012 04:37:39 am; edited 1 time in total
Back to top
jammasterz


Advanced Newbie


Joined: 28 Nov 2011
Posts: 72

Posted: 17 Jan 2012 04:53:21 am    Post subject:

The program wasnt running. When you run the program it gets copied to $9D95 and then run from there. So the adresses are ok. BTW it works fine on the emulator.
Back to top
Xeda112358


Active Member


Joined: 19 May 2009
Posts: 520

Posted: 17 Jan 2012 07:58:47 am    Post subject:

Yes, it is run from 9D95h (the BB6D is just a header so the OS sees it as assembly and not a BASIC program). Are you sure you typed it exactly correct on your calculator?
Back to top
jammasterz


Advanced Newbie


Joined: 28 Nov 2011
Posts: 72

Posted: 17 Jan 2012 10:16:02 am    Post subject:

Even if i typed wrong- i also uploded it to the calculator. The only thing that happens is that when i type at the last line, 8, the screen gets scrolled and the stuff that was on the screen gets hard to read( there are few horizontal pixel lines that are off). My guess is that CurCol and CurRow have diffrent adresses in ti 84, but its just a guess.
Back to top
Xeda112358


Active Member


Joined: 19 May 2009
Posts: 520

Posted: 17 Jan 2012 02:10:05 pm    Post subject:

CurRow is 844Bh on the TI-83+/84+/SE. I will check again to see if I can find anything...

EDIT: Are you using any other programs or apps that are using appBackUpScreen by any chance? Also, maybe you can try to test bit 1 (the plus key) instead of bit 0?


Last edited by Guest on 17 Jan 2012 02:54:43 pm; edited 1 time in total
Back to top
jammasterz


Advanced Newbie


Joined: 28 Nov 2011
Posts: 72

Posted: 18 Jan 2012 04:14:41 am    Post subject:

It crashes when i run with BIT 1, A. A question, do i have to type BB6D´in the beginning?
Back to top
Xeda112358


Active Member


Joined: 19 May 2009
Posts: 520

Posted: 18 Jan 2012 11:58:37 am    Post subject:

No, definitely don't do that (you will have to adjust all the addresses). For programs written on the calc, the AsmPrgm token is BB6Ch. when you use AsmComp, that gets turned to BB6D.
Back to top
jammasterz


Advanced Newbie


Joined: 28 Nov 2011
Posts: 72

Posted: 19 Jan 2012 08:26:40 am    Post subject:

So i tried everything, but nothing worked. Maybe someone else has a TI - 84 so that one can test this code?
Back to top
Xeda112358


Active Member


Joined: 19 May 2009
Posts: 520

Posted: 19 Jan 2012 07:32:44 pm    Post subject:

I just tried it on my actual calc and it worked just fine :/ I know that I have a few Apps that overwrite the interrupt, so maybe that is the problem? I used the exact code you gave (remember not to use the BB6D part). Also, this is a TI-84+ and a TI-84+SE
Back to top
asdf


Advanced Newbie


Joined: 17 Aug 2008
Posts: 73

Posted: 20 Jan 2012 01:38:40 pm    Post subject:

Try resetting your RAM before installing the interrupt. Other than that, i have no idea why it shouldn't work...
Back to top
jammasterz


Advanced Newbie


Joined: 28 Nov 2011
Posts: 72

Posted: 20 Jan 2012 08:45:57 pm    Post subject:

Maybe there is a diffrence when you go to the next line when typing the next opcode?
I want to keep the code clear so i type each opcode in a separate line. Maybe this is a problem?
Back to top
Xeda112358


Active Member


Joined: 19 May 2009
Posts: 520

Posted: 20 Jan 2012 10:37:59 pm    Post subject:

No, that won't cause any issues. If it runs without throwing an error then it is read and compiled properly.
Back to top
jammasterz


Advanced Newbie


Joined: 28 Nov 2011
Posts: 72

Posted: 01 Feb 2012 12:13:16 pm    Post subject:

Okay then. I dont know why but it worked on my friends calc. I think im gonna get all the 5 batteries out and try it again.

By the way, im officialy done with the tutorial. My next step is to make a multiplayer starwars game. Im going to start with it after building my CPU for my scool project, which will be quite a while Razz.

I wanted to thank ThunderBolt and asdf for very helpfull hints and answers to my questions Smile, i wouldnt make it without you. Learning z80 asm was both a real adventure and a very nice intruduction to computation. I hope it will help me with my next challenge, x86. :)

Thank you again! Smile
Back to top
Xeda112358


Active Member


Joined: 19 May 2009
Posts: 520

Posted: 01 Feb 2012 04:19:55 pm    Post subject:

o.O Good luck on your ventures! And as for x86, I haven't a clue of where to start, so when you get there, feel free to let us know XD I'd definitely like to get in on that...

Last edited by Guest on 01 Feb 2012 04:20:31 pm; edited 1 time in total
Back to top
asdf


Advanced Newbie


Joined: 17 Aug 2008
Posts: 73

Posted: 01 Feb 2012 04:30:26 pm    Post subject:

Congrats! And anyways, i think TSRs are of a pretty limited use, unless you're trying to do a fake mem reset or password program Wink They can be fun to play around with, though. Btw, do you have any other plans/projects for the TI calcs?
Back to top
Display posts from previous:   
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
    » Goto page Previous  1, 2, 3, 4
» View previous topic :: View next topic  
Page 4 of 4 » All times are UTC - 5 Hours

 

Advertisement