Author Topic: App Help  (Read 14634 times)

0 Members and 1 Guest are viewing this topic.

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: App Help
« Reply #15 on: October 31, 2010, 09:00:59 pm »
You can always use Mimas... its an on-calc compiler for z80 assembly so you wouldn't need the computer at all.  I used to program in hex and I can tell you from experience, its way too much of a hassle, even for small programs, especially due to needing to update all the labels every time you change your code.  Please use an assembler if you expect anyone to be able to help you with your problem because no one is going to want to go through this line by line to try to translate what you were trying to do.
« Last Edit: October 31, 2010, 09:04:04 pm by Quigibo »
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline Hot_Dog

  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: App Help
« Reply #16 on: October 31, 2010, 09:02:59 pm »

It's quite impressive that you can write programs that complicated, by hand, in hex form, but probably not the best idea if you want to get help from us mere mortals :) 

For example, we have a better idea of what your program is doing if we have labels and variables.  When we disassemble HEX programs, we don't get labels and variables.

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: App Help
« Reply #17 on: October 31, 2010, 09:36:14 pm »
Hmmm, I didn't catch that. I don't know how I made that kind of a mistake. Anywho, my internet is very slow, so I have been trying to reply for over a half an hour. How did you disassemble that?!?! That is pretty cool and it could make my life easier! I liked the DJNZ idea when I thought of it because I was used to using it to make a loop and jumping backwards. I realised that there had to be use for making it jump forward et voila! Before I had 3D20xx or
dec a
jr nc,xxh

and that would jump over that chunk of code.

@graphmastur: the DJNZ's are at the start of the code for each "command" (it is from my SpriteLib program) and "B" contains the command number to execute. If it B is 3, it will decrease to 2 at the first command and since it isn't 0, it jumps to the next command.

*Sorry, didn't know there was a second page
Um, I would prefer not to use Mimas because I am at the point where I no longer need to look things up when I am programming (unless it is something obscure). However, I do have regular access to a computer now, so I am looking into using that to do assembly.

Offline FloppusMaximus

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 290
  • Rating: +57/-5
    • View Profile
Re: App Help
« Reply #18 on: October 31, 2010, 09:44:18 pm »
Well, I disassembled it using a disassembler I wrote myself (called 'sdasm'; I've been working on it for years and it never gets any closer to being stable; and I've been reluctant to release it because while it's quite powerful, it's also rather difficult to use.)  There are plenty of other disassemblers out there.

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: App Help
« Reply #19 on: October 31, 2010, 09:52:14 pm »
well either way, that was really cool. I often manually go through my codes and disassemble them for people, but when I have codes as big as that one, I am pretty reluctant. Thanks a million for that. Anyway, I am still unsure about whether or not I can use B_Calls in my hook.

Offline FloppusMaximus

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 290
  • Rating: +57/-5
    • View Profile
Re: App Help
« Reply #20 on: October 31, 2010, 09:58:17 pm »
Yes, you can, there shouldn't be any problem with that.  Of course, you do have to keep in mind what registers and RAM areas might be used by those B_CALLs (e.g., you can't go calling ParseInp within a font hook.)

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: App Help
« Reply #21 on: October 31, 2010, 10:10:46 pm »
Oh, thanks. When I was first experimenting with the parser hook I tried using that. Now I know what went wrong.

Now, do I need to use that B_Call to exit the hook if it is part of the app? I don't think I need to, but I figured I should ask. I am still trying to figure out what is going wrong. My last version doesn't crash anymore like it used to, but it does throw an "Err:Argument" when I try to use the "int(" command which is the command I am modifying. Do you know what could be causing that?

Offline jnesselr

  • King Graphmastur
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2270
  • Rating: +81/-20
  • TAO == epic
    • View Profile
Re: App Help
« Reply #22 on: October 31, 2010, 10:13:38 pm »
IIRC, you have to use that bcall in order to jump back to the OS.  So, if it was on the app page, I would assume so.

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: App Help
« Reply #23 on: October 31, 2010, 10:17:08 pm »
But I would think that that was built into the system routine that handles the hooks, right? It isn't crashing or anything anymore, it just isn't letting me use the int( command so I am inclined to believe that my problem now is with how I mishandled the hooks or the data.

Offline jnesselr

  • King Graphmastur
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2270
  • Rating: +81/-20
  • TAO == epic
    • View Profile
Re: App Help
« Reply #24 on: October 31, 2010, 10:29:16 pm »
But I would think that that was built into the system routine that handles the hooks, right? It isn't crashing or anything anymore, it just isn't letting me use the int( command so I am inclined to believe that my problem now is with how I mishandled the hooks or the data.
Or with your code. (That isn't commented)  What exactly are you trying to make the int( do?
« Last Edit: October 31, 2010, 10:29:33 pm by graphmastur »

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: App Help
« Reply #25 on: October 31, 2010, 10:39:11 pm »
It is going to be SpriteLib turned into an app and instead of using Ans for the input it is going to use int(. This way, it is much faster to use commands and it won't take up all that RAM.



Offline FloppusMaximus

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 290
  • Rating: +57/-5
    • View Profile
Re: App Help
« Reply #26 on: October 31, 2010, 10:47:05 pm »
No, you would not use JForceCmdNoChar to end a hook.  Hooks use 'ret' to return to the routine where they were called.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: App Help
« Reply #27 on: October 31, 2010, 11:07:48 pm »
by special exit code I mean _JForceCmdNoChar as opposed to ret

@graphmastur: I learned all the hex and I have many addresses memorized, so it is easier for me to work in hex. I am not great with computers so it is nice to be able to program directly on the calc. With that being said, if anybody can walk me through what I need to start programming on the computer, that would be great. For small programs, I like to program directly on the calc, but larger programs use a lot of jumping and calling so it takes a while to count bytes.

I have a 64-bit processor and Windows 7. It isn't really that I am bad with computers, I just haven't been all too exposed.
I am impressed that you can code in HEX. If you don't mind coding in ASM syntax, though, maybe you would like Mosaic when it comes out. There's also Mimas, by FloppusMaximus. Otherwise there'S OTBP assembler, but I think it's a bit slow. Those are on-calc assemblers. Mosaic is even a full IDE. Else if you prefer HEX anyway, it's fine, though. Is it because you have limited computer access too? That said, although I think Quigibo might have put it slightly rudely at the end, I think he is right that few people will be able to help if you do not provide z80 syntax when you need help, as most people here are used to z80.
« Last Edit: October 31, 2010, 11:09:31 pm by OmnomIRC »

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: App Help
« Reply #28 on: October 31, 2010, 11:16:36 pm »
I had very limited access when I was learning assembly, so I have gotten to be very fast with programming in hex. The on-calc compilers are a little too cumbersome for me, but now that I actually have a computer, I can learn to make my programs on this. I do not plan to stop programming directly on the calculator because I get to have a more intimate knowledge of how my code is functioning, but I plan out the hex on my computer anyway, so it would be nice to be able to make a working source code for everybody else to use. Plus, when I was just a BASIC programmer I could never seem to find opcodes other than simple ones and I had no way of putting assembly programs on my calc, so now I am providing people with longer, more useful codes. If you check out my TICalc page you will find a bunch of my other programs and you will see that for the older ones I planned them out with mnemonics and notes and as I became more fluent, I started making fewer notes and no mnemonics because I translate the hex easily.

And I have tried Mimas and I can definitely say that it is pretty cool and I recommend it to anybody that hasn't been so damaged as I :D
I really envy not needing to count bytes...

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: App Help
« Reply #29 on: October 31, 2010, 11:50:33 pm »
Ah ok I see. Kinda like me with TI-BASIC. My parents just couldn't afford a computer. On the subject of HEX, if someone wants to see what a 8xp program looks like in hex he just got to open an ASM one with http://asmtools.omnimaga.org/ . There was a similar tools back in 2002-04 on Cirrus TI programming (which merged with 4 other sites in 2003 and became United-TI) but then they shut down. Galandros created the tool in the link above last year. Pretty handy as well to copy ASM programs to the calc by hand, if your link cable broke or something.
« Last Edit: October 31, 2010, 11:50:58 pm by OmnomIRC »