Author Topic: ASMDREAM - the TI-8X+ on-calc assembler  (Read 14470 times)

0 Members and 3 Guests are viewing this topic.

Offline the_mad_joob

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 346
  • Rating: +47/-0
    • View Profile
Re: ASMDREAM - the TI-8X+ on-calc assembler
« Reply #15 on: December 29, 2011, 02:09:04 pm »
macros.8xp fixed and asmdream.zip updated.
All extra instructions are now working properly.

*****

Ideas for the next update :

advanced exchanges (at the cost of 1 hardware stack entry) :
EX BC,DE
EX BC,HL
EX BC,IX
EX BC,IY
EX DE,IX
EX DE,IY
EX HL,IX
EX HL,IY

general backup (at the cost of 6 entries) :
PUSH ALL
POP ALL
« Last Edit: December 30, 2011, 03:41:55 am 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 - the TI-8X+ on-calc assembler
« Reply #16 on: December 29, 2011, 07:16:12 pm »
I have always wanted to make an assembler syntax that would take B→A and translate that to 78 (for ld a,b) and other such basicised assembly. Now I can do that!

Offline the_mad_joob

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 346
  • Rating: +47/-0
    • View Profile
Re: ASMDREAM - the TI-8X+ on-calc assembler
« Reply #17 on: December 30, 2011, 03:41:37 am »
Actually, that won't work, since the store token is not allowed in macro definitions/calls.
But i can change that easily =]

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 - the TI-8X+ on-calc assembler
« Reply #18 on: December 30, 2011, 09:13:53 am »
If you can, that would be cool, but it isn't necessary XD

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: ASMDREAM - the TI-8X+ on-calc assembler
« Reply #19 on: December 31, 2011, 10:35:46 am »
After reading the readme, I see a couple of things that would keep me from wanting to use this. For one thing, it seems like it would be really annoying to have to delete the assembled program manually each time I want to assemble it again. And also, there are no bitshifting or bitwise operators... how am I supposed to split my labels into 2 bytes? D:
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

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 - the TI-8X+ on-calc assembler
« Reply #20 on: December 31, 2011, 11:01:31 am »
What do you mean by splitting your labels into two bytes? Do you mean getting the MSB and LSB?

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: ASMDREAM - the TI-8X+ on-calc assembler
« Reply #21 on: January 01, 2012, 12:46:48 am »
What do you mean by splitting your labels into two bytes? Do you mean getting the MSB and LSB?
Yes, that's what I mean.
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline the_mad_joob

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 346
  • Rating: +47/-0
    • View Profile
Re: ASMDREAM - the TI-8X+ on-calc assembler
« Reply #22 on: January 01, 2012, 06:27:05 am »
Thx for feedback calc84maniac =]

For one thing, it seems like it would be really annoying to have to delete the assembled program manually each time I want to assemble it again.

That's an interesting point.
I guess adding some kind of overwriting (wih confirmation) feature shouldn't represent too much trouble.

And also, there are no bitshifting or bitwise operators... how am I supposed to split my labels into 2 bytes? D:

I'm actually thinking of adding those to the feature list (multiplication also if i can).
By curiosity, in which case would you need to access the lsb or msb of a label ?

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: ASMDREAM - the TI-8X+ on-calc assembler
« Reply #23 on: January 01, 2012, 09:17:33 am »
This seems pretty nice. Have you considered putting it in the Omni downloads in the future so it can be found easier here? :)

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 - the TI-8X+ on-calc assembler
« Reply #24 on: January 01, 2012, 09:33:25 am »
Accessing the LSB or MSB is sometimes useful in optimisations. For example, when I am computing the address to write a pixel to the graph buffer, I often do something that includes setting the 6th bit of C and loading 93h into B.

Offline the_mad_joob

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 346
  • Rating: +47/-0
    • View Profile
Re: ASMDREAM - the TI-8X+ on-calc assembler
« Reply #25 on: January 01, 2012, 09:58:22 am »
This seems pretty nice. Have you considered putting it in the Omni downloads in the future so it can be found easier here? :)

That would be a true honor =]
Maybe after the beta period ?

Accessing the LSB or MSB is sometimes useful in optimisations. For example, when I am computing the address to write a pixel to the graph buffer, I often do something that includes setting the 6th bit of C and loading 93h into B.

