Author Topic: [Project] BASIC ReCode  (Read 11983 times)

0 Members and 1 Guest are viewing this topic.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: [Project] BASIC ReCode
« Reply #15 on: November 13, 2010, 01:40:53 am »
Indeed. I guess the only downside can be if he needs ASM help, few people can help, but otherwise that's kinda cool.

Unfortunately I won't have much time to try the program yet, I'll still be looking forward for updates, though. :)

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: [Project] BASIC ReCode
« Reply #16 on: November 13, 2010, 02:37:38 am »
Speaking of updates... I put together a spread sheet (It uses OpenOffice) that has been a real help with my programming. It pretty much eliminates the need to calculate addresses. For that reason, I have optimized the code a bit, but there really are still only two things it can do at the moment.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: [Project] BASIC ReCode
« Reply #17 on: November 13, 2010, 02:42:42 am »
Interesting stuff, although I don't understand much in the spreadsheet yet D:

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: [Project] BASIC ReCode
« Reply #18 on: November 13, 2010, 02:52:18 am »
yeah, my only goal in the spread sheet was to make it take all of my code and put it all together. It was designed for my uses, but anybody is welcome to use it.
Column A is the name
Column B is the size of the code in bytes
Column C is 1 if it is to be included in the final code, 0 if not
Column D converts Column B to hex
Column E is the start address of the code
Column F is the hex code
Column G is whatever F is if C is 1
Column H is all of the code in column G
Column I is the address as it is used in hex (1234→3412)
Column J is the length of the hex code (uses !!! if it doesn't match B)
Column K is the cumulative size of the code to be used


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: [Project] BASIC ReCode
« Reply #19 on: November 13, 2010, 01:10:14 pm »
Okay, I have a new update... I have finally added the Disp command to the list. Apparently I didn't have a bug, but I guess it is always safer to be, well, safe. Also, I forgot to mention that I have not compressed the program. I will start doing that after the next command, though.

The next command I plan to use Line(a,b,x,y,t where it makes rectangles. For now I am going to use the OS routines, but I think I will make my own routines at another date.

Offline matthias1992

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 408
  • Rating: +33/-5
    • View Profile
Re: [Project] BASIC ReCode
« Reply #20 on: November 13, 2010, 02:02:58 pm »
Okay, I have a new update... I have finally added the Disp command to the list. Apparently I didn't have a bug, but I guess it is always safer to be, well, safe. Also, I forgot to mention that I have not compressed the program. I will start doing that after the next command, though.

The next command I plan to use Line(a,b,x,y,t where it makes rectangles. For now I am going to use the OS routines, but I think I will make my own routines at another date.
Sounds good! Definetely make your own routines! This seems pretty useful to be one of the libraries for KOS, by eliminating any TIOS routines it should be KOS compatible already (albeit you should inform Sir about that...)
MASM xxxxxxxxxx aborted | SADce ====:::::: 40% -Halted until further notice| XAOS =====::::: 50% -Units done| SKYBOX2D engine ========== 100% -Pre-alpha done. Need to  document it and extend |

~Those who dream by day are cognizant of much more than those who dream by night only. -Sir Edgar Allen Poe-

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: [Project] BASIC ReCode
« Reply #21 on: November 13, 2010, 04:49:32 pm »
Well I am going to eliminate OS routines later. For now, I am just making it so that I have an outline, but that might be cool...

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: [Project] BASIC ReCode
« Reply #22 on: November 13, 2010, 09:36:57 pm »
Okay, my latest update now has the Line( command which is used to draw rectangles. I actually made the example program prgmB do something this time and I have the compressed version of the program called prgmRECODE.

At the moment, you can comment on your code without a problem unless you use commands. The problem is, every byte gets read by the interpreter and this can slow down your code. I was thinking about using "." to start a comment and have it skip to the next line to save speed, but if anybody has a better idea for starting a comment, I can easily change it.

Also, the example program has a pause just about every other line, so it isn't slow, it's just taking a pause so you can actually read the words :D

Finally, this is as far as my original version got. Now I get to be a little more inventive. I am going to take it slow and easy, but if there are any ideas, I would be happy to read them. I do not plan to do anything major like a tile-mapping routine yet, but simpler things are okay.

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: [Project] BASIC ReCode
« Reply #23 on: November 13, 2010, 09:51:44 pm »
nice!

however, could it be possible to change the Disp command? having Disp X,Y where X is a row 0-7 and Y a column 0-15 is confusing, since X usually increases as you go horizontally to the right, not vertically downwards.


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: [Project] BASIC ReCode
« Reply #24 on: November 14, 2010, 01:27:36 am »
Oh, yeah, sorry about that. I was just using variables, not coordinate logic. Should I just change the order to Disp Y,X or do you want the code changed (it is only 2 bytes to change)?

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: [Project] BASIC ReCode
« Reply #25 on: November 16, 2010, 05:09:26 pm »
Okay, so this version has no new commands, but it does have a new feature that will soon allow for math functions and vars to be implemented. At the moment, you can now optimize some codes by using commands as functions. This means that something like this:

Line(5,17,8,Pause 33,23

is the same as:
Pause 33
Line(5,17,8,33,23

Commands will run a few millionths of a second slower, but It will be quite worth it :D

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: [Project] BASIC ReCode
« Reply #26 on: November 16, 2010, 09:36:39 pm »
Does the pause have to be right in the middle? O.o I'm not sure if I understand the code. Nice to see it is still progressing, though.

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: [Project] BASIC ReCode
« Reply #27 on: November 16, 2010, 09:39:19 pm »
Does the pause have to be right in the middle? O.o I'm not sure if I understand the code. Nice to see it is still progressing, though.

the Pause 33 takes 33 as an argument. in the Line(5,17,8,Pause 33,23) line, it means that both pause and line take the argument 33 as a parameter


Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: [Project] BASIC ReCode
« Reply #28 on: November 16, 2010, 09:44:20 pm »
So basically that 33 is used in both the Pause command as well as the 4th argument in Line(), as a way to save space, right?

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: [Project] BASIC ReCode
« Reply #29 on: November 16, 2010, 09:46:27 pm »
So basically that 33 is used in both the Pause command as well as the 4th argument in Line(), as a way to save space, right?

exactly. i'm assuming you could put it anywhere, if you want. and assuming that this would be syntactically correct:

Line(0,0,Pause 95,Pause 63,0