Author Topic: asmdream is waking up...  (Read 23021 times)

0 Members and 1 Guest are viewing this topic.

Offline the_mad_joob

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 346
  • Rating: +47/-0
    • View Profile
Re: asmdream is waking up...
« Reply #120 on: December 14, 2011, 11:05:46 pm »
Thx for your help man =]

I definitely like the RET PO (haven't even thought of it) but it's too bad i don't need it, since i have to deal with port 7, not 6 =[
Except from that, my code is quite similar, and i'm now doing some tests with CPIR, which i'm convinced can be faster for seeking EOLs.

Anyway, there's a place for you in the credits =]

Offline the_mad_joob

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 346
  • Rating: +47/-0
    • View Profile
Re: asmdream is waking up...
« Reply #121 on: December 15, 2011, 04:41:29 pm »
Great news =]

I can say using CPIR was a good idea :

« Last Edit: December 15, 2011, 04:41:44 pm by the_mad_joob »

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: asmdream is waking up...
« Reply #122 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.

Offline the_mad_joob

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 346
  • Rating: +47/-0
    • View Profile
Re: asmdream is waking up...
« Reply #123 on: December 19, 2011, 10:41:45 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)

The only shitty thing is that once the matching byte has been found using CPIR, you also have to check the previous byte to be sure it's not part of a word token.
For example, $3F can also be the second half of a TVARSYS, T2BYTETOK, or T2BYTETOK2 token.
That additionnal check adds a little bit of time & space but is the way to go if you wanna ensure maximum compatibility (and avoid bad surprises).

An alternative method is to entirely forbid word tokens :
For each prgm that you intend to read, you first scan it entirely for word toks, and then return some kind of compatibility error if one was found.
Of course, that must be done only once for each prgm.
After that, you're free to use CPIR alone to find your shit.

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.

This is something i was planning for, when asmdream used to be a program.
Could allow faster comparison of data located on 2 different flash pages (one on port 6, the other on port 7).
But it's quite a complicated method, since you then need to use port 5 for accessing ram.
In other words, you only have 1 bank left to : run your code, access os ram locations and use the hardware stack.
I guess that's not worth it, since the flash swapping you wanted to avoid has now turned into a horrible ram swapping...

*****

News about the project :

Did some little optimization these days.
I finally found a way (thx to Quigibo) to code the goto feature properly, so i'm actually coding that part.
« Last Edit: December 20, 2011, 03:48:01 am by the_mad_joob »

Offline the_mad_joob

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 346
  • Rating: +47/-0
    • View Profile
Re: asmdream is waking up...
« Reply #124 on: December 20, 2011, 03:10:59 pm »
Goto feature coded successfully :



Time has come for nasty bugs seeking.
After that, final optimization.
Beta imminent =]
« Last Edit: December 20, 2011, 03:13:41 pm by the_mad_joob »

Offline C0deH4cker

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 258
  • Rating: +11/-1
    • View Profile
    • iNinjas Forum/Repo
Re: asmdream is waking up...
« Reply #125 on: December 21, 2011, 09:54:10 am »
Cool! That looks good. When I was watching it, i thought you had made a typo in your prgm. Then i realized that you were demonstrating the goto error.
« Last Edit: December 21, 2011, 09:55:16 am by C0deH4cker »

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: asmdream is waking up...
« Reply #126 on: December 21, 2011, 10:09:13 am »
Haha, cool! Did it require loading a keycode to 843F or 8445h?

Offline the_mad_joob

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 346
  • Rating: +47/-0
    • View Profile
Re: asmdream is waking up...
« Reply #127 on: December 21, 2011, 03:05:11 pm »
Nope.
The only areas where i store data are : progtoedit, editcursor & edittail.

Also, the following bcalls were needed :
_newcontext
_dispeow
_cursorright
_mon
« Last Edit: December 21, 2011, 03:20:41 pm by the_mad_joob »

Offline the_mad_joob

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 346
  • Rating: +47/-0
    • View Profile
Re: asmdream is waking up...
« Reply #128 on: December 24, 2011, 06:57:02 am »
Added a symbol for the current program counter value, since it was quite easy to implement (couldn't resist =]).

Main testing/debugging phase almost over.
The ultimate test will be a try at assembling a "complex" program, fat enough.

After that, i have to build a decent readme.
I can tell that part annoys me, A LOT.

Offline the_mad_joob

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 346
  • Rating: +47/-0
    • View Profile
Re: asmdream is waking up...
« Reply #129 on: December 24, 2011, 11:32:21 am »
Test passed successfully =]

I'm on my way to build the readme...

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: asmdream is waking up...
« Reply #130 on: December 24, 2011, 01:25:25 pm »
Good luck with the house keeping :P 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.

Offline the_mad_joob

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 346
  • Rating: +47/-0
    • View Profile
Re: asmdream is waking up...
« Reply #131 on: December 26, 2011, 02:40:51 pm »
Thx =]

Readme at about 50%...

Offline the_mad_joob

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 346
  • Rating: +47/-0
    • View Profile
Re: asmdream is waking up...
« Reply #132 on: December 28, 2011, 06:57:28 pm »
Beta probably for tomorow =]

Offline annoyingcalc

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1953
  • Rating: +140/-72
  • Found in Eclipse.exe
    • View Profile
Re: asmdream is waking up...
« Reply #133 on: December 28, 2011, 07:02:40 pm »
YAY!
This used to contain a signature.

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: asmdream is waking up...
« Reply #134 on: December 28, 2011, 07:03:20 pm »
Awesome o.o You have managed to inspire me to work a little more, too, I am really liking the look of this. The advanced functionality is awesome!