Optimization... of course.

*****

After having looked at it, i'm on my way to code :

logical bit shift left
logical bit shift right
bitwise and
bitwise or
bitwise xor
multiplication
possibility to automatically overwrite the destination program if it already exists

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 - the TI-8X+ on-calc assembler
« Reply #26 on: January 01, 2012, 12:04:30 pm »
Cool! Maybe you can have something in the source code that is an "Autodelete" token. So if you started with maybe AsmPrgm.NAME it would automatically delete the program NAME. I'm just throwing around ideas, but I do like this, so far! I have already had a scenario where I was without a computer and compiler, so I used this :)

Offline the_mad_joob

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 346
  • Rating: +47/-0
    • View Profile
Re: ASMDREAM - the TI-8X+ on-calc assembler
« Reply #27 on: January 01, 2012, 01:23:33 pm »
A "triggering" token is a nice idea i haven't even thought about...
Thx a lot for that suggestion.
Anyway, i'm definitely happy asmdream could have helped you that day =]

Offline the_mad_joob

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 346
  • Rating: +47/-0
    • View Profile
Re: ASMDREAM - the TI-8X+ on-calc assembler
« Reply #28 on: January 05, 2012, 03:33:59 pm »
NEWS

Fixed a few minor bugs.
The store token is now allowed in macro name definitions (Thx xeda112358).
Overwriting the destination program is now possible (Thx calc84maniac).
Added more extra loading instructions (XLD).
Added extra exchange instructions (XEX).

LIST OF CURRENT EXTRA INSTRUCTIONS (space>speed)

no requirements :

 XLD BC,DE
 XLD BC,HL
 XLD DE,BC
 XLD DE,HL
 XLD HL,BC
 XLD HL,DE

requires 1 available stack entry :

 XLD AF,BC
 XLD AF,DE
 XLD AF,HL
 XLD AF,IX
 XLD AF,IY
 XLD BC,AF
 XLD BC,IX
 XLD BC,IY
 XLD DE,AF
 XLD DE,IX
 XLD DE,IY
 XLD HL,AF
 XLD HL,IX
 XLD HL,IY
 XLD IX,AF
 XLD IX,BC
 XLD IX,DE
 XLD IX,HL
 XLD IX,IY
 XLD IY,AF
 XLD IY,BC
 XLD IY,DE
 XLD IY,HL
 XLD IY,IX

requires 2 available stack entries :

 XEX AF,BC
 XEX AF,DE
 XEX AF,HL
 XEX AF,IX
 XEX AF,IY
 XEX BC,DE
 XEX BC,HL
 XEX BC,IX
 XEX BC,IY
 XEX DE,IX
 XEX DE,IY
 XEX HL,IX
 XEX HL,IY
 XEX IX,IY

NEXT CHALLENGE

new operators :

*:multiplication
<<:logical bit shift left
>>:logical bit shift right
 and :bitwise and
 or :bitwise or
 xor :bitwise xor
[:left parenthese (calculation priority)
]:right parenthese (calculation priority)

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: ASMDREAM - the TI-8X+ on-calc assembler
« Reply #29 on: January 05, 2012, 05:20:42 pm »
Cool, new operators!

Also, a lot of those exchanges can be done with a single stack entry (and faster/smaller code).

XEX AF,HL: PUSH AF \ EX (SP),HL \ POP AF
XEX AF,IX: PUSH AF \ EX (SP),IX \ POP AF
XEX AF,IY: PUSH AF \ EX (SP),IY \ POP AF
XEX BC,HL: PUSH BC \ EX (SP),HL \ POP BC
XEX BC,IX: PUSH BC \ EX (SP),IX \ POP BC
XEX BC,IY: PUSH BC \ EX (SP),IY \ POP BC
XEX DE,IX: PUSH DE \ EX (SP),IX \ POP DE
XEX DE,IY: PUSH DE \ EX (SP),IY \ POP DE
XEX HL,IX: PUSH HL \ EX (SP),IX \ POP HL
XEX HL,IY: PUSH HL \ EX (SP),IY \ POP HL
XEX IX,IY: PUSH IX \ EX (SP),IY \ POP IX
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman