This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Messages - Xeda112358
Pages: 1 ... 179 180 [181] 182 183 ... 317
2701
« on: December 24, 2011, 04:40:52 pm »
I am not finished updating, but it has been a while since the last update so here goes. Since the last version, I have added: length(<<varname>> length('DataStart,Size,LineNumber[,linebyte inString(Offset,SearchStart,SearchString conj(Duration,'Value conj(Duration,DataLoc,DataSize conj('Time,'Freq Uses the Axe sound routine. conj('Time,DataLoc,Size Uses the Axe sound routine but it reads data directly to save time (intead of converting numbers on the fly). Size is the size of the data in words, not bytes.
Some stuff that I haven't mentioned in previous posts: >Frac is used to factor and test for primality. Its outputs are the smallest factor in Ɵ' and the result of Ans divided by that in Ans. So for example, if the output Ɵ' is 1, that means the number is prime. If you did this:
221>Frac
Ans would be 17 and Ɵ' would be 13.
I have also added support for running assembly programs with Grammer. So if you want to run an assembly program from the homescreen without Asm( in front of it, you can. Plus, if you do it that way, you can run it from Archive, too. On top of that, I decided to detect ION, MirageOS, and DoorsCS programs. If you try to run those, you will get a custom error message. The real use, though, is that Assembly programmers can now build assembly programs using a special Grammer header and they can use the calls from Grammer. Unfortunately, while there are over 100 available calls, I have only had time to document about half of them.
So I hope y'all enjoy the new stuff, I hope you make new proggies, and I will see if I can get any useful assembly programs going. I won't have internet for a little while, so I may not be able to respond immediately, but feel free to ask questions.
I feel like I missed something other than the gravity engine buried somewhere in the program...
2702
« on: December 24, 2011, 03:58:42 pm »
I finally have an optimisation that might work or be useful >.> Runer112 apparently mentioned optimising the p_FreqOut routine by replacing:
dec hl dec bc ld a,b or c jr nz,__FreqOutLoop2
with this:
cpd jp pe,__FreqOutLoop2
However, the issue was that the frequency would be thrown off as it cut out 8*HL cycles. However, when I was stealing the code for my own evil intentions, I saw this optimisation and thought of that issue and here is my solution:
p_FreqOut: xor a __FreqOutLoop1: push bc xor %00000011 ld e,a __FreqOutLoop2: ld a,h or l jr z,__FreqOutDone cpd ld a,e scf jp pe,__FreqOutLoop2 __FreqOutDone: pop bc out ($00),a ret nc jr __FreqOutLoop1 __FreqOutEnd:
The way the code is reordered, now, it should only cut out 8*HL/BC cycles which is much less than 8*HL. I think Runer said that it might be up to 1% faster for higher notes and negligible for lower notes.
EDIT: Okay, found a problem: It is actually 2 cycles slower in the inside loop, now, so that will just slow the routine by 2*hl, too
2703
« on: December 24, 2011, 03:48:05 pm »
love it
2704
« on: December 24, 2011, 01:25:25 pm »
Good luck with the house keeping That is sometimes the most tedious part, especially if you are so intimately familiar with the program. Explaining the little stuff can be a bit (boring?) . Awesome job, though, this seems really cool and definitely worth downloading.
2705
« on: December 21, 2011, 10:09:13 am »
Haha, cool! Did it require loading a keycode to 843F or 8445h?
2706
« on: December 19, 2011, 06:23:38 pm »
Ah, you are looking for EOLs and whatnot? CPIR is definitely faster. To seek the end of a line all you would need to do is ld a,3Fh \ cpir. I am currently rewriting my search routine for a speed boost and to shed some size, too. You can similarly look for the starting byte of your search string and then check the bytes following. (That is what my rewrite looks like, anyway)
Also, I now want to see if it would be easier to load pages into port 7... I just load the code into RAM (like TempSwapArea) if it needs to swap out the flashpage in port 6 and then swap back.
2707
« on: December 14, 2011, 09:06:37 pm »
Ooh, wanna optimised routine? I made this one to be very fast and you don't need to worry about checking where you are at.
IncHLMem1 : ; speed 1 page total ; inc l ; 4 4*16384 65536 ret nz ;11| 5 64*5+16320*11 179840 inc h ; 4 4*64 256 ret po ;11| 5 11*63+5 698 ld h,40h ; 7 7 7 in a,(6) ; 11 11 11 inc a ; 4 4 4 out (6),a ; 11 11 11 ret ; 10 10 10
Pretty much, it will increment hl and once it hits 8000h it will increment the flash page. it will destroy a when it goes to the next flash page, but otherwise it remains intact. If you are reading RAM, A is never destroyed as it will never hit 8000h. Alternatively, if you want to make sure A is never destroyed:
IncHLMem1 : ; speed 1 page total ; inc l ; 4 4*16384 65536 ret nz ;11| 5 64*5+16320*11 179840 inc h ; 4 4*64 256 ret po ;11| 5 11*63+5 698 ld h,a in a,(6) ; 11 11 11 inc a ; 4 4 4 out (6),a ; 11 11 11 ld a,h ld h,40h ; 7 7 7 ret ; 10 10 10
2708
« on: December 14, 2011, 08:20:31 pm »
Hmm, I heard that as long as the var is less than a whole flashpage in size, it will not cross boundaries (The OS won't let it)
2709
« on: December 14, 2011, 08:06:54 pm »
That looks really cool Great job! And searching through that much data... the speed does not surprise me.
2710
« on: December 14, 2011, 02:21:33 pm »
[13:22:41] Runer112 no idea [13:22:53] Runer112 you'd probably have to talk to someone like DrDnar or thepenguin77 for that [13:23:00] Xeda112358 :/ okay [13:23:04] Runer112 or BrandonW [13:23:13] Xeda112358 I looked at it over the summer, but I forgot [13:23:25] Runer112 actually maybe Iambian too [13:23:31] Xeda112358 And I cannot remember where I wrote everything down D: [13:23:34] Runer112 I don't think he's as much of an OS expert as those three [13:23:47] Runer112 but I think he wrote his own bcall routine once [13:23:52] Xeda112358 Do you think they could give me tips on writing an OS? [13:24:02] Runer112 definitely [13:24:15] Xeda112358 I am writing my own bcall routine :D [13:24:16] Runer112 DrDnar has written MicrOS which is sort of an OS [13:24:44] Sorunome *yay* my javascript thingy works now! :) [13:24:46] Xeda112358 cool o.o [13:24:48] Runer112 well I guess it is an OS [13:24:53] Runer112 but it doesn't really do much fancy lol [13:25:29] Xeda112358 yeah, I am okay with that as long as I can get some experience tinkering with it for when I write Grammer 4 [13:25:53] DrDnar At the core, all you need are basic input and output routines. [13:26:10] Xeda112358 :D YOu're here! [13:26:21] DrDnar I come when called. What can I say? [13:27:02] Runer112 woof?
:D Get it?
2711
« on: December 14, 2011, 12:57:22 pm »
4. If X=1:0→X:If X=0:1→X (I see this a lot) to abs(X-1→X
Also known as not(X→X
2712
« on: December 14, 2011, 08:42:06 am »
I am not sure if I mentioned this, but I have also added the length( command by request (it was a nice idea). It can do two things: length(<<varname>> will return the size of a variable (archived or RAM) and it returns the pointer to the data in theta prime length('DataStart,Size,LineNumber[,linebyte This will let you read lines in a program for example. So if A was the pointer to the program and you wanted to read line 7:
length('A,0,7
The default linebyte is 63 (the byte the OS uses for BASIC programs for a newline). The optional argument lets you read data that has a different byte separating them. For example, if you have a space between words and you want to read each word, then you can use 41 as the line byte.
Also, in the above code, I use 0 as the size because that is translated to 65536. If you were to use the size of the program, the search would be limited to the program.
2713
« on: December 13, 2011, 07:30:00 pm »
Ah, so that shouldn't be bad at all
2714
« on: December 13, 2011, 07:25:18 pm »
What I did with AsmComp was make all of the equates capital letters that way the ASCII was the same as the token (and I omitted weird symbols like _). Also, you could store it on calc with the ASCII and just convert the tokens to ascii and search for the equates.
2715
« on: December 13, 2011, 07:20:46 pm »
On calc or computer or manually?
Pages: 1 ... 179 180 [181] 182 183 ... 317
|